SetCurveKnotMultiplicity
 
 
 

SetCurveKnotMultiplicity

Introduced

v5.0

Description

Sets the multiplicity of a knot at the specified curve location. (Raising the multiplicity of a knot adds more control points thus enabling more discontinuity control.) If the new multiplicity is zero the knot is completely removed.

Scripting Syntax

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

Return Value

Returns an XSICollection containing the new SetNurbsCrvKnotMultiplicity Operator.

Parameters

Parameter Type Description
ConnectionSet ConnectionSet Specifies the knots to set the new multiplicity.

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:

0 Knot is completely removed
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 a knot and changes its multiplicity
' 
NewScene, false
SICreateCurve "crvlist", 3, 0
SIAddPointOnCurveAtEnd "crvlist", -4.4368932038835, -0.845035244491313, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -4.47572815533981, 2.74879280679358, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -1.07766990291262, 2.69051451407004, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", -0.572815533980583, -1.07814841538547, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 2.80582524271845, -1.03929622023644, 0, False, 0
SIAddPointOnCurveAtEnd "crvlist", 4.28155339805825, 2.78764500194261, 0, False, 0
SetSelFilter "Knot"
SelectObj "crvlist.knot[1]"
SetCurveKnotMultiplicity , 3

2. JScript Example

/*
        This example creates a simple curve, selects a knot and changes its multiplicity
*/
NewScene(null, false);
SICreateCurve("crvlist", 3, 0);
SIAddPointOnCurveAtEnd("crvlist", -4.4368932038835, -0.845035244491313, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -4.47572815533981, 2.74879280679358, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -1.07766990291262, 2.69051451407004, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", -0.572815533980583, -1.07814841538547, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", 2.80582524271845, -1.03929622023644, 0, false, 0);
SIAddPointOnCurveAtEnd("crvlist", 4.28155339805825, 2.78764500194261, 0, false, 0);
SetSelFilter("Knot");
SelectObj("crvlist.knot[1]", null, null);
SetCurveKnotMultiplicity(null, 3, siPersistentOperation);