GetCurvePercentageAtKnotIndex

Description

Get the percentage of the curve length at a given knot.

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

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

For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).

Scripting Syntax

GetCurvePercentageAtKnotIndex( InputObj, Index, [Percentage] )

Parameters

Parameter

Type

Description

InputObj

String

Curve to evaluate.

Index

Integer

Knot index. Knots are indexed starting at 0.

Percentage [out]

Double

Returns the percentage of the curve length at the given knot.

Examples

VBScript Example

'This example shows how to get the percentage with respect to the length of a curve.
newscene
dim perc
CreatePrim "Spiral", "NurbsCurve"
   'Get the percentage at the third knot (knot index = 2)
GetCurvePercentageAtKnotIndex "Spiral", 2, perc 
logmessage "Percentage is: " & perc

See Also

GetCurveLength

GetNumberOfKnots

EvaluateCurveAt



Autodesk Softimage v7.5