NurbSplineCreateCurve(IListXYZ, IListDouble) Method |
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: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Curve CreateCurve(
IList<XYZ> controlPoints,
IList<double> weights
)
Public Shared Function CreateCurve (
controlPoints As IList(Of XYZ),
weights As IList(Of Double)
) As Curve
public:
static Curve^ CreateCurve(
IList<XYZ^>^ controlPoints,
IList<double>^ weights
)
static member CreateCurve :
controlPoints : IList<XYZ> *
weights : IList<float> -> Curve
Parameters
- controlPoints IListXYZ
-
The control points of the NURBSpline.
- weights IListDouble
-
The weights of the NURBSpline.
Return Value
Curve
The new Curve object.
ExceptionsException | 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).
|
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.
See Also