Get2 (NurbsCurve) *

Description

Returns a complete data description of the Nurbs Curve. The data is returned in a 1-dimensional array and is ordered the same as the NurbsCurve.Get method output arguments.

Note: This method must be used with scripting languages that don't support arguments passed by reference such as JScript and PerlScript. For more information on getting output arguments, see About Output Argument Arrays.

Scripting Syntax

    NurbsCurve.Get2( [NurbsFormat] )

C# Syntax

    Object NurbsCurve.Get2( siNurbsFormat in_eNurbsFormat );

Parameters

Parameter | Type | Description
NurbsFormat | siNurbsFormat | Specifies how the data is formatted. Default Value: siSINurbs

Return Value

Array ordered as ControlPoints, Knots, Closed, Degree, Parameterization

Examples

JScript Example

    /*
       This example demonstrates how to retrieve the output arguments
       returned by NurbsCurve.Get2
    */
    var oRoot = Application.ActiveProject.ActiveScene.Root;
    var oArc = oRoot.AddGeometry( "Arc", "NurbsCurve" );

    // convert VB array to JScript array
    var vbArgs = new VBArray(oArc.ActivePrimitive.Geometry.Curves(0).Get2( siSINurbs ))
    var args = vbArgs.toArray();

    // get the control points
    var vbArg0 = new VBArray(args[0]);
    var cpoints = vbArg0.toArray();
    LogMessage("control points: " + cpoints.length );
    for (i = 0; i < cpoints.length; i++)
    {
       LogMessage("cpoints " + i + ": " + cpoints[i] );
    }

    // get the knots
    var vbArg1 = new VBArray(args[1]);
    var knots = vbArg1.toArray();
    LogMessage("knots: " + knots.length );
    for (i = 0; i < knots.length; i++)
    {
       LogMessage("knots " + i + ": " + knots[i] );
    }

    // get nurbs closeness state
    LogMessage("closed: " + args[2] );

    // get nurbs degree
    LogMessage("degree: " + args[3] );

    // get nurbs parameterization factor
    LogMessage("parameterization: " + args[4] );

See Also

NurbsCurve.Get

Autodesk Softimage v7.5