Closest distance between pipes (open mesh)

Hi all,

I am looking to find the closest distance between several pipes. The pipes come in as open meshes. Any suggestions?


MinDist.3dm (615.2 KB)

Model a perpendicular plane, create sections and then it should be simple to get the closest distance since the pipes are circular.

Thanks for the suggestion, Martin. Could you elaborate on which components you recommend to use? For perpendicular plane, I assume you mean “perp frames” and for sections i tried mesh|plane? As a result i do not get the curves for each perp frame, but only some…From the ones that do draw out only a few or one pipe shows as a curve. Am I using the components wrong?

Ok, so you don’t really need Grasshopper to do that.

  1. ExtractMeshEdges
  2. Draw a polyline from one edge of one pipe to an edge of two other pipes snapping to perpendicular points. The result is a planar polyline with two segments. We’re ignoring one pipe.
  3. That polyline is planar. You can use Auto CPlane to draw a surface which is perpendicular to three of the four pipes.
  4. Create sections of the surface and each pipe
  5. Select the control points of each section and fit a circle to each polyline using _Circle _FitPoints
  6. Connect the centers of these circles and trim what’s inside the circles or use _Line _Perpendicular _2Curves to draw the shortest segments between the circles.

MinDist_section.3dm (1.6 MB)

Thanks for detailed response. Would this work for GH also? I would need to perform distance check a lot of places, so it would be beneficial to automate this.

This can be done in a similar way, yes