RVTDocs.com

NurbsSurfaceData.Create

Method
Description:
Construct NurbsSurfaceData based on NURBS surface data, where the weights are supplied. The NURBS surface will be (piecewise) polynomial if all the weights are equal, rational if not.
Syntax
public static NurbsSurfaceData Create(
	int degreeU,
	int degreeV,
	IList<double> knotsU,
	IList<double> knotsV,
	IList<XYZ> controlPoints,
	IList<double> weights,
	bool bReverseOrientation
)
Parameters
Parameter Type Description
degreeU Int32 The degree of the spline in the u-direction; must be positive.
degreeV Int32 The degree of the spline in the v-direction; must be positive.
knotsU IList Knot values in the u-direction. The number of knots in the u-direction must be at least 2 * (degreeU + 1).
knotsV IList Knot values in the v-direction. The number of knots in the v-direction must be at least 2 * (degreeV + 1).
controlPoints IList One dimensional array of points representing the two dimensional net of control points of the NURBS surface in u and v directions. <p> The total number of control points must equal numControlPtsU times numControlPtsV, where numControlPtsU and numControlPtsV are the numbers of control points in u and v directions, and they must satisfy the following conditions: <ul><li> numControlPtsU = number of knots in u - degreeU - 1. </li><li> numControlPtsV = number of knots in v - degreeV - 1. </li></ul> The convention for 2d (idxU, idxV) to 1d (idx) conversion of array indexes: idxV first. That is, idxU is outer loop and idxV is inner loop. In other words, idx = idxU * numControlPtsV + idxV. </p>
weights IList Array of weights assigned to the control points. The number of weights must equal the number of control points. All weights should be greater than zero.
bReverseOrientation Boolean If true, the surface's orientation is opposite to the canonical parametric orientation, otherwise it is the same. The canonical parametric orientation is a counter-clockwise sense of rotation in the uv-parameter plane. Extrinsically, the oriented normal vector for the canonical parametric orientation points in the direction of the cross product dS/du x dS/dv, which S(u, v) is the parameterized surface.
Return Value
Exceptions
Exception Condition
ArgumentException The U-degree value must be at least 1. -or- The V-degree value must be at least 1. -or- The number of knots in the U direction must be at least 2 times the U-degree plus 1. -or- The number of knots in the V direction must be at least 2 times the V-degree plus 1. -or- The number of control points must equal (number of U-knots - U-degree - 1) * (number of V-knots - V-degree - 1). -or- The number of weights must be the same as the number of control points and all weights must be positive or all zero.
ArgumentNullException A non-optional argument was null