Is there a way to make the pipes rectangular on Rhino?

I want to make the pipes on this object rectangular, is there a way I can do that? Maybe with fillet?
Thanks you

<a class=“attachment”

Search the forum. One user recently submitted a macro/script to do this. Don’t remember who.

I’m new to Rhino and haven’t used a script, how would I open the script and use it/what app. would I need to load the script?

Loading and running a scipt is described in Level 2 Manual on pages 24-25 (in version I have). .

That would probably be me. The thread is here.

The easiest way initially to run the script is to copy it to your computer somewhere, then type _RunPythonScript and browse to the script and hit Open to run it.


One more “Corporate”…


Oh, yeah… didn’t even notice that one, good catch. Almost certainly a “student version”… --Mitch

@bobmcneel can corporate versions be made to throw an exception when plug-ins try to run / load ?


There are legitimate corporate versions…

@wim thanks, I have never seen one or sold one.

Sorry to ask you if there is a way to create a rhino toolbar button (Rhino Windows) to run one of those 4 python scripts (or any script). I’ve googled the question but found the answer a bit confusing as they come up on Rhino developers sites. Beginner is my only excuse for this ?

If you already have a toolbar where you would like to add a button, right click inside the toolbar and select New Button.

In the Command: area on the button editor, write:

! _-RunPythonScript “Your_Script

where Your Script is the full path and name of the script.

There’s no need to excuse yourself, it is a bit confusing, especially since there are different several ways to do this.

A quick resumé:

  1. Call the script remotely with the full path
    This method requires that you save the script in some known folder on your hard drive or network. You then do as Wim shows above, create a new toolbar button and in the command area put in
    ! _RunPythonScript "full path to script". The full path includes the filename, the extention .py is optional, but it won’t hurt to put it there. Make sure it is enclosed in quotes - otherwise any space in the file path will cause it to fail.

  2. Call the script remotely with a stored search path.
    As above, this method requires that you save the script in some known folder on your hard drive or network. Open the Python script editor by typing _EditPythonScript. In the editor menu, choose Tools>Options>Files tab and enter the full path to the folder above where you will store all of your scripts. You can store more than one path to search if you wish. You can then OK and close the editor. This only needs to be done once. Then, when you create your toolbar buttons, you can simply put
    ! _RunPythonScript "filename" (no full path needed). Rhino will search in the folders and take the first one it finds with the correct name.

  3. Paste the whole script into the button editor.
    This method does not require storing the script file anywhere nor creating a search path.
    Simply open the script file in a text editor, select the whole text and hit Ctrl+C to copy it all. Then in the toolbar button editor, in the command area type the following:

! _RunPythonScript (

<paste the whole script text here>


This is the easiest way, but make sure you store the original script somewhere for safekeeping, and always back up your custom toolbar file as well.



Thanks so much Mitch and Wim for taking the time to help

Amanda, assuming those are curves, you could probably just make a rectangle and then use [Surface / Sweep 1 Rail] to accomplish what you need. [Cap] to make solids.

Thank you very much! Very helpful post!
Just found that to run directly from command line it need to be like this , like you said in your another post:
! _-RunPythonScript (
paste the whole script text here

  • “-” before RUN
1 Like

Thanks, you’re exactly right, I always forget to type those in when responding… :confounded:

Apparently the original post is too old to be able to edit and correct… :frowning_face:


Is it possible to add cplane coordinate feature to your great piping scripts?
It would be very convenient to rotate cplane before adding pipe then to type rotation manualy during creation!

Hmm, I don’t understand here - none of those scripts have a rotation setting… --Mitch

Oh , sorry just confused it with maquetools pipe scripts. But all in all, is it possible?
Idea is that the pipe orientation will depends on ,for example, cplane x axis direction.