ReplaceFaces
Delete faces from CAD objects and heal the wounds by creating new faces.
Syntax
model.component(<ctag>).geom(<tag>).feature().create(<ftag>,"ReplaceFaces");
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("ReplaceFaces").selection(property)
model.component(<ctag>).geom(<tag>).defeaturing("ReplaceFaces").set(property,<value>);
model.component(<ctag>).geom(<tag>).defeaturing("ReplaceFaces").delete(<ftag>);
Description
model.component(<ctag>).geom(<tag>).defeaturing("ReplaceFaces").delete(<ftag>) creates a ReplaceFaces 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 ReplaceFaces feature using the standard create method.
cap | extend
on | off
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 deleted from their objects. The resulting object is healed so that a solid object is obtained. If heal is cap, a new face is formed based on the surrounding edges of each wound. If heal is extend, the surrounding faces of each wound are grown or shrunk to heal the wound.
When you replacing faces that form through holes, set the throughhole property to on to indicate that the two wounds from where the hole entered and exited the geometry are to be healed independently instead of as a single wound. If throughhole is off, the wound would be healed with a single new face that would just recreate the hole.
Example
The following example imports the file defeaturing_demo_2.mphbin, and removes a hole from the geometry model.
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").run("imp1");
model.component("comp1").geom("geom1").feature().create("rfa1","ReplaceFaces");
model.component("comp1").geom("geom1").feature("rfa1").selection("input").set("imp1",6,7,8,9,11,12,13);
model.component("comp1").geom("geom1").run();
Compatibility
The following property is no longer supported:
stx | ftx | ctx | ptx
See Also
DeleteFillets, DeleteSliverFaces, DeleteSmallFaces, DetachFaces