B-Rep simplification tool which removes internal faces from the model. More...
#include <cadex/ModelSimplifier_InternalFacesRemoverTool.hxx>
Public Member Functions | |
ModelSimplifier_InternalFacesRemoverTool () | |
ModelData_Model | Perform (const ModelData_Model &theSource) const override |
Runs the internal faces removal algorithm and returns the model without internal faces. | |
double | AngularTolerance () const |
Returns angular tolerance. | |
void | SetAngularTolerance (double theValue) |
Sets angular tolerance. See the method above. | |
double | LinearTolerance () const |
Returns linear tolerance. | |
void | SetLinearTolerance (double theValue) |
Sets linear tolerance. See the method above. | |
bool | IsLinearToleranceRelative () const |
void | SetIsLinearToleranceRelative (bool theValue) |
Sets the flag specifying whether linear tolerance is relative. See the method above. | |
bool | PreserveSharing () const |
void | SetPreserveSharing (bool theValue) |
Sets the flag specifying whether processing should preserve shared faces. See the method above. | |
![]() | |
ModelSimplifier_SimplifierTool (const std::shared_ptr< internal::ModelSimplifierImpl_SimplifierTool > &theImpl) | |
void | SetShapePredicate (const std::shared_ptr< ModelSimplifier_ShapePredicate > &theShapePredicate) |
Sets what shapes can be split during simplification and what shapes can be simplified. | |
virtual ModelData_Model | Perform (const ModelData_Model &theSource) const =0 |
Performs the simplification algorithm. | |
Additional Inherited Members | |
![]() | |
template<typename T > | |
T * | Impl () const |
B-Rep simplification tool which removes internal faces from the model.
This tool traverses the scene graph and re-creates the model skipping the faces that were recognized as internal (i.e. invisible from almost any angle). It leaves only visible faces in the partially visible bodies, it removes fully hidden bodies.
The changes propagate up the tree as well, i.e. if all the part's bodies were removed, the part is removed as well. If all of assembly's children were removed, the assembly is also removed.
The tool is parameterized by the angular and linear tolerance, describing the hypothetical distribution of viewing angles against which the faces of the model are tested.
cadex::ModelSimplifier_InternalFacesRemoverTool::ModelSimplifier_InternalFacesRemoverTool | ( | ) |
Constructor.
LicenseManager_LicenseError | if no Model Simplifier license was activated. |
double cadex::ModelSimplifier_InternalFacesRemoverTool::AngularTolerance | ( | ) | const |
Returns angular tolerance.
Angular tolerance is the maximum value of angle between two viewing directions that can be considered indistinguishable. The units are radians; acceptable range of values is (0, pi).
Smaller values allow for higher precision in determining whether the face is internal or not but diminish performance.
Default value is 0.28.
bool cadex::ModelSimplifier_InternalFacesRemoverTool::IsLinearToleranceRelative | ( | ) | const |
Returns the flag specifying whether the linear tolerance should be regarded as an absolute measure or a measure relative to the size of the model's axis-aligned bounding box.
Default value is true.
double cadex::ModelSimplifier_InternalFacesRemoverTool::LinearTolerance | ( | ) | const |
Returns linear tolerance.
Linear tolerance is the maximum distance between two points on the surface of the model that can be considered indistinguishable. The value is either unitless or is measured in millimeters (depending on the value of IsLinearToleranceRelative).
Smaller values allow for higher precision in determining whether the face is internal or not but diminish performance.
Default value is 0.01, corresponding to 1% of the model's axis-aligned bounding box diagonal.
|
overridevirtual |
Runs the internal faces removal algorithm and returns the model without internal faces.
The original model is not modified.
The method can be invoked multiple times with different models.
Implements cadex::ModelSimplifier_SimplifierTool.
bool cadex::ModelSimplifier_InternalFacesRemoverTool::PreserveSharing | ( | ) | const |
Returns the flag specifying whether the processing would work on all shared parts simultaneously , deleting only faces that are invisible in all instances of shared face.
Default value is true.