EvaluateCurveAt
 
 
 

EvaluateCurveAt

Description

Evaluate the curve position, tangency, and normal at a given length or ratio.

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

EvaluateCurveAt( InputObj, Value, [Local], [PosX], [PosY], [PosZ], [TanX], [TanY], [TanZ], [NorX], [NorY], [NorZ] );

Parameters

Parameter Type Description
InputObj String Curve to evaluate.
Value Double A percentage or a length, depending on the value of the Percentage parameter.
Local Boolean True to evaluate at a certain percentage along the curve, False to evaluate at a specific length.

Default Value: False

PosX Double Returns the X component of the postion of the evaluated point
PosY Double Returns the Y component of the Postion of the evaluated point
PosZ Double Returns the Z component of the Postion of the evaluated point
TanX Double Returns the X component of the Tangent of the evaluated point
TanY Double Returns the Y component of the Tangent of the evaluated point
TanZ Double Returns the Z component of the Tangent of the evaluated point
NorX Double Returns the X component of the Normal of the evaluated point
NorY Double Returns the Y component of the Normal of the evaluated point
NorZ Double Returns the Z component of the Normal of the evaluated point

Examples

VBScript Example

'This example shows how to evaluate a curve by percentage.
newscene
dim posx, posy, posz, tanx, tany, tanz, normx, normy, normz
CreatePrim "Spiral", "NurbsCurve"       
' Evaluate at a point 50% along the curve length
set rtn = EvaluateCurveAt( "Spiral", .5, True, posx, posy, posz, tanx, tany, tanz, normx, normy, normz )        
logmessage "Position : ("& posx & ", " & posy & ", " &  posz & ")"
logmessage "tangent  : ("& tanx & ", " & tany & ", " &  tanz & ")"
logmessage "Normal   : ("& normx & ", " & normy & ", " &  normz & ")"

See Also

CreateCurve GetCurveLength GetCurvePercentageAtKnotIndex GetNumberOfKnots SISetCurvePoints SIAddPointOnCurveAtStart SIAddPointOnCurveAtEnd SIAddPointOnCurve SICreateCurve NurbsCurve.EvaluatePosition NurbsCurveList.GetClosestCurvePosition2