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 Surface.gh (7.0 KB) offset on surface.3dm (3.4 MB)
Maybe it’s not Rhino’s, but the simple geometric version, which only works for curves without kinks, could be.
Extract the points that define the curve.
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).
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.
Explode the curve.
Extract the points that generate each segment.
Move the points on the surface.
Create an offset segment with those points.
Extend the segments until they intersect with the previous and the next one.
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.
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.