Introduced
1.5
Description
Adds an edge between an existing point and a "virtual" point somewhere on an edge.
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
AddEdge( [ConnectionSet], [Ratio], [ImmediateMode], [NewPointID], [NewEdgeID] )
Parameters
|
Parameter |
Type |
Description |
|
ConnectionSet [in/out] |
Specifies the point and the edge (two elements, in this order) to connect. See Operator Presets for details on the connection set required for this operator. Default Value: Currently selected components are used. 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 |
ratio where to split the input edge Possible Values: • 0: The new edge will be connected to the start point of the input edge • 0<r<100: The input edge will be split using this ratio before adding the new edge • 100: The new edge will be connected to the end point of the input edge |
|
|
ImmediateMode [in/out] |
Specifies whether or not the operator should be immediately frozen. Default Value: siPersistentOperation |
|
|
NewPointID [out] |
ID of the new point created by the operation (or existing point if ratio=0 or 100) |
|
|
NewEdgeID [out] |
ID of the new edge created by the operation |
Return Value
Returns the ID of the new point created by the operation as a Long (or existing point if ratio=0 or 100)
Examples
VBScript Example
' Create a cylinder and add an edge loop around the top half of the cylinder CreatePrim "Cylinder", "MeshSurface" SplitEdge "cylinder.edge[11]", 58.529, False, True AddEdge "cylinder.pnt[42];cylinder.edge[9]", 52.338, True AddEdge "cylinder.pnt[43];cylinder.edge[23]", 31.911, True AddEdge "cylinder.pnt[44];cylinder.edge[34]", 50.164, True AddEdge "cylinder.pnt[45];cylinder.edge[45]", 38.716, True AddEdge "cylinder.pnt[46];cylinder.edge[56]", 37.706, True AddEdge "cylinder.pnt[47];cylinder.edge[67]", 54.800, True AddEdge "cylinder.pnt[48];cylinder.edge[78]", 27.452, True AddEdge "cylinder.pnt[LAST];cylinder.edge[90]", 0.000, True
See Also
Autodesk Softimage v7.5