GetTrim (NurbsSurface) *
Description
Returns a complete data description of a nurbs surface trim. A trim is a nurbs curve list that is projected on a nurbs surface.
Note: This method uses output arguments. C# and some scripting languages (such as JScript and PerlScript) don't support arguments passed by reference. However, there is a alternate version of this method which is considered safe to use with C#, JScript and PerlScript: NurbsSurface.GetTrim2.
Scripting Syntax
NurbsSurface.GetTrim( TrimIndex, [NurbsFormat], IsBoundary, ProjectionType, Count, ControlPoints, [NbControlPoints], [Knots], [NbKnots], [Closed], [Degree], [Parameterization] )
C# Syntax
NurbsSurface.GetTrim( Int32 in_nTrimIndex, siNurbsFormat in_eNurbsFormat, Object& out_vsabIsBoundary, Object& out_vsalProjectionType, Object& out_vsalCount, Object& out_vsaControlPoints, Object& out_vsaNbControlPoints, Object& out_vsadKnots, Object& out_vsaNbKnots, Object& out_vsasClosed, Object& out_vsalDegree, Object& out_vsalParameterization );Parameters
|
Parameter |
Type |
Description |
|
TrimIndex |
Specifies which trim must be described. |
|
|
NurbsFormat |
Specifies how the data is formatted. Default Value: siSINurbs |
|
|
IsBoundary [out] |
Specifies whether the trim is a boundary. |
|
|
ProjectionType [out] |
Specifies the projection type of this trim. Possible Values: • 0: UV space • 1: World space |
|
|
Count [out] |
Number of nurbs curve in the trim |
|
|
ControlPoints [out] |
2D Array |
The control points are stored in a 2 dimensional array. The array is a 4 x Number of ControlPoints |
|
NbControlPoints [out] |
Specifies the number of ControlPoints per NurbsCurve. |
|
|
Knots [out] |
An array of knot values. |
|
|
NbKnots [out] |
Specifies the number of Knots per nurbs curve. |
|
|
Closed [out] |
Specifies whether the nurbs curve is closed . Default Value: False |
|
|
Degree [out] |
Degree of the nurbs curves. Default Value: 3 |
|
|
Parameterization [out] |
The parameterization factor of the nurbs curve. |
Examples
VBScript Example
Dim lDegree, bClosed, eParameterization, aControlVertex, aKnots, lCount, aNbControlVertex, bIsBoundary, lProjType set oRoot = application.activeproject.activescene.root set oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" ) ' extract each trim contained in the surface for i = 0 to (oSphere.ActivePrimitive.Geometry.Surfaces.Item(0).TrimCount - 1) oSphere.ActivePrimitive.Geometry.Surfaces.Item(0).GetTrim _ i, _ siSINurbs, _ bIsBoundary, _ lProjType, _ lCount, _ aControlVertex, _ aNbControlVertex, _ aKnots , _ aNbKnots, _ bClosed, _ lDegree, _ eParameterization oRoot.AddNurbsCurveList2 _ lCount, _ aControlVertex, _ aNbControlVertex, _ aKnots, _ aNbKnots, _ bClosed, _ lDegree, _ eParameterization, _ siSINurbs next
See Also
Autodesk Softimage v7.5