Loading...
Searching...
No Matches
meshkit::plan::ConstraintPolicyOverride Struct Reference

Optional per-source changes to a parent ConstraintSimplificationPolicy, applied by resolve(). More...

#include <meshkit/constraints.hpp>

Collaboration diagram for meshkit::plan::ConstraintPolicyOverride:

Public Member Functions

Text validate () const
 Check mode, a set maxAreaChangeFraction, and this override resolved against a default-constructed policy; it is not checked against any particular parent.
 
ConstraintSimplificationPolicy resolve (ConstraintSimplificationPolicy parent) const
 Merge this override into a parent policy without validation.
 

Public Attributes

int mode = -1
 Mode override: -1 inherits (default), 0 Preserve, 1 Simplify; other values fail validate().
 
std::optional< double > maxDeviation
 Replaces ConstraintSimplificationPolicy::maxDeviation when set.
 
std::optional< double > maxZDeviation
 Replaces ConstraintSimplificationPolicy::maxZDeviation when set.
 
std::optional< double > maxTurnDegrees
 Replaces ConstraintSimplificationPolicy::maxTurnDegrees when set.
 
std::optional< double > maxAreaChangeFraction
 Replaces ConstraintSimplificationPolicy::maxAreaChangeFraction when set; must be >= 0, so the -1 "disabled" value cannot be set here.
 
std::optional< double > minimumClearance
 Replaces ConstraintSimplificationPolicy::minimumClearance when set.
 

Detailed Description

Optional per-source changes to a parent ConstraintSimplificationPolicy, applied by resolve().

Unset fields inherit; maxAreaChange cannot be overridden and always inherits. Values use the parent's units; nothing is converted or clamped.

Member Function Documentation

◆ resolve()

ConstraintSimplificationPolicy meshkit::plan::ConstraintPolicyOverride::resolve ( ConstraintSimplificationPolicy parent) const

Merge this override into a parent policy without validation.

Parameters
[in]parentPolicy supplying every unset field; taken by value.
Returns
parent with each set field replaced; mode 0 gives Preserve, any positive mode Simplify, a negative mode inherits.
Here is the caller graph for this function:

◆ validate()

Text meshkit::plan::ConstraintPolicyOverride::validate ( ) const

Check mode, a set maxAreaChangeFraction, and this override resolved against a default-constructed policy; it is not checked against any particular parent.

Returns
Empty text when valid, otherwise an English message for the first failure.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ maxAreaChangeFraction

std::optional<double> meshkit::plan::ConstraintPolicyOverride::maxAreaChangeFraction

Replaces ConstraintSimplificationPolicy::maxAreaChangeFraction when set; must be >= 0, so the -1 "disabled" value cannot be set here.

◆ maxDeviation

std::optional<double> meshkit::plan::ConstraintPolicyOverride::maxDeviation

◆ maxTurnDegrees

std::optional<double> meshkit::plan::ConstraintPolicyOverride::maxTurnDegrees

◆ maxZDeviation

std::optional<double> meshkit::plan::ConstraintPolicyOverride::maxZDeviation

◆ minimumClearance

std::optional<double> meshkit::plan::ConstraintPolicyOverride::minimumClearance

◆ mode

int meshkit::plan::ConstraintPolicyOverride::mode = -1

Mode override: -1 inherits (default), 0 Preserve, 1 Simplify; other values fail validate().


The documentation for this struct was generated from the following files: