Adds a trimmed surface to the mesh.
oReturn = NurbsSurfaceMesh.AddSurfaceWithTrim( [ControlPoints], [UKnots], [VKnots], [UClosed], [VClosed], [UDegree], [VDegree], [UParam], [VParam], [NurbsFormat], [NbTrim], [IsBoundary], [ProjectionType], [NbCurve], [CurveControlPoints], [CurveNbControlPoints], [CurveParam], [CurveKnots], [CurveNbKnots], [CurveDegree], [CurveClosed] ); |
Parameter | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
ControlPoints | 1D or 3D Array | The control points used for creating the nurbs surface. The control points can be stored in a 1-dimensional array or in a 3-dimensional matrix (UxVx4) of x,y,z,w values. The 1 dimensional array should contain the number of points in U and V at the beginning followed by a sequence of x,y,z,w values e.g. {U,V,Xo,Yo,Zo,...X(uv-1),Y(uv-1),Z(uv-1),W(uv-1)}. | ||||||
UKnots | Array of Doubles | A vector of knot values in the U direction. | ||||||
VKnots | Array of Doubles | An array of knot values in the V direction. | ||||||
UClosed | Boolean | Specifies whether the nurbs surface is closed or not in U
direction.
Default Value: false |
||||||
VClosed | Boolean | Specifies whether the nurbs surface is closed or not in V
direction.
Default Value: false |
||||||
UDegree | Long | Degree of the nurbs surface in U direction.
Default Value: 3 |
||||||
VDegree | Long | Degree of the nurbs surface in V direction.
Default Value: 3 |
||||||
UParam | siKnotParameterization | The parameterization factor of the nurbs surface in U
direction.
Default Value: siNonUniformParameterization |
||||||
VParam | siKnotParameterization | The parameterization factor of the nurbs surface in V
direction.
Default Value: siNonUniformParameterization |
||||||
NurbsFormat | siNurbsFormat | Specifies how the data is formatted.
Default Value: siSINurbs |
||||||
NbTrim | Long | Specifies how many trims this surface contains.
Default Value: 0 |
||||||
IsBoundary | Array of Booleans | Specifies whether each trim is a boundary. | ||||||
ProjectionType | Array of Longs | Specifies the projection type of each trim. Each member of the
array maps to a single trim, so the array is actually a combination
of the possible values (0 and 1).
|
||||||
NbCurve | Array of Longs | Number of nurbs curves in each trim | ||||||
CurveControlPoints | 2D Array of 2D Array | Array where each set of control points is stored in a 2-dimensional array. The array is 4 x Number of ControlPoints. | ||||||
CurveNbControlPoints | Array of Array of Longs | Specifies the number of ControlPoints per NurbsCurve per trim. | ||||||
CurveParam | Array of Array of siKnotParameterization values | The parameterization factor of the nurbs curve for each trim. | ||||||
CurveKnots | Array of Array of Doubles | An array of knot values for each trim. | ||||||
CurveNbKnots | Array of Array of Longs | Specifies the number of Knots per nurbs curve per trim. | ||||||
CurveDegree | Array of Array of Longs | Degree of the nurbs curves for each trim.
Default Value: 3 |
||||||
CurveClosed | Array of Array of Booleans | Specifies whether the nurbs curve is closed for each trim.
Default Value: False |
' This example creates a sphere with a circular trim Dim lDegree(2), bClosed(2), eParameterization(2), aControlPoints, aKnots(2) ' Extract data from a sphere nurbs surface set oRoot = Application.activeproject.activescene.root set oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" ) oSphere.ActivePrimitive.Geometry.Surfaces(0).Get _ siSINurbs, _ aControlPoints, _ aKnots(siUDirection),aKnots(siVDirection) , _ bClosed(siUDirection),bClosed(siVDirection), _ lDegree(siUDirection),lDegree(siVDirection), _ eParameterization(siUDirection),eParameterization(siVDirection) ' Extract data from a cricular curve for the trim set oCurve = CreatePrim("Circle", "NurbsCurve") Dim lCDegree, bCClosed, eCParameterization, aCControlVertex, aCKnots, lCCount, aCNbControlVertex oCurve.ActivePrimitive.geometry.get _ siSINurbs, _ lCCount, _ aCControlVertex, _ aCNbControlVertex, _ aCKnots , _ aCNbKnots, _ bCClosed, _ lCDegree, _ eCParameterization ' Create the trimmed surface set oNew = oRoot.AddNurbsSurfaceMesh oNew.ActivePrimitive.Geometry.AddSurfaceWithTrim _ aControlPoints, _ aKnots(siUDirection),aKnots(siVDirection) , _ bClosed(siUDirection),bClosed(siVDirection), _ lDegree(siUDirection),lDegree(siVDirection), _ eParameterization(siUDirection),eParameterization(siVDirection), _ siSINurbs, _ 1, _ array(True), _ array(0), _ array(lCCount), _ array(aCControlVertex), _ array(aCNbControlVertex), _ array(eCParameterization), _ array(aCKnots) , _ array(aCNbKnots), _ array(lCDegree), _ array(bCClosed) |