Sidenote: My end goal is to find a way to compactly represent curves as a fixed-length list of elements. I thought I could do this by rebuilding all curves with a specified control point count and degree, and using the points, weights, and knots, but this seems unviable?
So I’ve read previous posts like this one and also the explanation here which says that
A common misconception is that each knot is paired with a control point, but this is true only for degree 1 NURBS (polylines). For higher degree NURBS, there are groups of 2 x degree knots that correspond to groups of (degree+1) control points.
I understand well enough with polylines (degree 1) that a line with 10 control points will have 10 knot vectors.
However, it’s described here that
the number of knots in the knot vector is always equal to the number of control points plus the order of the curve. E.g., a cubic (order=4) with four control points has eight items in the knot vector.
It’s defined here that
Degree = order + 1
In a script such as this one, I get a bunch of curves, rebuild them specifying the control count and the degree. The curve has 10 control points + degree of 3 + 1, so I expect it to have 14 knots (at most?).
But you can see in the screenshot, that a few of the curves after rebuilding end up with 13 control points instead of 10, 15 knots instead of 14, etc. Why? How?
Visually speaking, I noticed this happened with closed/circular curves, so I’m wondering if that has something to do with it? Or does it have something to do with the multi-knot stuff?
I attached below the Grasshopper script with some internalized curves, if that helps.
make_crv_attributes.gh (180.8 KB)