How works "Offset curve on Surface"?

Hello everyone,
currently I’m working on my project about 3D-Print path planning on curved surface.
I have made a easy example in the picture.
I want to know how this function works principally? Because i need to write it in my thesis.offset on (7.0 KB)
offset on surface.3dm (3.4 MB)

I mean if I have given a curve, surface and distance, welche mathematic method or formula will be used, especially for offset on a curved surface?

Thank you very much

I doubt McNeel will provide the details of the algorithm used in Rhino. They usually consider details of algorithms to be proprietary.

I think so as well.

Maybe it’s not Rhino’s, but the simple geometric version, which only works for curves without kinks, could be.

  1. Extract the points that define the curve.
  2. Move the points on the surface.
    2.1) Use the cross product of the tangent on the curve and the normal on the surface (using the closest point parameter) to have the direction.
    2.2) Assign a magnitude small enough to accept the error in approximation of curvature and big enough so you don’t have to do 100000 iterations.
    2.3) Move points.
    2.4) Repeat step 2 until it meets a termination condition (e.g. offset distance).
  3. Create a new curve with the offset points.

You can check the limits of this algorithm in the Offset On Surface Variable component of Peacock.

This becomes much more complicated when it is a polycurve.

  1. Explode the curve.
  2. Extract the points that generate each segment.
  3. Move the points on the surface.
  4. Create an offset segment with those points.
  5. Extend the segments until they intersect with the previous and the next one.
  6. Trim parts and join them.

You can also trim the surface from the curve to offset, and reconstruct it in such a way that you can simulate the offset of the curve using an isocurve.

Maybe there is a mathematical version that uses a mapping transformation from a euclidean space to the 2d space of the surface with which to offset correctly in 2d and then remape it back to the surface, but are mathematical too deep for me.

This stuff is really slow, here is an example I was using for a bit different reason might help. (121.8 KB)

Hi Dani,
thank you for your answer. I agree with your Idee.
Meanwhile I think that maybe I should research some marhematical fundamental algorithm about “parallel curves on parametric surfaces NURBS” in this case. It’s also very difficult for me.
I have already found a good helpful literature about that. 1-s2.0-S0307904X13006549-main.pdf (4.0 MB)
I’m gonna just have a look and try to understand it.

A curve offset an arbitrary distance from a NURBS curve usually is not be a NURBS curve. Offset control points usually results in a different curve. A curve offset an arbitrary distance from a NURBS curve can be approximated within a desired tolerance using a sufficient number of control points - the tighter the tolerance the larger the number of control points which may be needed.

Oh, That’s right.