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

#include <cadex/ModelSimplifier_MeshSimplifierParameters.hxx>

Public Types

enum  DegreeOfSimplificationType { Low , Medium , High }
 

Public Member Functions

 ModelSimplifier_MeshSimplifierParameters ()
 Constructor.
 
DegreeOfSimplificationType DegreeOfSimplification () const
 Returns the desired level of simplification.
 
void SetDegreeOfSimplification (DegreeOfSimplificationType theValue)
 Sets the desired level of simplification.
 
double MaxDeviation () const
 
void SetMaxDeviation (double theValue)
 Sets maximum deviation of simplified model from original model in mm.
 
bool ForceSimplification () const
 
void SetForceSimplification (bool theValue)
 Enables forced simplification.
 
internal::ModelSimplifierImpl_MeshSimplifierParameters * Impl ()
 

Detailed Description

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

Defines parameters used by ModelSimplifier_MeshSimplifier.

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

Constructor & Destructor Documentation

◆ ModelSimplifier_MeshSimplifierParameters()

cadex::ModelSimplifier_MeshSimplifierParameters::ModelSimplifier_MeshSimplifierParameters ( )

Constructor.

Sets default parameter values.

Member Function Documentation

◆ ForceSimplification()

bool cadex::ModelSimplifier_MeshSimplifierParameters::ForceSimplification ( ) const

Returns whether forced simplification is enabled.

◆ MaxDeviation()

double cadex::ModelSimplifier_MeshSimplifierParameters::MaxDeviation ( ) const

Returns maximum deviation.

◆ SetDegreeOfSimplification()

void cadex::ModelSimplifier_MeshSimplifierParameters::SetDegreeOfSimplification ( DegreeOfSimplificationType  theValue)

Sets the desired level of simplification.

ModelSimplifier_MeshSimplifierParameters::Low means that fewer triangles are removed; ModelSimplifier_MeshSimplifierParameters::High means that more triangles are removed.

This parameter isn't taken into account if maximum deviation value is set.

See also
ModelSimplifier_MeshSimplifierParameters::SetMaxDeviation
Examples
advgeom/meshsimplify/Program.cs, and advgeom/meshsimplify/main.cxx.

◆ SetForceSimplification()

void cadex::ModelSimplifier_MeshSimplifierParameters::SetForceSimplification ( bool  theValue)

Enables forced simplification.

For some models enabling this setting can result in lower triangle count with the same parameters.

Warning
Forced simplification can cause violation of model's integrity (holes, significant changes to mesh boundaries, etc.).

Default value is false.

◆ SetMaxDeviation()

void cadex::ModelSimplifier_MeshSimplifierParameters::SetMaxDeviation ( double  theValue)

Sets maximum deviation of simplified model from original model in mm.

Mesh Simplifier tries to reduce the triangle count as much as possible with specified deviation. The output model's mesh will not be further from the original model than this value.

Setting this parameter overrides previously specified degree of simplification preset.

See also
ModelSimplifier_MeshSimplifierParameters::SetDegreeOfSimplification