Converts an implicit primitive to a geometry type.
Warning: The implicit primitives must be compatible with the
geometry types.
Note: This command uses output
arguments. C# and some scripting languages (such as JScript,
PerlScript and Python) don't support arguments passed by reference.
However, this command also returns an XSICollection containing the
output arguments.
oReturn = SIConvert( Target, Source, CreatedObj, OutputObj ); |
Returns an XSICollection that contains the created converter Operator and the newly created geometric Primitive object wrapped in an XSICollection.
| Parameter | Type | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Target | String | name of the output geometry
|
||||||||||
| Source | String | Object to convert | ||||||||||
| CreatedObj | Operator | Returns the converter operator | ||||||||||
| OutputObj | XSICollection containing the Primitive | Returns the primitive. |
' This example shows how to convert an implicit sphere to a mesh sphere
NewScene , false
dim lCreated, oImplicitSphere
' Create implicit sphere
set oImplicitSphere = GetPrim("Sphere")
' Implicit sphere becomes a mesh.
' SIConvert returns more information than Convert.
' The return collection is consulted instead of the return parameters
' because it is more scripting language neutral.
set lCreated = SIConvert( "MeshSurface", oImplicitSphere )
'Log the following information:
'INFO : "2 elements in collection."
'INFO : "First object is an Operator"
'INFO : "Second object is an Object"
LogMessage lCreated.Count & " elements in collection."
LogMessage "First object is an " & typename( lCreated(0))
LogMessage "Second object is an " & typename( lCreated(1))
|