API Reference > OdDb Classes > OdDbSpline Class > OdDbSpline Methods > setNurbsData Method > OdDbSpline::setNurbsData Method (int, bool, bool, bool, OdGePoint3dArray&, OdGeKnotVector&, OdGeDoubleArray&, double)
OdDbSpline::setNurbsData Method (int, bool, bool, bool, OdGePoint3dArray&, OdGeKnotVector&, OdGeDoubleArray&, double)
Syntax
C++
void setNurbsData(int degree, bool rational, bool closed, bool periodic, const OdGePoint3dArray& controlPoints, const OdGeKnotVector& knots, const OdGeDoubleArray& weights, double controlPtTol);
Parameters 
Description 
int degree 
[in] Degree.  
bool rational 
[in] Controls if this Spline entity is rational.  
bool closed 
[in] Controls if this Spline entity closed.  
bool periodic 
[in] Controls if this Spline entity is periodic.  
const OdGePoint3dArray& controlPoints 
[in] Array of WCS control points.  
const OdGeKnotVector& knots 
[in] Knot vector.  
const OdGeDoubleArray& weights 
[in] Array of weights.  
double controlPtTol 
[in] Control point tolerance. 

Sets the NURBS data for this Spline entity.

  • degree is in the range of [1..25]
  • If rational is true, controlPoints.length() must equal weights.length()
  • If periodic is false, then knots.length() must equal controlPoints.length() + degree + 1
  • If periodic is true, then knots.length() must equal controlPoints.length(), the first and last controlPoints must be equal, and the first and last weights (if provided) must be equal.
  • If two control points are within controlPtTol, they are treated as the same control point.
Copyright © 2002–2020. Open Design Alliance. All rights reserved.