Hide menu
cadex::ModelSimplifier_HoleRemoverTool Class Reference

B-Rep simplification tool which removes holes from the model. More...

Inheritance diagram for cadex::ModelSimplifier_HoleRemoverTool:
cadex::ModelSimplifier_SimplifierTool

Public Member Functions

 ModelSimplifier_HoleRemoverTool ()
 
ModelData_Model Perform (const ModelData_Model &theSource) const override
 Runs the hole removal algorithm and returns the model without holes. More...
 
double ExtentThreshold () const
 Returns the extent threshold of body size, below which the body is considered small. More...
 
void SetExtentThreshold (double theValue)
 Sets extent threshold of body size. See the method above.
 
double VolumeThreshold () const
 Returns the volume threshold of body size, below which the body is considered small. More...
 
void SetVolumeThreshold (double theValue)
 Sets volume threshold of body size. See the method above.
 
double DiagonalThreshold () const
 Returns the diagonal threshold of body size, below which the body is considered small. More...
 
void SetDiagonalThreshold (double theValue)
 Sets diagonal threshold of body size. See the method above.
 
bool PerformInterferenceCheck () const
 Returns the flag of performing interference check. More...
 
void SetPerformInterferenceCheck (bool theValue)
 Sets flag for performing interference check. See above.
 
- Public Member Functions inherited from cadex::ModelSimplifier_SimplifierTool
 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.
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelSimplifier_SimplifierTool
template<typename T >
T * Impl () const
 

Detailed Description

B-Rep simplification tool which removes holes from the model.

Warning
This class is a part of Model Simplification add-on, which is licensed separately from the base CAD Exchanger SDK.

This tool traverses the scene graph and re-creates the model skipping the faces that were recognized as lying inside holes. Then it sews resulting holes so the result is a collection of closed shells.

The tool is parameterized by different thresholds which determine what to do with holes with some small part outside of hole. We calculate approximating bounding box of outside part and check thresholds to see if it can be dismissed.

Constructor & Destructor Documentation

◆ ModelSimplifier_HoleRemoverTool()

cadex::ModelSimplifier_HoleRemoverTool::ModelSimplifier_HoleRemoverTool ( )

Constructor.

Exceptions
LicenseManager_LicenseErrorif no Model Simplifier license was activated.

Member Function Documentation

◆ DiagonalThreshold()

double cadex::ModelSimplifier_HoleRemoverTool::DiagonalThreshold ( ) const

Returns the diagonal threshold of body size, below which the body is considered small.

Size is measured as the length of the diagonal of an object's axis-aligned bounding box. The threshold is relative to the part's size (i.e. the value of 0.1 means all bodies smaller than 10% of the part's size should be removed), therefore the meaningful range of this parameter is [0, 1].

Default value is 0.05, i.e. 5% of part's size.

◆ ExtentThreshold()

double cadex::ModelSimplifier_HoleRemoverTool::ExtentThreshold ( ) const

Returns the extent threshold of body size, below which the body is considered small.

Size is measured as the extents of an object's axis-aligned bounding box. The threshold is relative to the part's AABB (i.e. the value of 0.1 means all bodies with at least one extent less then than 10% of the part's AABB extent should be removed), therefore the meaningful range of this parameter is [0, 1].

Default value is 0.02, i.e. 2% of part's size.

◆ Perform()

ModelData_Model cadex::ModelSimplifier_HoleRemoverTool::Perform ( const ModelData_Model theSource) const
overridevirtual

Runs the hole removal algorithm and returns the model without holes.

The original model is not modified.

The method can be invoked multiple times with different models.

Implements cadex::ModelSimplifier_SimplifierTool.

◆ PerformInterferenceCheck()

bool cadex::ModelSimplifier_HoleRemoverTool::PerformInterferenceCheck ( ) const

Returns the flag of performing interference check.

This check ensures that resulting bodies will not be self interesecting after holes were removed.

Default value is true.

◆ VolumeThreshold()

double cadex::ModelSimplifier_HoleRemoverTool::VolumeThreshold ( ) const

Returns the volume threshold of body size, below which the body is considered small.

Size is measured as the volume of an object's axis-aligned bounding box. The threshold is relative to the part's volume (i.e. the value of 0.1 means all bodies with volume less then than 10% of the part's volume should be removed), therefore the meaningful range of this parameter is [0, 1].

Default value is 0.005, i.e. 0.5% of part's size.