hi, it seems that Curve.GetPerpendicularFrames Method is not working in Rhino 6.2. No returned value…
Please provide a working code sample and a file containing a curve that does not work for you.
its working now…thx
Hi @dale, I didn’t want to open up a whole other thread, but today I noticed that
Curve.GetPerpendicularFrames return different results for the same curve parameter.
I wondered if this is due to the perpendicular frame needing an initial value for minimizing twist? It was on a planar curve, so there would be no torsion. How is the perpendicular / RMF calculated in Rhino anyway? I’ve come across several techniques and am curious about which one you use.
I can see where you’d be confused, based on the method names and descriptions on the online help.
Curve.PerpendicularFrameAt - Returns a 3d frame at a parameter. This is slightly different than FrameAt in that the frame is computed in a way so there is minimal rotation from one frame to the next. The
OrientOnCrv uses this.
Curve.GetPerpendicularFrames - Get relatively parallel frames at selected points along a curve.
Sweep2 commands use this.
Does this help?
Thanks, @dale, however those sound very similar to me, but they are apparently not…
Curve.PerpendicularFrameAt returns a frame with minimal torsion, as opposed to
Curve.FrameAt which appears to be just the Frenet frame at that parameter (using tangent and curvature vectors).
Curve.GetPerpendicularFrames also returns frames that, as you say, are mostly parallel and have minimal torsion, but just seem to be calculated differently somehow.
The reason for all of this is a custom class which queries a curve for an orientation frame. The two methods seem to only differ in that one returns a single frame and the other returns multiple frames, so I assumed that perhaps
Curve.GetPerpendicularFrames is just somehow performance optimized for getting multiple frames at once.
I guess I’m wondering how they differ in getting the normal of the curve, since they show different results… Just confused by the whole thing!
In the meantime, for my purposes I can use
Curve.GetPerpendicularFrames and get what I need. Another caveat of that method is that it requires at least 2 parameters to work… putting a single parameter in results in a
Thanks for the help!