Per-feature limits for constraint simplification. More...
#include <meshkit/constraints.hpp>
Public Types | |
| enum class | Mode { Preserve , Simplify } |
| Whether vertices of a feature may be removed. More... | |
Public Member Functions | |
| Text | validate () const |
| Check the mode and the ranges documented on each field. | |
Public Attributes | |
| Mode | mode = Mode::Preserve |
| Preserve (default) or Simplify. | |
| double | maxDeviation = 0 |
| Largest XY distance from a removed vertex to the shortcut segment replacing it; 0 removes only vertices exactly on the shortcut. | |
| double | maxZDeviation = 0 |
| Largest |z - linear interpolation along the shortcut| of a removed vertex, in Z units; used only for features with z. | |
| double | maxTurnDegrees = 5 |
| Vertices turning by more than this many degrees (0 = straight on, 180 = reversal) are kept as corners, as are vertices next to a zero-length edge. | |
| double | maxAreaChangeFraction = .001 |
| Rings only: largest |area change| / |original area|; a failing ring is restored. | |
| double | maxAreaChange = -1 |
| Rings only: largest absolute area change in squared XY units; default -1 (disabled), otherwise >= 0. | |
| double | minimumClearance = 0 |
| XY distance a shortcut must keep from original segments outside its span and from protected points, unless one of its endpoints lies on them; 0 (default) disables. | |
Per-feature limits for constraint simplification.
XY values use the features' common planar frame, Z values the authored elevation units; nothing is converted or clamped. Check with validate().
|
strong |
| Text meshkit::plan::ConstraintSimplificationPolicy::validate | ( | ) | const |
Check the mode and the ranges documented on each field.
| double meshkit::plan::ConstraintSimplificationPolicy::maxAreaChange = -1 |
Rings only: largest absolute area change in squared XY units; default -1 (disabled), otherwise >= 0.
A ring whose area changes sign or becomes zero is always restored.
| double meshkit::plan::ConstraintSimplificationPolicy::maxAreaChangeFraction = .001 |
Rings only: largest |area change| / |original area|; a failing ring is restored.
Default 0.001; valid [0, 1], or exactly -1 to disable.
| double meshkit::plan::ConstraintSimplificationPolicy::maxDeviation = 0 |
Largest XY distance from a removed vertex to the shortcut segment replacing it; 0 removes only vertices exactly on the shortcut.
Finite and >= 0.
| double meshkit::plan::ConstraintSimplificationPolicy::maxTurnDegrees = 5 |
Vertices turning by more than this many degrees (0 = straight on, 180 = reversal) are kept as corners, as are vertices next to a zero-length edge.
Default 5; [0, 180].
| double meshkit::plan::ConstraintSimplificationPolicy::maxZDeviation = 0 |
Largest |z - linear interpolation along the shortcut| of a removed vertex, in Z units; used only for features with z.
0 removes only exactly linear heights. Finite, >= 0.
| double meshkit::plan::ConstraintSimplificationPolicy::minimumClearance = 0 |
XY distance a shortcut must keep from original segments outside its span and from protected points, unless one of its endpoints lies on them; 0 (default) disables.
Finite and >= 0.
| Mode meshkit::plan::ConstraintSimplificationPolicy::mode = Mode::Preserve |
Preserve (default) or Simplify.