C# get normals of CVs

(Ludwig T.) #1

Hey there,

i have got a question about the control vertices of a curve. I want to get the normals of the CVs but i don’t know the C# command. I think there must be a command because you can actually move the CVs in Rhino along thier normals. Sadly i’m a beginner but i hope that i discribed my problem properly.

In the meantime i will continue with searching for a solution. If i find a solution i will post it here.

(David Rutten) #2

Curve have normal planes and tangent vectors, however control-points are often not on the curve so they cannot really be said to have normal planes. Or do you mean the vector which is perpendicular to the control-polygon segments adjacent to the control-point? If so, then control-points between co-linear segments and the first and last control-points do not have well defined normals.

(Ludwig T.) #3

Thanks for the quick answer!

I think i meant the first one:

But yeah, i got what you said. (would have been too easy)

The “normals” are actually the active/relative perpendiculars to their belonging curv-segments, right? So they are changing everytime i move the CVs. I think i can calculate them with the cooardinates from the CVs and their shortest distance to their segments and then turning the distances into vectors.

(David Rutten) #4

Some unrelated part of the curve may be closer to a control point than the point on the curve to which it most ‘belongs’. You however can get the greville parameter on a NurbsCurve which is the parameter associated with a specific control-point.

(Ludwig T.) #5

Oh, yes i remember. There is a difference between “shortest distance” and the “sought distance”!

Thanks for the answer, this will be the solution for my task! :slight_smile: