Description
Creates an implicit primitive and converts it to a given geometry type. Contrary to implicit primitives, converted primitives have explicit geometry elements that can be manipulated, ex.: control points, edges, polygons...
Note: The implicit primitives must be compatible with the geometry types.
Scripting Syntax
CreatePrim( PresetObj, GeometryType, [Name], [Parent] )
Parameters
|
Parameter |
Type |
Description |
|
PresetObj |
String or a preset object (see SIGetPreset) |
|
|
GeometryType |
Geometry type Possible Values: • NurbsCurve: Convert primitive to a Nurbs curve • NurbsSurface: Convert primitive to a Nurbs surface • MeshSurface: Convert primitive to a Mesh surface |
|
|
Name |
Name of the new object. |
|
|
Parent |
Name of an existing object to use as the parent of the new primitive. |
Return Value
Returns the primitive object (usually an X3DObject object).
Examples
VBScript Example
'This example creates a new primitive newscene dim nurbssphere, meshsphere 'Create a nurbs sphere and name it aSphere. Assign to variable nurbssphere set nurbssphere = CreatePrim( "Sphere", "NurbsSurface", "aSphere" ) 'Create a mesh sphere and name it bSphere. Assign to variable meshsphere. 'Make bSphere child of aSphere set meshsphere = CreatePrim( "Sphere", "MeshSurface", "bSphere", "aSphere" ) 'Logged information: 'INFO : "Sphere information: X3DObject polymsh" logmessage "Sphere information: " & typename( meshsphere) & " " & meshsphere.type
See Also
SOFTIMAGE|XSI v6.01