NurbsCurve.UVNDirectionsAt

Hi McNeel,

I just found these new methods for Rhino 7:

https://developer.rhino3d.com/wip/api/RhinoCommon/html/M_Rhino_Geometry_NurbsCurve_UVNDirectionsAt.htm
https://developer.rhino3d.com/wip/api/RhinoCommon/html/M_Rhino_Geometry_NurbsSurface_UVNDirectionsAt.htm

I thought that since curves are unidimensional objects, their second or third derivative was undefined in 360 degrees of freedom. And to get one, you have to use some heuristic. This is what I did in the next version of Peacock, I have a curve object that contains an alignment object to evaluate the normal at any parameter via the closest point direction to the alignment geometry.

So, how do define the normal direction of a curve? How do you make it consistent for any two parameters along the curve?

Here is the source code.

Does this help?

– Dale

Thanks Dale!

Well, still a heuristics problem, I thought there would be some mathematical formula behind. But I’m glad to see you moving beyond the strictly mathematical, I think it’s very necessary.

So, if the curve can extract a plane, you use its normal, which is like the global normal of the curve somehow. If not, you use the curvature direction (the curvature and the tangent will not be the same direction usually?), if its zero or invalid you call PerpendicularTo, and here it escapes me what it does, because the vector state is Unset. I suppose this calculates the perpendicular using the Cartesian axes until the result is not zero, or something like that?