API Reference > OdGe Classes > OdGeNurbCurve2d Class > OdGeNurbCurve2d Constructor > OdGeNurbCurve2d::OdGeNurbCurve2d Constructor (int, OdGeKnotVector&, OdGePoint2dArray&, bool)
OdGeNurbCurve2d::OdGeNurbCurve2d Constructor (int, OdGeKnotVector&, OdGePoint2dArray&, bool)
Syntax
C++
OdGeNurbCurve2d(int degree, const OdGeKnotVector& knots, const OdGePoint2dArray& controlPoints, bool isPeriodic = false);
Parameters 
Description 
int degree 
[in] Degree of curve.  
const OdGeKnotVector& knots 
[in] Knot vector.  
const OdGePoint2dArray& controlPoints 
[in] Array of 2D control points.  
bool isPeriodic = false 
[in] True if and only if the curve is periodic. 

Constructor for the OdGeNurbCurve2d class. 

 

High degree values make curve more flexible. For example degree 1 is used to define a segment, degree 2 is used to define a nurb circle, etc. 

A knot vector defines a sequence of parameter values that determine where and how the control points affect the curve curve. The knot vector is a sequence of parameter values and divides the parametric space into intervals, usually called knot spans. Values of knot vector must be provided in ascending order, for example: (0, 0, 0, 1, 2, 3, 3, 3) can be valid while (0, 0, 2, 0, 3, 1, 3, 3) cannot be valid. 

The control points specify the placement of the curve and adjust its shape. The quantity of control points must be at least the degree + 1. 

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.

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