SIAddPointOnCurve

Description

Adds a point afer an existing point on a curve, or adds a knot at a specified percentage of the curve length.

Scripting Syntax

SIAddPointOnCurve( InputObj, [InsertPosition], [X], [Y], [Z], [Local], [CurveType] );

Parameters

Parameter Type Description
InputObj String Curve to set points on.
InsertPosition Double Where to insert the point or knot.

Default Value: 0

Possible Values:

Description:

Indexofanexistingpointonthecurve. The new point is added after this point. Points are indexed starting at 0.
Percentage The new knot is inserted at this percentage along the curve length, at the specified coordinates.
X Double X coordinate

Default Value: 0

Y Double Y coordinate

Default Value: 0

Z Double Z coordinate

Default Value: 0

Local Boolean True if points are in local coordinates, False if they are in global coordinates.

Default Value: False

CurveType Integer Type of curve

Default Value: -1

Examples

VBScript Example

'This example shows how to add a point in the middle of a curve

newscene

'Create a curve by adding points at the end

SICreateCurve "crvlist", 3, 0

SIAddPointOnCurveAtEnd "crvlist", -4.0, 0, 1.6, False

SIAddPointOnCurveAtEnd "crvlist", -3.9, 0, -0.3, False

SIAddPointOnCurveAtEnd "crvlist", -2.3, 0, 0.2, False

SIAddPointOnCurveAtEnd "crvlist", -1.9, 0, -2.2, False

SIAddPointOnCurveAtEnd "crvlist", -0.1, 0, -0.9, False

SIAddPointOnCurveAtEnd "crvlist", 0.4, 0, 0.6, False

SIAddPointOnCurveAtEnd "crvlist", 3, 0, -1.7, False

SIAddPointOnCurveAtEnd "crvlist", 3.7, 0, -1.8, False

'Add a point after the fourth control point (indexing is 0 based)

SIAddPointOnCurve "crvlist", 3 , 1.0, 2.0, 3.0, 0

' Add a knot at 0.72 (normalized value between 0 and 1)

SIAddPointOnCurve "crvlist", 0.72, 2.0, 3.0, 4.0, 0

See Also

CreateCurve SISetCurvePoints SICreateCurve SIAddPointOnCurveAtEnd GetCurveLength SIAddPointOnCurveAtStart EvaluateCurveAt