Defeaturing Tools — Detect Interferences
Access the
DetectInterferences
tool by the command
GeomDefeature tool = model.component(
<ctag>
).geom(
<tag>
).defeaturing("DetectInterferences");
To access the input objects selection, use
GeomObjectSelection input = tool.selection("input");
To set the tolerance for detecting intersections, use
tool.set("abstol", value);
To set the tolerance for detecting gaps, use
tool.set("gaptol", value);
To find interferences, type
tool.find();
To access the resulting interferences, use
GeomObjectGroupSelection interf = tool.detail();
Each node listed in Interfering faces list in the user interface corresponds to a group of faces in
GeomObjectGroupSelection
. To access the data for a group, use its integer group index:
String label = interf.groupNames()[group];
String objName = interf.groupObject(group);
int[] faces = interf.groupEntities(group);
double gapSize = interf.entSize(group)[0];
The face numbers in the groups do not refer to the input objects. Rather, they refer to objects in a local state, where the tool has imprinted edges where objects interfere. To hide faces in the local state, first type
tool.localState(true);
to enter the local state. After doing the hiding, type
tool.localState(false);
to exit the local state.
See also
DetectInterferences
.