Mesh pipe with variable radius

Hello Grasshopper users,

I want to build a mesh pipe with variable radius. The goal basically is a component like Pipe Mesh from Pufferfish, but with the option of using a variable radius. One workaround is using the Variable Pipe component from Surface --> Freeform and then converting the resulting BREP to a mesh, but as far as I know, BREP operations in general are computationally more expensive than using mesh operations. This operation is getting used quite often by me, so I am looking for a faster alternative to what I am doing right now.

I started experimenting with PerpFrames, Polygon, connecting the polygon outline points and finally using a Loft Operation with the Straight / 3 Type, but the result still is a BREP and leads to several self intersections when the curve is curved too much. So this isn’t a robust or useable way to replace the workaround.

Another idea I had was using the mesh pipe command and then scaling the points according to the radius I want. But then there is the problem of recognizing the points of the mesh that form the different cross sections of the pipe.

Does anyone here have an idea on how to implement it better?
It’s not important how it is solved, Python scripts are also an option.


Hi @martinborst1 ,

Sure, I have an idea! :wink:

That’s exactly what I would except there’s no need for N.u.r.b.s. operations, like Loft, if you need a mesh. What you could do instead is produce your sectional polylines of desired shape and size and use my custom MeshLoft+ component to do the lofting.

It can handle closed lofts as well as open ones, which are more like pipes. End caps are optional as you’ll see in the example file.

The only rule is that all sectional polylines must have an equal number of vertices!
My custom Python component is included in the example file. It even has an icon. :wink: (13.0 KB)

1 Like

Here’s another example using the same procedure as above in combination with Pufferfish to achieve even more complex lofting or piping behaviors.

I use a custom section curve that gets tweened along a rail curve with the assistance of Pufferfish.

Oh, yeah, and welcome to the forums! (17.5 KB)

1 Like

Thanks for your help/ contribution!

1 Like