model.component(<ctag>).geom(
<tag>).feature(
<ftag>).selection(
property).
selMethod;
model.component(<ctag>).geom(
<tag>).feature(
<ftag>).getAllowedPropertyValues(
property);
model.geom(<gtag>).feature(
<ftag>).geom().run(
<ftag2>);
model.component(<ctag>).geom(<tag>) returns a geometry sequence consisting of geometry features. The geometry sequence also contains geometry objects resulting from building the geometry sequence.
model.component(<ctag>).geom().create(<tag>,<sdim>) creates a geometry sequence of space dimension
<sdim> and assigns it the tag
<tag>.
model.component(<ctag>).geom().create(<tag>,<meshtag>,<filename>) creates a geometry sequence tagged
<tag> and a corresponding meshing sequence tagged
<meshtag>. The parameter
<filename> specifies a file that contains a geometry or a mesh, and an import feature is inserted into the geometry or meshing sequence.
model.component(<ctag>).geom().remove(<tag>) deletes the geometry tagged
<tag>.
model.geom(<tag>).model(<mtag>) sets the model component node of the geometry
<tag> to
<mtag>.
String mtag = model.geom(<tag>).model() returns the model component node tag of the geometry.
model.component(<ctag>).geom(<tag>).axisymmetric(boolean) indicates if the geometry is axisymmetric. This is only applicable for 1D and 2D geometries.
model.component(<ctag>).geom(<tag>).isAxisymmetric() returns
true if the geometry is axisymmetric and
false otherwise.
model.component(<ctag>).geom(<tag>).lengthUnit(<unit>) sets the length unit.
String unit = model.component(<ctag>).geom(<tag>).lengthUnit() returns the length unit.
model.component(<ctag>).geom(<tag>).angularUnit(<unit>) sets the angular unit.
String unit = model.component(<ctag>).geom(<tag>).angularUnit() returns the angular unit.
model.component(<ctag>).geom(<tag>).scaleUnitValue(boolean) sets the geometry to scale property values when units are changed.
model.component(<ctag>).geom(<tag>).scaleUnitValue() returns true if the geometry is set to scale property values when units are changed.
model.component(<ctag>).geom(<tag>).repairTol(<relTol>) sets the default relative repair tolerance to use when creating new features.
double relTol = model.component(<ctag>).geom(<tag>).repairTol() returns the default relative repair tolerance.
model.component(<ctag>).geom(<tag>).geomRep(geomrep) sets the geometry representation to use in a 3D geometry. The
geomrep string can be
comsol, meaning the COMSOL kernel or
cadps (requires the CAD Import Module), meaning the CAD kernel (Parasolid).
String geomrep = model.component(<ctag>).geom(<tag>).geomRep() returns the geometry representation.
model.component(<ctag>).geom(<tag>).useConstrDim(enable) enables or disables the constraints and dimensions functionality in a 2D geometry (requires the Design Module).
boolean enabled = model.component(<ctag>).geom(<tag>).useConstrDim() returns true if the constraints and dimensions functionality is enabled.
model.component(<ctag>).geom(<tag>).constrDimBuild(value) determines what constraint and dimension features to use when building a 2D geometry (requires the Design Module). Valid values are:
•
|
"all": All (enabled) constraint and dimension features are used. This is the default.
|
•
|
"none": No constraint and dimension features are used.
|
•
|
"uptotarget": All (enabled) constraint and dimension features up to the feature to build are used.
|
String value = model.component(<ctag>).geom(<tag>).constrDimBuild() returns the constraints and dimensions to use when building. The default is
"all".
String status = model.component(<ctag>).geom(<tag>).constrDimStatus() gets a description of the overall status of the constraints and dimensions in a 2D geometry (requires the Design Module).
model.component(<ctag>).geom(<tag>).create(<ftag>,type) adds a geometry feature
<ftag> of type
type to the geometry
<tag>, after the current feature.
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>) sets a property in the geometry feature
<ftag>. All data types listed in
Table 2-4 are supported; the applicable data types differ between the properties. String expressions can use parameters from
model.param().
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property) returns the value of a property in the geometry feature
<ftag>.
model.component(<ctag>).geom(<tag>).feature(<ftag>).selection(property).
selMethod manages the geometry object selection property
property. The available selection methods are described in
Geometry Object Selection Methods.
model.component(<ctag>).geom(<tag>).feature(<ftag>).geom().geomMethod manipulates the 2D geometry sequence corresponding to the work plane feature
<ftag>. The available methods are the same as for a 2D geometry
model.geom(
<gtag>).
model.component(<ctag>).geom(<tag>).feature(<ftag>).active(false) disables the feature
<ftag>.
model.component(<ctag>).geom(<tag>).feature(<ftag>).active(true) enables the feature
<ftag>.
model.component(<ctag>).geom(<tag>).feature(<ftag>).isActive() returns
true if the feature
<ftag> is enabled, and
false otherwise.
model.component(<ctag>).geom(<tag>).feature().remove(<ftag>) removes the feature
<ftag>.
model.component(<ctag>).geom(<tag>).feature().move(<ftag>,<position>) moves the feature
<ftag> to the zero indexed position
<position> in the sequence.
model.component(<ctag>).geom(<tag>).feature(<ftag>)).getAllowedPropertyValues(property) returns the set of allowed values for a property if the set is a finite set of strings; otherwise, it returns null.
String[] remaining = model.component(<ctag>).geom(<tag>).deleteEdges(<objname>, <edges>) deletes the given edges from the given object in a 2D geometry by using a combination of the following methods:
model.component(<ctag>).geom(<tag>).run(<ftag>) builds all features up to (and including) the feature
<ftag>.
model.component(<ctag>).geom(<tag>).runPre(<ftag>) builds all features preceding the feature
<ftag>; for example, with
<ftag> being a work plane feature in a 3D geometry,
model.geom(<tag>).runPre(<ftag>) builds all 3D geometry features preceding the work plane.
model.component(<ctag>).geom(<tag>).runCurrent() builds all features up to (and including) the current feature.
model.component(<ctag>).geom(<tag>).run() builds all features. The finalized geometry and all selections are also updated.
model.component(<ctag>).geom().run() builds the finalized geometry in all geometries.
String fTag = model.component(<ctag>).geom(<tag>).current() returns the tag of the current feature. If the current state is before the first feature, the empty string
"" is returned.
String status = model.component(<ctag>).geom(<tag>).feature(<ftag>).status() returns the status of the feature
<ftag>. The status is
built,
warning,
needs_rebuild,
edited, or
error.
String msg = model.component(<ctag>).geom(<tag>).feature(<ftag>).message() returns the warning/error message of the feature
<ftag>.
String[] n = model.component(<ctag>).geom(<tag>).objectNames() returns the names of all objects that exist in the current state.
String[] n = model.component(<ctag>).geom(<tag>).feature(<ftag>).objectNames() returns the names of the output object generated by the feature
<ftag>.
model.component(<ctag>).geom(<tag>).obj(<objname>).geomInfoMethod returns information about the object
<objname>. The available methods are described in
Geometry Object Information.
model.component(<ctag>).geom(<tag>).geomInfoMethod returns information about the finalized geometry of geometry
<tag>.
model.component(<ctag>).geom(<tag>).selection(<seltag>).selMethod returns information about the named selection
<seltag>. See
Selections of Geometric Entities and
Geometry Object Selection Methods for more information.
Use model.component(<ctag>).geom(<tag>).measure().selection().selMethod to specify the domains, boundaries, or edges in geometry objects that you want to measure. You can also specify one vertex or two vertices to get the coordinates of the vertex or the distance between the two vertices, respectively. The available selection methods are described in
Geometry Object Selection Methods.
model.component(<ctag>).geom(<tag>).measure().geomMeasurementMethod returns the volume, area, length, vertex coordinates, or distance between two vertices according to the selection. The available measurement methods are described in
Geometry Object Information.
Use model.component(<ctag>).geom(<tag>).measureFinal().selection().selMethod to specify the domains, boundaries, or edges in the finalized geometry that you want to measure. You can also specify one vertex or two vertices to get the coordinates of the vertex or the distance between the two vertices, respectively. The available selection methods are described in
model.selection().
model.component(<ctag>).geom(<tag>).measureFinal().geomMeasurementMethod returns the volume, area, length, vertex coordinates, or distance between two vertices according to the selection. The available measurement methods are described in
Measurements.
Use model.component(<ctag>).geom(<tag>)).measureFinal().selection().mesh(<mtag>)) to select the mesh with tag
mtag, when the analyzed geometry is based on an imported mesh, for example, so that measurements are relative to this mesh in its current state. Then, for example, to select domain 1 in a 2D geometry
geom1 and mesh
mesh1 make measurements on the analyzed geometry (for the physics), use the following code:
Use model.component(<ctag>).geom(<tag>).measure().getBoundingBox and
model.component(<ctag>).geom(<tag>)).measureFinal().getBoundingBox to return the bounding box of the selected geometry objects or entities. They are returned as a double array of
[xmin, xmax, ymin, ymax, …] depending on the space dimension.
model.component(<ctag>).geom(<tag>).export().selection().selMethod can be used to select a number of geometry objects to export to file. The available selection methods are described in
Geometry Object Selection Methods.
model.component(<ctag>).geom(<tag>).export(<
filename>) exports the selected objects to a file.
model.component(<ctag>).geom(<tag>).exportFinal(<
filename>) exports the finalized geometry to a file.
model.component(<ctag>).geom(<tag>).defeaturing(tooltag).defeaturingMethod uses a defeaturing tool to create a feature that deletes small details. Available tools are listed in the
CAD Import Module User’s Guide.
model.component(<ctag>).geom(<tag>).feature(<ftag>).find() searches for small details, for a defeaturing feature
<ftag>.
model.component(<ctag>).geom(<tag>).feature(<ftag>).detail().selMethod manipulates the selection of details to remove, for a defeaturing feature
<ftag>.
For a geometry object selection sel, the following methods are available:
sel.init() sets the selection to be a selection of whole geometry objects. Subsequent calls to
set,
add, and
remove select objects.
sel.init(dim) sets the selection property to be a selection of geometric entities of dimension
dim. Subsequent calls to
all,
set,
add,
remove, and
clear select entities.
sel.set(<onames>) sets the selection to be the objects
<onames>.
sel.add(<onames>) adds the objects
<onames> to the selection.
sel.remove(<onames>) removes the objects
<onames> from the selection.
sel.all(<oname>) sets the selection to be all the entities of object
<oname>. The selections on other objects are not affected.
sel.all() sets the selection to be all entities (of the given dimension) of all available objects.
sel.set(<oname>, <entities>) sets the selection on object
<oname> to be
<entities>. The selections on other objects are not affected.
sel.add(<oname>, <entities>) adds the entities
<entities> to the selection on object
<oname>. The selections on other objects are not affected.
sel.remove(<oname>, <entities>) removes the entities
<entities> from the selection on object
<oname>. The selections on other objects are not affected.
sel.clear() removes all entities from the selection.
The set,
add, and
remove methods can all be vectorized. See
Selections of Geometric Entities for more information.
sel.clear(<oname>) clears the selection on object
<oname>. The selections on other objects are not affected.
sel.named(<seltag>) where
<seltag> is the trimmed tag of a named selection defined by a preceding feature in the geometry sequence. See
Selections of Geometric Entities for more information.
String[] onames = sel.objects() returns the names of the selected objects.
int dim = sel.dim() returns the dimension for the entities in the selection if the selection consists of geometric entities; otherwise, it returns
−1.
int[] dims = sel.dimension() returns an array of length 1 containing the entity dimension if the selection consists of geometric entities; otherwise, it returns an empty array.
int[] ent = sel.entities(<oname>, dim) returns the entities in the selection on object
<oname> at the given dimension, if the selection consists of geometric entities.
int[] ent = sel.entities(<oname>) returns the entities in the selection on object
<oname>, if the selection consists of geometric entities.
String[] seltag = sel.named() returns the trimmed tag of the named selection that this selection refers to, or an empty string if the selection does not refer to a named selection.
Use model.geom(<tag>).create(<ftag>,<type>) to add an If, Else If, Else, or End If feature after the current feature.
Use model.geom(<tag>).createAfter(<ftag>,<type>,<postag>) to add an If, Else If, Else, or End If feature after the feature tagged
<postag>.
model.geom(<tag>).insertFile(<filename>,<gtag>); inserts a geometry sequence, with tag
<gtag>, from another model file, with the filename
<filename>, into the geometry sequence with tag
<tag>.
model.geom(<tag>).insertSequence(<mtag>,<gtag>); inserts a geometry sequence, with tag
<gtag>, from another model, with tag
<mtag>, into the current geometry sequence with tag
<tag>.
From version 5.6, for a selection of entities, the method objects() returns feature tags for objects that are created by a feature that creates exactly one geometry object.
From version 5.1, the access method argument() is deprecated and replaced with
inputParam(), and the access method
param() is deprecated and replaced with
localParam(). The methods
link(…),
linked(), and
relink() are deprecated and replaced with l
oad(…),
loaded(), and
reload(), respectively.