v1.5
Splits the given set of polygons using the split pattern passed as an argument
(e.g.: cross, diamond, triangles, etc).
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?.
oReturn = SplitPolygon( [ConnectionSet], [TanX], [TanY], [TanZ], [SplitPolygonType], [ImmediateMode], [NewPointID] ); |
Returns the collection of SplitPolygon operators created by the command.
Parameter | Type | Description |
---|---|---|
ConnectionSet | ConnectionSet |
Specifies the polygons to split. See Operator Presets for details on the connection set required for this operator. Default Value:
Currently selected components are used. |
TanX | Double | X parameter w/r to the local frame of the polygon(s) where to put the split point |
TanY | Double | Y parameter w/r to the local frame of the polygon(s) where to put the split point |
TanZ | Double |
Z parameter w/r to the local frame of the polygon(s) where to put the split point Default Value:
|
SplitPolygonType | siSplitPolygonType |
type of split Default Value: siUnspecified |
ImmediateMode | siOperationMode |
Specifies whether or not the operator should be immediately frozen. Default Value: siPersistentOperation |
NewPointID | Integer | ID of the new point created at (TanX,TanY) by the operation (-1 is returned if SplitPolygonType is "siDiamond..." as no point is created) |
NewScene CreatePrim "Cylinder", "MeshSurface" SplitPolygon "cylinder.poly[12-36]", 0.0, 0.0, 0.5, siByTheVertices, True |
' Create a grid and split some polygons by the Edges MidPoints NewScene CreatePrim "Grid", "MeshSurface" SetValue "grid.polymsh.geom.subdivu", 4 SetValue "grid.polymsh.geom.subdivv", 4 SplitPolygon "grid.poly[0,2,5,7,8,10,13,15]", 0.0, 0.0, 0.5, siByTheEdgesMidPoints, True |