Pull spiraled pipe to curved surface

I’m trying to make a pipe spiral rest along a surface. I have created a spiral path and used a pipe tool with the curve. I would like the resultant pipe be tangent to the surface and not intersect.

I know for a straight cylinder I could just offset the helix by the radius of the pipe, but how do I handle the dome portion of the cylinder?

Here is my path

and I would like the pipe to be along the surface.

attached is my .gh

Wraparound.gh (51.4 KB)
cylinder.3dm (564.0 KB)

I know it’s something along the lines of this…But i think the math is beyond me.

If you offset the surface first by the radius of the pipe, and then create the spiral, the resulting pipe should be tangent to the original surface.

your curve is a bit wacky at the bottom (I reduced it for this example) - if you make a brep equal to this mesh then it’s easy to cheat it this way with brep normals from closest points.
Wraparound_help.gh (90.3 KB)

1 Like

This is amazing. Thanks!