Creates a new geometric NURBSpline object.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- controlPoints
- Type: System.Collections.Generic IList XYZ
The control points of the NURBSpline.
- weights
- Type: System.Collections.Generic IList Double
The weights of the NURBSpline.
- knots
- Type: System.Collections.Generic IList Double
The knots of the NURBSpline.
- degree
- Type: System Int32
The degree of the NURBSpline.
- closed
- Type: System Boolean
True if the NURBSpline should be closed, false otherwise.
- rational
- Type: System Boolean
True if the NURBSpline is rational, false if it is irrational.
Return Value
The new NURBSpline object.Remarks
Degree must be 3 or greater. If rational, the control points and weights array must be the same size. There must be at least degree+1 control points. The size of knots must equal the sum of degree, the size of the controlPoints array and 1. The first degree+1 knots should be identical, as should the last degree+1 knots. The knots in the middle of the sequence must be non-decreasing.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | Degree must be >= 3. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions ArgumentsInconsistentException | For a rational NurbSpline, the weights array must be the same size as the control points array. -or- The control points array must contain at least degree + 1 points, and if closed, the first and last points in the control points array must be identical. -or- The size of knots must equal the sum of degree, the size of the controlPoints array and 1. The first degree+1 knots should be identical, as should the last degree+1 knots. The knots in the middle of the sequence must be non-decreasing. -or- Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance). |