NurbCurve3d(Int32, KnotCollection,
Point3dCollection, DoubleCollection, Boolean)
Constructor
|
Constructor for the NurbCurve3d class.
Constructs a 3D curve according to the passed parameters.
Namespace: Teigha.Geometry
Assembly: TD_Mgd (in TD_Mgd.dll) Version:
24.2.0.0
Syntax
public NurbCurve3d(
int degree,
KnotCollection knots,
Point3dCollection controlPoints,
DoubleCollection weights,
bool periodic
)
Public Sub New (
degree As Integer,
knots As KnotCollection,
controlPoints As Point3dCollection,
weights As DoubleCollection,
periodic As Boolean
)
public:
NurbCurve3d(
int degree,
KnotCollection^ knots,
Point3dCollection^ controlPoints,
DoubleCollection^ weights,
bool periodic
)
new :
degree : int *
knots : KnotCollection *
controlPoints : Point3dCollection *
weights : DoubleCollection *
periodic : bool -> NurbCurve3d
Parameters
- degree Int32
- [in] Curve degree.
- knots KnotCollection
- [in] Knot collection.
- controlPoints Point3dCollection
- [in] Collection of control points.
- weights DoubleCollection
- [in] Collection of weight values.
- 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, and degree of 2 is used to define a NURBS circle,
etc. A knot vector defines a sequence of parameter values that
determine 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. The closer the weight value is to
zero, the closer the curve is to a straight line near the
corresponding control point. If the weight increases, the curve
pulls toward the corresponding control point. If the weight
decreases, the curve pushes from the corresponding control point.
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