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

## Public Types

enum  SimplificationLevel { Low, Middle, High }

enum  SimplifiedFeatureSize { Small, Medium, Large }

## Public Member Functions

ModelSimplifier_SimplifierBuilder ()
Constructor.

ModelSimplifier_Simplifier CreatePipeline () const
Creates ModelSimplifier_Simplifier instance with tools already added and configured according to high level parameters. More...

SimplificationLevel Level () const

void SetLevel (SimplificationLevel theValue)

SimplifiedFeatureSize FeatureSize () const

void SetFeatureSize (SimplifiedFeatureSize theValue)

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

## ◆ 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.

## ◆ 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.

## ◆ CreatePipeline()

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
Examples

## ◆ FeatureSize()

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()

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

## ◆ 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
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.