DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="2.12.0-beta4325" />

 NurbsSurface

public class NurbsSurface : Surface
public int DegreeU { get; }

Surface degree in the U direction.

public int DegreeV { get; }

Surface degree in the V direction.

public bool IsPeriodicInU { get; }

Returns true if the Surface is periodic in the U direction.

public bool IsPeriodicInV { get; }

Returns true if the Surface is periodic in the V direction.

public bool IsRational { get; }

Returns true if the Surface is rational.

public int NumControlPointsU { get; }

Number of control Points in the U direction.

public int NumControlPointsV { get; }

Number of control Points in the V direction.

public static NurbsSurface ByControlPoints(Point[][] controlVertices, int uDegree = 3, int vDegree = 3)

Create a NurbsSurface by using explicit control Points, with specified U and V degrees.

public static NurbsSurface ByControlPointsWeightsKnots(Point[][] controlVertices, double[][] weights, double[] knotsU, double[] knotsV, int uDegree = 3, int vDegree = 3)

Creates a NurbsSurface with specified control vertices, knots, weights, and U V degrees. There are several restrictions on the data which, if broken, will cause the function to fail and will throw an exception. Degree: Both u- and v- degree should be >= 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: Both knot vectors should be non-decreasing sequences. Interior knot multiplicity should be no larger than degree + 1 at the start/end knot and degree at an internal knot (this allows surfaces 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.

public static NurbsSurface ByPoints(Point[][] points, int uDegree = 3, int vDegree = 3)

Creates a NurbsSurface with specified interpolated points and U and V degrees. The resultant surface will pass through all of the points.

public static NurbsSurface ByPointsTangents(Point[][] points, IEnumerable<Vector> startUTangents, IEnumerable<Vector> endUTangents, IEnumerable<Vector> startVTangents, IEnumerable<Vector> endVTangents)

Creates a NurbsSurface with specified interpolated points and U and V degrees. The resultant surface will pass through all of the points. The number of tangents must match the number of points in the corresponding direction. The resultant surface will be degree 3 in both the U and V direction.

public static NurbsSurface ByPointsTangentsKnotsDerivatives(Point[][] points, IEnumerable<Vector> startUTangents, IEnumerable<Vector> endUTangents, IEnumerable<Vector> startVTangents, IEnumerable<Vector> endVTangents, double[] uKnots, double[] vKnots, IEnumerable<Vector> cornerTwistDerivatives)

Creates a NurbsSurface satisfying a collection of different surface characteristics. This is the most advanced surface fitting method. The resultant surface will pass through all of the points. The number of tangents must match the number of points in the corresponding direction. The resultant surface will be degree 3 in both the U and V direction. The corner derivatives should be second order (dP/dUdV) and should be supplied in this order [ lowU, lowV ], [ highU, lowV ], [ lowU, highV ], [ highU, highV ].

public Point[][] ControlPoints()

Returns NurbsSurface control points (poles).

public double[] UKnots()

Surface knots in U direction.

public double[] VKnots()

Surface knots in V direction.

public double[][] Weights()

Returns NurbsSurface control point weights.