DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="2.19.0-beta5912" />

 NurbsSurface

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

Returns surface degree in the U direction.

public int DegreeV { get; }

Returns 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; }

Determines whether the NurbsSurface is rational or not. This defines whether any of the weights are not 1.0. Returns True if surface is rational, false if its not.

public int NumControlPointsU { get; }

Returns number of control Points in the U direction.

public int NumControlPointsV { get; }

Returns 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()

Returns surface knots in U direction. Knots is a series of parameter values (doubles) used to determine where and how the control points affect the surface.

public double[] VKnots()

Returns surface knots in V direction. Knots is a series of parameter values (doubles) used to determine where and how the control points affect the surface.

public double[][] Weights()

Returns NurbsSurface control point weights. Weights will determine the influence applied by each of the control points on the shape of the surface.