Rhino.Geometry.NurbsCurve(dimension, rational, degree, point count) creates a Nurbs Curve object with one less Knot than Rhino.Geometry.NurbsCurve(degree, point count);
Is this a bug or is there something I am missing about this constructor?
Thank you so much for your answer. I understand all this as I am negotiating rhino against a custom Nurbs implementation. I am saying that the Knot Vector that is outputted from that constructor is the wrong size and that it may be a bug. Unless that constructor produces a knot vector one size too small by design and I am missing something.
Ok, I guess the post was a bit off to your question. I’m just trying to say that it shouldn’t matter what the knot-vector is after calling the constructor, because if you create a curve from scratch, then you need to define the knot-vector anyway. In other words, even if there is a mismatch on different ctor overrides, the knot-vector is at that point just a placeholder.
Btw: I noticed the following:
public NurbsCurve(
int dimension,
bool rational,
int order,
int pointCount
)
The ctor with more arguments does memory allocate. In order to do that, it needs to know the amount of future cps equal to the length of the knot vector.
The order is not the degree of a curve. The order is usually the degree+1.
That describes my problem! Yeah, you are right I forgot that as the other describe degree instead of order. Bizarre that one calls order and the other calls degree…nevertheless, thanks, I’ll be more careful on the future.