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)

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)

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).