Hide menu
Loading...
Searching...
No Matches
cadex::ModelSimplifier_SimplifierBuilder Class Reference

Creates ModelSimplifier_Simplifier instance with pre-configured tools. More...

#include <cadex/ModelSimplifier_SimplifierBuilder.hxx>

Public Types

enum  SimplificationLevel { Low , Middle , High }
 
enum  SimplifiedFeatureSize { Small , Medium , Large }
 

Public Member Functions

__CADEX_EXPORT ModelSimplifier_SimplifierBuilder ()
 Constructor.
 
__CADEX_EXPORT ModelSimplifier_Simplifier CreatePipeline () const
 Creates ModelSimplifier_Simplifier instance with tools already added and configured according to high level parameters.
 
__CADEX_EXPORT SimplificationLevel Level () const
 
__CADEX_EXPORT void SetLevel (SimplificationLevel theValue)
 
__CADEX_EXPORT SimplifiedFeatureSize FeatureSize () const
 
__CADEX_EXPORT void SetFeatureSize (SimplifiedFeatureSize theValue)
 
__CADEX_EXPORT void SetShapePredicate (std::shared_ptr< ModelSimplifier_ShapePredicate > theFunction)
 

Detailed Description

Creates ModelSimplifier_Simplifier instance with pre-configured tools.

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

ModelSimplifier_SimplifierBuilder::CreatePipeline creates an instance of Model Simplifier using the following tools:

The tools parameters are computed automatically according to 2 meta-parameters: Simplification Level (controls the aggressiveness of the simplification) and Simplified Feature Size (limits the scope of model features affected).

Examples
advgeom/brepsimplify/Program.cs, and advgeom/brepsimplify/main.cxx.

Member Enumeration Documentation

◆ SimplificationLevel

Represents aggressiveness of simplification process. Setting the simplifier to higher aggressiveness disables certain consistency checks which allows removal of more faces, but risks the appearance of invalid geometry configurations.

Enumerator
Low 

All the consistency checks are on.

Middle 

Disables interference checking during hole removal.

High 

All consistency checks are off.

Examples
advgeom/brepsimplify/Program.cs.

◆ SimplifiedFeatureSize

Represents the size of features that are going to be affected by simplification process. "Larger" values correspond to a larger set of affected features, since this parameter influences specific tools' parameters most of which are in essence thresholds for various quantities (lengths, volumes, etc.).

Enumerator
Small 

Default parameters are used for all tools.

Medium 

The set of affected features is expanded with increase of various tools' thresholds.

Large 

The set of affected features is expanded even further. Mesh simplification tool is set to the highest simplification degree.

Examples
advgeom/brepsimplify/Program.cs.

Member Function Documentation

◆ CreatePipeline()

ModelSimplifier_Simplifier cadex::ModelSimplifier_SimplifierBuilder::CreatePipeline ( ) const

Creates ModelSimplifier_Simplifier instance with tools already added and configured according to high level parameters.

Simplification level increases possible simplification but can create more problems for complex models. Simplified feature size measures how much model can change in the process of simplification.

Exceptions
LicenseManager_LicenseErrorif no Model Simplifier license was activated.
Examples
advgeom/brepsimplify/Program.cs, and advgeom/brepsimplify/main.cxx.

◆ FeatureSize()

ModelSimplifier_SimplifierBuilder::SimplifiedFeatureSize cadex::ModelSimplifier_SimplifierBuilder::FeatureSize ( ) const

Returns the Simplified Feature Size specifying the size of model features that need to be simplified. For example, if Simplified Feature Size is Medium, then small and medium-sized features will be simplified and large features are going to be left intact.

Default value is Medium.

◆ Level()

ModelSimplifier_SimplifierBuilder::SimplificationLevel cadex::ModelSimplifier_SimplifierBuilder::Level ( ) const

Returns the Simplification Level specifying how strongly the model needs to be simplified.

Default value is Middle.

◆ SetFeatureSize()

void cadex::ModelSimplifier_SimplifierBuilder::SetFeatureSize ( SimplifiedFeatureSize  theValue)

Sets the Simplified Feature Size specifying the size of model features that need to be simplified. See the method above.

Examples
advgeom/brepsimplify/Program.cs, and advgeom/brepsimplify/main.cxx.

◆ SetLevel()

void cadex::ModelSimplifier_SimplifierBuilder::SetLevel ( SimplificationLevel  theValue)

Sets the Simplification Level specifying how strongly the model needs to be simplified. See the method above.

Examples
advgeom/brepsimplify/Program.cs, and advgeom/brepsimplify/main.cxx.

◆ SetShapePredicate()

void cadex::ModelSimplifier_SimplifierBuilder::SetShapePredicate ( std::shared_ptr< ModelSimplifier_ShapePredicate theValue)

Sets the function specifying what shapes can be split during simplification and what shapes can be simplified. Simplification algorithms can process shapes either treating them as a single unit, or as a collection of units. If this function returns false, the body will be treated as a single unit; for example, it'll be removed either completely or not at all. If it returns true, the body can be split and its portions will be considered for simplification separately.