4.18.7 NurbsCurve class

class NurbsCurve
This class stores the data of a NURBS curve. NurbsCurve objects are returned when the value of a nurbsCurve attribute is requested.

The class has the following data members:

degree
The degree of the curve.

spans
The number of spans.

form
Form attribute. The attribute can have one of the following values:

Value Meaning
0 Open
1 Closed
2 Periodic

isrational
This attribute is True if the curve contains a rational component. In this case, the control vertices have one additional value.

dimension
The dimension of the curve (2 or 3).

knots
This is a list of floats containing the knot values.

cvs
A list of control vertices. Each vertex is a tuple of 2, 3 or 4 floats (the actual number depends on the dimension and isrational settings).