API Reference > OdDb Classes > OdDbSpline Class > OdDbSpline Methods > setNurbsData Method > OdDbSpline::setNurbsData Method (int, bool, bool, bool, OdGePoint3dArray&, OdGeDoubleArray&, OdGeDoubleArray&, double, double)
OdDbSpline::setNurbsData Method (int, bool, bool, bool, OdGePoint3dArray&, OdGeDoubleArray&, OdGeDoubleArray&, double, double)
Syntax
C++
void setNurbsData(int degree, bool rational, bool closed, bool periodic, const OdGePoint3dArray& controlPoints, const OdGeDoubleArray& knots, const OdGeDoubleArray& weights, double controlPtTol, double knotTol);
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 OdGeDoubleArray& knots 
[in] Knot vector.  
const OdGeDoubleArray& weights 
[in] Array of weights.  
double controlPtTol 
[in] Control point tolerance.  
double knotTol 
[in] Knot 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.
  • If two knots are within knotTol, they are treated as the same knot.
Copyright © 2002–2021. Open Design Alliance. All rights reserved.