Collision of objects?


How do I rest a flexible tube on a surface if the tube runs through it?

and in the case of this tube over another tube?


this line is not fully understandable, i at least have trouble distinguishing what is meant. does that mean the tube runs through the surface partially or does it hang on it with its upper part? maybe a sketch could help.

there may be some ways doing this manually probably easy depending on what exactly you need, or if you need something more dynamic with grasshopper and kangaroo.

If you have two surfaces that you think might intersect, you can run the Intersect command on them. If a curve is created, that’s where they touch. If no curve is created, they do not intersect.

This does not work on self-intersecting surfaces.

I want to rest a sphere on an irregular plane without the sphere passing through this plane

I want to do this with an irregular pipe too.

You’ll probably have to play the aligning CPlanes or may end up moving the objects around in 3d space until then can be moved to touch using “Quadrant” points, then move them back to your desired orientation.
Drawing curves perpendicular to the objects may prove useful too.

For sphere on surface use OffsetSrf with offset equal to sphere radius to create a temporary surface. Then locate sphere with center on temp surface. Sphere will be tangent to original surface. Check that no other parts of original surface intersect the sphere.

2nd method. Create line perpendicular to surface at desired point of contact. Length of line is radius of sphere. Center of sphere at end of line.

for a sphere you can try OrientOnSrf, or FlowAlongSrf which you can also use your tube with. here you need the unrolled surface as a base surface. use UnrollSrf on your irregular surface and lay down your sphere or tube at the position you want it to be on the initial surface. uncheck rigid for the tube and it will flow directly over the surface without penetrating it. for an irregular pipe it works similar but you have to see that it does not penetrate the unrolled surface.

for a tube running over a tube i would suggest to take the curve for the pipe and elevate it to the center of its radius on the unrolled surface and use FlowAlongSrf with this curve and pipe then with history switched on which gives you the option to move the points manually till it fits.

in case you want the tube exactly on top of the tube you could elevate the curve and again use FlowAlongSrf and piping the curve again. flowing the ready tube unfortunately distorts it pretty well so thats the only way to go.

Try Squish or Smash if UnrollSrf does not work with the initial surface.

Another method for placing a circular cross section pipe on a surface:
Create the desired contact curve on the surface.
Fin with Direction=Normal along the curve with height equal to radius of pipe.
Pipe along top edge of the fin.

i am so used to UnrollSrf having unroll anything setting it to a higher tolerance that i actually never use the others, but yes one has to know that.

or OffsetNormal instead of Fin which creates directly the curve for piping.