Creating Model Components and Model Object Nodes
A model contains one or more model components. You can create a model component using the following command:
model.modelNode().create("comp1", true);
The second argument is a boolean that determines whether separate geometry, mesh, material, and spatial frames should be created. If unsure whether these frames will be needed, it is recommended to set this value to true to ensure they are included.
The component is given a definite spatial dimension when you create a geometry node:
model.geom().create("geom1", 2);
where the second argument can be 0, 1, 2, or 3, depending on the spatial dimension. In the example above, the spatial dimension is 2.
In addition to creating model components and geometry nodes, there are create methods for many of the nodes in the model tree.
Whether the geometry should be interpreted as being axisymmetric or not is determined by a Boolean property that you can assign as follows:
boolean makeaxi = true;
model.geom("geom1").axisymmetric(makeaxi);
The axisymmetric property is only applicable to models of spatial dimension 1 or 2.
Using the Model Wizard, if you first create a Blank Model and then add a component using the Model Builder, you will be prompted to choose the space dimension of the component. This operation will, in addition to creating a component, also create a Geometry and Mesh node. For example, creating a 2D component corresponds to the following lines of code:
model.component().create("comp1", true);
model.component("comp1").geom().create("geom1", 2);
model.component("comp1").mesh().create("mesh1");