API Reference > OdGe Classes > OdGeNurbCurve2d Class > OdGeNurbCurve2d Methods > OdGeNurbCurve2d::set Method
OdGeNurbCurve2d::set Method
Syntax
C++
OdGeNurbCurve2d& set(int degree, const OdGeKnotVector& knots, const OdGePoint2dArray& controlPoints, const OdGeDoubleArray& weights, bool isPeriodic = false);
Parameters 
Description 
int degree 
[in] Degree of spline.  
const OdGeKnotVector& knots 
[in] Knot vector.  
const OdGePoint2dArray& controlPoints 
[in] Array of 2D control points.  
const OdGeDoubleArray& weights 
[in] Array of weights.  
bool isPeriodic = false 
[in] true if and only if the spline is to be periodic (closed). 

Reference to this OdGeNurbCurve2d object.

Sets the parameters for this spline according to the arguments. 

 

  • If the weights parameter is not specified, a non-rational spline is constructed.
  • If the weights parameter is specified, then a rational spline is constructed, and controlPoints.length() must be equal to weights.length().
  • If isPeriodic is false, then knots.length() must be equal to controlPoints.length() + degree + 1.
  • If isPeriodic is true, then knots.length() must be equal to controlPoints.length(), the first and the last controlPoints must be equal, and the first and the last weights (if provided) must be equal.

Copyright © 2002–2022. Open Design Alliance. All rights reserved.