NurbSplineCreateCurve(Int32, IListDouble, IListXYZ) Method |
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.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Curve CreateCurve(
int degree,
IList<double> knots,
IList<XYZ> controlPoints
)
Public Shared Function CreateCurve (
degree As Integer,
knots As IList(Of Double),
controlPoints As IList(Of XYZ)
) As Curve
public:
static Curve^ CreateCurve(
int degree,
IList<double>^ knots,
IList<XYZ^>^ controlPoints
)
static member CreateCurve :
degree : int *
knots : IList<float> *
controlPoints : IList<XYZ> -> Curve
Parameters
- degree Int32
-
The degree of the NURBSpline.
- knots IListDouble
-
The knots of the NURBSpline.
- controlPoints IListXYZ
-
The control points of the NURBSpline.
Return Value
Curve
The new Curve object.
ExceptionsException | 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).
|
Remarks
Degree must be 1 or greater.
The number of control points must be greater than degree.
The number of knots must equal the sum of degree, number of controlPoints and 1.
The distinct knot values (ignoring multiplicities) must be in increasing order.
The first degree+1 knots should be identical, as should the last degree+1 knots.
The multiplicities of other (interior) knots should be less than degree -1.
See Also