AcGeNurbCurve3d::AcGeNurbCurve3d Constructor (int, AcGeKnotVector&, AcGePoint3dArray&, AcGeDoubleArray&, Adesk::Boolean)   

AcGeNurbCurve3d(
    int degree, 
    const AcGeKnotVector& knots, 
    const AcGePoint3dArray& cntrlPnts, 
    const AcGeDoubleArray& weights, 
    Adesk::Boolean isPeriodic = Adesk::kFalse
);
Parameters
Parameters 
Description 
int degree 
Input degree of spline 
const AcGeKnotVector& knots 
Input array of knot values, partitioning spline's domain into rational pieces 
const AcGePoint3dArray& cntrlPnts 
Input array of 3D control points 
const AcGeDoubleArray& weights 
Input array of weight values 
Adesk::Boolean isPeriodic = Adesk::kFalse 
Input flag indicating if spline is a periodic 
Description

Constructs a 3D rational spline by a knot vector, control points, and weights. If the spline is rational, control points and weights must have same length. 

If isPeriodic = Adesk::kFalse then the length of knot vector must be greater than the length of the control array by degree+1. 

If isPeriodic = Adesk::kTrue then one of the following must be true:

  • The length of the knot vector must be greater than length of the control array by 1. The first and the last control points must NOT be identical.
  • The knot vector and control array must have same length, and the first and the last control points must be identical.
Remarks

When creating periodic spline, we accept two data formats:

  1. The length of knot vector must be greater than length of the control array by 1. The first and the last control points must NOT be identical.
  2. The knot vector and control array must have same length, and the first and the last control points must be identical.
We prefer the first format and we will return the same format when calling getDefinitionData(). We return the same format even if you pass in data in the second format. 

The knot vector should contains distinct knot values. For example, if we want to create a periodic spline with four control points, the knot vector could be (0, 1, 2, 3, 4).

Links