DetachFaces
Detach faces from CAD objects to form a new (child) solid.
Syntax
model.component(<ctag>).geom(<tag>).feature().create(<ftag>,"DetachFaces");
model.component(<ctag>).geom(<tag>).feature(<ftag>).selection(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property);
 
model.component(<ctag>).geom(<tag>).defeaturing("DetachFaces").selection(property);
model.component(<ctag>).geom(<tag>).defeaturing("DetachFaces").set(property,<value>);
model.component(<ctag>).geom(<tag>).defeaturing("DetachFaces").delete(<ftag>);
Description
model.component(<ctag>).geom(<tag>).defeaturing("DetachFaces").delete(<ftag>) creates a DetachFaces feature tagged <ftag> with the specified properties. If the feature can be built, it is inserted in the geometry sequence after the current feature; otherwise, the feature is discarded.
It is also possible to create a DetachFaces feature using the standard create method.
fill | patchchild | patchparent
on | off
all | obj | dom | bnd | edg | pnt | off
Show selections of resulting objects in physics, materials, and so on, or in part instances. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
The faces in the property input are detached from their parent object. A new solid, the child object, are formed from the detached faces. The output objects are the healed parent and child objects.
The property healparent determines how the parent object is healed to form a new solid after detaching the faces. The value fill means that a new face is formed based on the surrounding edges of each wound. The value patch means that the surrounding faces of each wound are grown or shrunk.
The property healchild determines how the child solid is constructed from the detached faces. The value fill means that a new face is formed based on the surrounding edges of each wound. The value patchchild means that the detached faces are grown or shrunk to form a solid. The value patchparent means that the parent faces surrounding the detached faces are grown or shrunk to form a solid together with the detached faces.
Example
The following example imports the COMSOL Multiphysics geometry file defeaturing_demo_2.mphbin and detaches a hole defined by a set of faces:
Model model = ModelUtil.create("Model1");
model.component.create("comp1");
model.component("comp1").geom().create("geom1",3);
model.component("comp1").geom("geom1").feature().create("imp1","Import");
model.component("comp1").geom("geom1").feature("imp1").set("filename", "defeaturing_demo_2.mphbin");
model.component("comp1").geom("geom1").runAll();
model.component("comp1").geom("geom1").feature().create("det1","DetachFaces");
model.component("comp1").geom("geom1").feature("det1").selection("input").set("imp1",6,7,8,9,11,12,13);
model.component("comp1").geom("geom1").runAll();
Compatibility
The following property is no longer supported:
stx | ftx | ctx | ptx
See Also
ReplaceFaces