NurbsCurveList.Set operator

Description

Sets a nurbs curve list from a complete data description. This is only available from scripted operators, if you use it on a object with some clusters and you change the topology the burden of updating the clusters is on the user. For non-scripted operators this property can only be set if the object has been frozen.

Note: This method uses output arguments. C# and some scripting languages (such as JScript and PerlScript) don't support arguments passed by reference so you need to use the best workaround for your situation:

For scripting languages this method returns an ISIVTCollection which you can use to get the output arguments.

For C# the only available workaround is to create a VBScript custom command which returns both the output arguments and the return value in one array. For details, see What Happens when the Function Already Returns a Value?.

Scripting Syntax

NurbsCurveList.Set( Count, ControlPoints, [NbControlPoints], [Knots], [NbKnots], [Closed], [Degree], [Parameterization], [NurbsFormat] );

Parameters

Parameter Type Description
Count Long Number of NurbsCurve in the NurbsCurveList.
ControlPoints 2D Array The control points are stored in a 2 dimensional array. The array is a 4 x Number of U ControlPoints
NbControlPoints Array of Long Specifies the number of ControlPoints per NurbsCurve.
Knots Array of Doubles An array of knot values.
NbKnots Array of Long Specifies the number of Knots per NurbsCurve.
Closed Array of Boolean Specifies whether the nurbs curve is closed .

Default Value: False

Degree Array of Long Degree of the nurbs curves.

Default Value: 3

Parameterization Array of siKnotParameterization The parameterization factor of the nurbs curve.
NurbsFormat siNurbsFormat Specifies how the data is formatted.

Default Value: siSINurbs

Examples

VBScript Example

Dim lDegree, bClosed, eParameterization, aControlVertex, aKnots, lCount, aNbControlVertex
set oRoot = application.activeproject.activescene.root
set oSpiral = oRoot.AddGeometry( "Spiral", "NurbsCurve" )
FreezeObj oSpiral
set oArc = oRoot.AddGeometry( "Arc", "NurbsCurve" )
oArc.ActivePrimitive.Geometry.Get _
        siSINurbs, _
        lCount, _
        aControlVertex, _
        aNbControlVertex, _
        aKnots , _
        aNbKnots, _
        bClosed, _
        lDegree, _
        eParameterization
' add arc data to  nurbs curve list.
oSpiral.activeprimitive.geometry.Set _
        lCount, _
        aControlVertex, _
        aNbControlVertex, _
        aKnots, _
        aNbKnots, _
        bClosed, _
        lDegree, _
        eParameterization, _
        siSINurbs