InsertCurveKnot

Introduced

v5.0

Categories

modeling drawing

Description

Inserts a new knot with the given multiplicity at the specified curve location. A multiplicity of one will create only one CV (control vertex) for this knot but without discontinuity control (unless the curve is linear). A multiplicity of three for a cubic curve will create three CVs for this knot and thus will let you have full control of the discontinuity (creating a corner, for example).

Scripting Syntax

oReturn = InsertCurveKnot( [ConnectionSet], [Multiplicity], [ImmediateMode] );

Return Value

XSICollection of Operators.

Note: If the ImmediateMode parameter is set to siImmediateOperation, no operators are returned.

Parameters

Parameter Type Description
ConnectionSet ConnectionSet Specifies the curve location for inserting the new knot. See OpPreset for details on the connection set required for this operator.

Default Value: Currently selected components.

Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts.

Multiplicity Integer Multiplicity of the knots

Default Value: 1

Possible Values:

Description:

1 Simple Knot (Bezier-like knot for a nurbs linear curve)
2 Double Knot (Bezier-like knot for a nurbs quadratic curve)
3 Triple Knot (Bezier-like knot for a nurbs cubic curve)
ImmediateMode siOperationMode Specifies whether or not the operator should be immediately frozen.

Default Value: siPersistentOperation

Examples

1. VBScript Example

' 
'       This example creates a simple curve, selects an isopoint, and creates a bezier-knot
'       at this location.
' 
SICreateCurve "crvlist", 3, 0
SIAddPointOnCurveAtEnd "crvlist", -4, 2, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -5, -2, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -2, -2, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -1, 2, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 2, 2, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 2, -2, 0, False, 0
SetSelFilter "Isopoint"
SelectObj "crvlist.isopnt[(0,0.489)]"
InsertCurveKnot "crvlist.isopnt[(0,0.489)]", 3, siPersistentOperation

2. JScript Example

/*
        This example creates a simple curve, selects an isopoint, and creates a bezier-knot
        at this location.
*/
SICreateCurve("crvlist", 3, 0);
SIAddPointOnCurveAtEnd("crvlist", -4, 2, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -5, -2, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -2, -2, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -1, 2, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", 2, 2, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", 2, -2, 0, false, 0);
SetSelFilter("Isopoint");
SelectObj("crvlist.isopnt[(0,0.489)]", null, null);
InsertCurveKnot("crvlist.isopnt[(0,0.489)]", 3, siPersistentOperation);

See Also

InsertNurbsCrvKnot