Creates a new geometric Curve object from NURBS curve data, which does not include weights.
The created curve may be a NURBSpline or a simpler curve such as line or arc.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static Curve CreateCurve( int degree, IList<double> knots, IList<XYZ> controlPoints )
Parameters
- degree Int32
- The degree of the NURBSpline.
- knots IList<Double>
- The knots of the NURBSpline.
- controlPoints IList<XYZ>
- The control points of the NURBSpline.
Return Value
CurveThe new Curve object.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The degree must be at least 1. -or- The number of control points must be greater than degree. -or- The number of knots must equal the sum of number of control points, degree and 1. -or- An interior knot must not repeat itself more than degree times. |
| ArgumentNullException | A non-optional argument was NULL |
| ArgumentsInconsistentException | Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance). |
