Creates a new geometric Curve object from NURBS curve data containing just control points and weights.
The created curve may be a NURBSpline or a simpler curve such as line or arc.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2017
Syntax
C# |
---|
public static Curve CreateCurve( IList<XYZ> controlPoints, IList<double> weights ) |
Visual Basic |
---|
Public Shared Function CreateCurve ( _ controlPoints As IList(Of XYZ), _ weights As IList(Of Double) _ ) As Curve |
Visual C++ |
---|
public: static Curve^ CreateCurve( IList<XYZ^>^ controlPoints, IList<double>^ weights ) |
Parameters
- controlPoints
- Type: System.Collections.Generic..::..IList<(Of <(<'XYZ>)>)>
The control points of the NURBSpline.
- weights
- Type: System.Collections.Generic..::..IList<(Of <(<'Double>)>)>
The weights of the NURBSpline.
Return Value
The new Curve object.
Remarks
There must be at least 2 control points.
The number of weights must be equal to the the number of control points.
The values of all weights must be positive.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The number of control points must be at least 2. -or- The number of weights must be the same as the number of control points and all weights must be positive. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..ArgumentsInconsistentException | Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance). |