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.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public static Curve CreateCurve( IList<XYZ> controlPoints, IList<double> weights )
Parameters
- controlPoints IList<XYZ>
- The control points of the NURBSpline.
- weights IList<Double>
- The weights of the NURBSpline.
Return Value
CurveThe new Curve object.
Exceptions
Exception | Condition |
---|---|
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. |
ArgumentNullException | A non-optional argument was NULL |
ArgumentsInconsistentException | Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance). |