DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="4.1.0-beta4200" />

 NurbsCurve

public class NurbsCurve : Curve
public int Degree { get; }

The degree of the curve

public bool IsPeriodic { get; }

Whether the NurbsCurve is periodic or not, a periodic curve is a closed curve in which deformation does not cause the appearance of kinks.

public bool IsRational { get; }

Determines whether the NurbsCurve is rational or not. This defines whether any of the weights are not 1.0.

Create a BSplineCurve by using explicit control points. NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems for extrusion, sweep, and other operations. They should be avoided. Use a PolyCurve instead. NOTE 2: If the curve is periodic (closed), then the first and last points MUST be the same.

public static NurbsCurve ByControlPoints(IEnumerable<Point> points, int degree = 3)

Create a BSplineCurve by using explicit control points. NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems for extrusion, sweep, and other operations. They should be avoided. Use a PolyCurve instead. NOTE 2: If the curve is periodic (closed), then the first and last points MUST be the same.

public static NurbsCurve ByControlPoints(IEnumerable<Point> points, int degree = 3, bool closeCurve = false)

Create a BSplineCurve by using explicit control points. NOTE 1: BSplineCurves with deg=1 have G1 discontinuities, which cause problems for extrusion, sweep, and other operations. They should be avoided. Use a PolyCurve instead. NOTE 2: If the curve is periodic (closed), then the first and last points MUST be the same.

public static NurbsCurve ByControlPointsWeightsKnots(IEnumerable<Point> points, double[] weights, double[] knots, int degree = 3)

Create a BSplineCurve by from control vertices, weights, and knots. FROM ASM DOCS: Degree: Should be greater than 1 (piecewise-linear spline) and less than 26 (the maximum B-spline basis degree supported by ASM). Weights: All weight values (if supplied) should be strictly positive. Weights smaller than 1e-11 will be rejected and the function will fail. Knots: The knot vector should be a non-decreasing sequence. Interior knot multiplicity should be no larger than degree + 1 at the start/end knot and degree at an internal knot (this allows curves with G1 discontinuities to be represented). Note that non-clamped knot vectors are supported, but will be converted to clamped ones, with the corresponding changes applied to the control point/weight data. knot array: the array size must be num_control_points + degree + 1

public static NurbsCurve ByPoints(IEnumerable<Point> points)

Create a BSplineCurve by interpolating between points.

public static NurbsCurve ByPoints(IEnumerable<Point> points, bool closeCurve = false)

Create a BSplineCurve by interpolating between points. NOTE 2: If the curve is periodic (closed), then the first and last points MUST be the same.

public static NurbsCurve ByPoints(IEnumerable<Point> points, int degree = 3)

Create a BSplineCurve by interpolating between points with specified degree.

public static NurbsCurve ByPointsTangents(IEnumerable<Point> points, Vector startTangent, Vector endTangent)

Returns a BSplineCurve through the points, with tangent directions.

public Point[] ControlPoints()

Get the control points of the NurbsCurve.

public double[] Knots()

The knots of the Curve. Knots is a series of parameter values (doubles) used to determine where and how the control points affect the curve.

The truly periodic control points of the NurbsCurve if periodic. Note that this cannot be used together with PeriodicKnots() to reconstruct the original periodic NurbsCurve. Throws (or is undefined) when the curve is not periodic.

public double[] PeriodicKnots()

The unclamped knots of the Curve if Periodic. Knots is a series of parameter values (doubles) used to determine where and how the control points affect the curve. Note that this cannot be used together with PeriodicControlPoints() to reconstruct the original periodic NurbsCurve. Throws (or is undefined) when the curve is not periodic.

public double[] Weights()

Returns NurbsCurve control point weights. Weights determine the influence of each of the control points on the shape of the curve.