NurbCurve2d(Int32, KnotCollection,
Point2dCollection, Boolean) Constructor
|
Constructor for the NurbCurve2d class.
Constructs a 2D curve according to the passed parameters.
Namespace: Teigha.Geometry
Assembly: TD_Mgd (in TD_Mgd.dll) Version:
24.2.0.0
Syntax
public NurbCurve2d(
int degree,
KnotCollection knots,
Point2dCollection controlPoints,
bool periodic
)
Public Sub New (
degree As Integer,
knots As KnotCollection,
controlPoints As Point2dCollection,
periodic As Boolean
)
public:
NurbCurve2d(
int degree,
KnotCollection^ knots,
Point2dCollection^ controlPoints,
bool periodic
)
new :
degree : int *
knots : KnotCollection *
controlPoints : Point2dCollection *
periodic : bool -> NurbCurve2d
Parameters
- degree Int32
- [in] Curve degree.
- knots KnotCollection
- [in] Knot collection.
- controlPoints Point2dCollection
- [in] Collection of control points.
- periodic Boolean
- [in] Flag that specifies whether to make the curve periodic (a
closed curve).
Remarks
High degree values
make the curve more flexible. For example, degree of 1 is used to
define a segment, degree of 2 is used to define a NURBS circle,
etc. A knot vector defines a sequence of parameter values that
determines where and how the control points affect the curve. The
knot vector is a sequence of parameter values and divides the
parametric space into intervals, usually called knot spans. Values
of the knot vector must be provided in ascending order, for
example: (0, 0, 0, 1, 2, 3, 3, 3) can be valid while (0, 0, 2, 0,
3, 1, 3, 3) is not valid. The control points specify the placement
of the curve and adjust its shape. The quantity of control points
must be at least the degree + 1. If isPeriodic is false,
knots.length() must equal controlPoints.length() + degree + 1. If
isPeriodic is true, knots.length() must equal
controlPoints.length(), and the first and last controlPoints must
be equal.
See Also