Creates and adds a new geometry as child of the X3DObject. For example, you can add a new NURBS cube to the scene by using 'ActiveSceneRoot.AddGeometry "Cube", "NurbsSurface"'.
X3DObject X3DObject.AddGeometry( Object in_geomPreset, Object in_convPreset, String in_name ); |
oReturn = X3DObject.AddGeometry( Preset, [Type], [Name] ); |
Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Preset | String |
One of the presets for Geometry Primitives
or Implicit Primitives (for example,
"Sphere", "Torus", "Disc", etc.).
Note: If you specify a geometry type in the Type argument, you can only use primitive presets that can support the specified geometry as listed below. |
||||||||||||
Type | String |
Type of geometry. Default Value: Implicit object created
|
||||||||||||
Name | String | Name of child |
oRoot = Application.ActiveSceneRoot; oMeshSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" ); oNurbsSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" ); oNurbsArc = oRoot.AddGeometry( "Arc", "NurbsCurve" ); // Create an implicit object, which is the same as calling AddPrimitive() oGrid = oRoot.AddGeometry( "Arc" ); |
set oRoot = Application.ActiveProject.ActiveScene.Root set oMeshSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" ) set oNurbsSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" ) set oNurbsArc = oRoot.AddGeometry( "Arc", "NurbsCurve" ) ' Create an implicit object, which is the same as calling AddPrimitive() set oGrid = oRoot.AddGeometry( "Arc" ) |