Pipes that touch two existing pipes near their mid points

Here is an example:


2025-03-19+08_touching_pipes.3dm (135.0 KB)

There are four more possible pipes which can be obtained by mirroring on the yz-plane. Here is how I did it:

  1. Create the existing pipes. Important: In the end they should be allowed to be in arbitrary positions and orientations in space!

  2. Draw pipes with double the radius around the existing pipes.

  3. Create a bisecting plane through the mid points (not sure if that is the right term). Find the curves at the intersections between that plane and the pipes drawn in step 2.

  4. Connect lines tangent to the curves and pipe them.

How do I find the touching pipes quickly in Grasshopper?

I could recreate the above process, but I’m afraid the definition will become quite convoluted. Also, please note again: The original pipes will be in arbitrary positions and orientations. The above is just an example!

could you please clarify exactly how this plane should be built? which exact points it goes through?
how did you draw it in Rhino? (3 points? line+point?)

here the Plane (infinite entity) is representad by a Surface (finite entity) retrieved from the curves that lie on it, but I have no idea how did you goet it in first place:

When I did it this morning, that 45° angle somehow made sense to my brain. It could also be mirrored on the yz-plane and give the same result - see my original post. But generalized, to build the plane, I would say, do as follows

  1. Draw a line through the mid points of the axes of the two pipes.

  2. Sweep that line along the vector you get by bisecting the axes of the pipes.

The point of my question is to find out what is the simplest method to find these touching pipes. The method doesn’t need to replicate the steps I did in Rhino. In fact, I hope that there is a simpler method.

(Constructions with poles or pipes are all over the place, for example in the world of bamboo, or when doing non-standard metal scaffolding. Yet, I am not aware of any specialized tool for the purpose.)

When it is difficult to model or everything is in weird angles and planes, you can use Kangaroo to push line segments away from each other.

Maybe it can be done easier. but this works, regards Eef

touching_pipes.gh (33.6 KB)


This should work fine but you need to eliminate duplicates.
touching.gh (25.7 KB)

Thanks for the nudge! I thought about Kangaroo in the very beginning, then discarded the idea. Now I came back to it:



2025-03-23+08_touching_pipes.3dm (102.8 KB)
2025-03-23+08_touching_pipes.gh (22.2 KB)

What I have here is slightly different from my original requiements, but closer to what I need:

  • The positions are not limited to be in the middle of the existing pipes. Rough initial positions can be specified by moving points around in Rhino.

  • There is only one solution.

Basically, a pipe is positioned close to the initial points and so that it touches the two predefined pipes.

1 Like

Thank you, this works quite nicely and doesn’t look too complex! The only exception is the singular case where both pipes are parallel. But my original manual solution would have an issue there too.

Thank you! I have to admit that I don’t understand this one. It starts off with the solutions already baked in, then goes into a cluster where a VB script is called.

The cluster is my ghuser and is only used to select, in this case, the groups of intersecting tubes.
It can be eliminated this way.

I added a group to solve this:

  1. what checks crossproduct of vectors axles. If length is 0 they are parallel.
  2. If 0 then one of the tangentlines is enough to create the new pipe.
    3 If NOT zero it uses the original version with intersecting planes.
  3. A stream filter is used to proceed with the correct version
    touching_pipes (also paralllel).gh (37.9 KB)

Thank you. It’s good to have this solution which doesn’t require bouncing Kangaroos. (although for now I’ll stay with my Kangaroo solution, it just does the trick)

Thank you, I have to look into that!