Rectangle or square pipe Sweep1 error

I’m trying to make rectangle or square pipe with center curve inside but Sweep1 component works only when curves are open. It cannot be exploded because I need joints like this:

When curves are joined but not closed it works fine but when curves are closed Sweep1 don’t work.

I’ve found these threads but non of these solutions work at my case.

rect.3dm (30.2 KB)
SquarePipe_Cap_Union.gh (20.1 KB)
SquarePipe_Cap_Union2.gh (23.0 KB)

Is there a way to make it work on closed curves too?


S Wac.gh (21.0 KB)

1 Like

Nice. Thanks! I wonder why it cannot work for both open and closed curves like pipe command in rhino. And why t parameter cannot be at 0 point.

You can simply use AddSweep1 from rhinoscriptsyntax to get the same result as rhino:

import rhinoscriptsyntax as rs
a = rs.AddSweep1(R,S, True)


S Wac.gh (20.2 KB)

2 Likes

Thanks! That’s even better.
Maybe it should be implemented to next rhino version as pipe options since almost all other cad software has it (like square tube in solidworks or inventor).

I have been exploring different methods of generating square pipe like extrusions for a building project lately and came across your grasshopper script. So far it has been more successful than extrusions or python scripts but it still has this tilt to it. Do you know of a way to adjust the orientation on the line? (Grasshopper is still quite new to me)

Thanks Mahdiyar! Can you show me How can I add the thickness for this square profile? Ex. 50x50x4