The defeaturing tools Fillets,
Holes,
ShortEdges,
SliverFaces,
SmallFaces, and
Spikes search for and delete details smaller than a given size. First select the objects you want to examine by typing, for example,
model.component(<ctag>).geom(
<tag>).defeaturing("Fillets").selection("input").set(
<onames>);
where <onames> is a string array contains the object names.
The defeaturing tools Fillets and
Holes also support specifying a minimum radius, to do this type (for fillets in this case):
model.component(<ctag>).geom(
<tag>).defeaturing("Fillets").set("minentsize",minsize);
This adds a feature, tagged <ftag>, that performs the deletion operation to the geometry sequence, after the current feature, and build this feature. In this case, it adds a
DeleteFillets feature.
model.component(<ctag>).geom(
<tag>).defeaturing("Fillets").detail().setGroup(2,5);
model.component(<ctag>).geom(
<tag>).defeaturing("Fillets").detail().addGroup(7,8);
model.component(<ctag>).geom(
<tag>).defeaturing("Fillets").detail().removeGroup(3);
This adds a DeleteFillets feature tagged
<ftag> after the current feature in the geometry sequence.
model.component(<ctag>).geom(<tag>).feature(<ftag>).find() searches for small details, for a defeaturing feature
<ftag>.
model.component(<ctag>).geom(<tag>).defeaturing(tooltag).find() searches for small details, for a defeaturing tool
tooltag.
model.component(<ctag>).geom(<tag>).defeaturing(tooltag).detail().selMethod manipulates the selection of details to remove, for a defeaturing tool
tooltag.
model.component(<ctag>).geom(<tag>).feature(<ftag>).detail().selMethod manipulates the selection of details to remove, for a defeaturing feature
<ftag>.
model.component(<ctag>).geom(<tag>).defeaturing(tooltag).delete(<ftag>) creates a defeaturing feature of type
tooltag, tagged
<ftag>, with the properties currently specified in the defeaturing tool. The property
delete of the created feature is set to
selected. If the feature
<ftag> can be built, it is inserted in the geometry sequence after the current feature, otherwise the feature is discarded.
model.component(<ctag>).geom(<tag>).defeaturing(tooltag).deleteAll(<ftag>) creates a defeaturing feature of type
tooltag, tagged
<ftag>, with the properties currently specified in the defeaturing tool. The property
delete of the created feature is set to
all. If the feature
<ftag> can be built, it is inserted in the geometry sequence after the current feature, otherwise the feature is discarded.
For a defeaturing selection sel the following methods are available, in addition to the methods available for a general geometry selection.
The find method on the corresponding feature or defeaturing tool provides the defeaturing selection with a list of details. Each detail is a group of geometric entities. Group numbers,
<groups>, is an array of integers that index into the list of details.
int[] sel.group(<groups>) returns the group numbers for the selected groups.
sel.addGroup(<groups>) adds the specified groups to the selection.
sel.setGroup(<groups>) sets the selection groups.
sel.removeGroup(<groups>) removes the specified groups from the selection.
String[] sel.groupNames() returns a list of names of the groups found.
String sel.groupObject(<group>) returns the name of the geometry object that contains the specified detail group.
int[] sel.groupEntities(<group>) returns the entity numbers of the specified detail group.
int sel.size() returns the number of detail groups found.