API Reference > OdGe Classes > OdGeNurbCurve2d Class > OdGeNurbCurve2d Methods > OdGeNurbCurve2d::set Method
OdGeNurbCurve2d::set Method
Syntax
C++
void 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 weights is not specified, a non-rational spline is constructed.
  • If weights is specified, then a rational spline is constructed, and controlPoints.length() must equal weights.length()
  • If isPeriodic is false, then knots.length() must equal controlPoints.length() + degree + 1
  • If isPeriodic 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.

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