BRep simplification tool which removes holes from the model. More...
#include <cadex/ModelSimplifier_HoleRemoverTool.hxx>
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.  
double  ExtentThreshold () const 
Returns the extent threshold of body size, below which the body is considered small.  
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.  
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.  
void  SetDiagonalThreshold (double theValue) 
Sets diagonal threshold of body size. See the method above.  
bool  PerformInterferenceCheck () const 
Returns the flag of performing interference check.  
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.  
virtual ModelData_Model  Perform (const ModelData_Model &theSource) const =0 
Performs the simplification algorithm.  
Additional Inherited Members  
Protected Member Functions inherited from cadex::ModelSimplifier_SimplifierTool  
template<typename T >  
T *  Impl () const 
BRep simplification tool which removes holes from the model.
This tool traverses the scene graph and recreates 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.
cadex::ModelSimplifier_HoleRemoverTool::ModelSimplifier_HoleRemoverTool  (  ) 
Constructor.
LicenseManager_LicenseError  if no Model Simplifier license was activated. 
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 axisaligned 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.
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 axisaligned 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.

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.
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.
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 axisaligned 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.