SplitEdge

Introduced

v1.5

Description

Splits a set of edges.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference. Normally you can get the output arguments via either XSIApplication.ExecuteCommand method (C#) or the ISIVTCollection (scripting languages), but this command already returns a value.

The only available workaround in this case is to create a VBScript custom command which returns both the output arguments and the return value in one array. For details, see What Happens when the Function Already Returns a Value?.

Scripting Syntax

oLong = SplitEdge( [ConnectionSet], [Ratio], [EdgeParallelLoop], [EdgeConnect], [ImmediateMode], [NewPointID] );

Return Value

Returns the ID of the new point created by the operation as a Long (or existing point if ratio=0 or 100)

Parameters

Parameter Type Description
ConnectionSet ConnectionSet Specifies the edges to split. 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.

Ratio Double Ratio where to split the input edges

Default Value: 50

Possible Values:

Description:

0 The input edges will be split using this ratio
EdgeParallelLoop Boolean To split all edges parallel to the input edges as well

Default Value: False

EdgeConnect Boolean If true, connect the points resulting from the splitting of multiple parallel edges

Default Value: True

ImmediateMode siOperationMode Specifies whether or not the operator should be immediately frozen.

Default Value: siPersistentOperation

NewPointID Integer ID of the new point created by the operation (-1 is returned if more than one edge)

Examples

VBScript Example

' Create a cylinder and split all the edges around the top half of the cylinder

NewScene

CreatePrim "Cylinder", "MeshSurface"

SplitEdge "cylinder.edge[11]", 69.242, False, True

SplitEdge "cylinder.edge[9]", 70.716, False, True

SplitEdge "cylinder.edge[23]", 39.692, False, True

SplitEdge "cylinder.edge[67]", 17.186, False, True

SplitEdge "cylinder.edge[34]", 38.324, False, True

SplitEdge "cylinder.edge[45]", 25.924, False, True

SplitEdge "cylinder.edge[56]", 56.322, False, True

SplitEdge "cylinder.edge[78]", 44.641, False, True

See Also

AddEdge