#include <meshresolution.h>
|
| QString | validate () const |
| | Check numeric mesh-resolution settings without modifying or normalizing them.
|
| |
| QJsonObject | toJson () const |
| | Serialize every resolution field into the current project JSON schema.
|
| |
◆ CellPlanning
◆ Reference
| Enumerator |
|---|
| Averaged | |
| Full | |
| Direct | |
◆ Sizing
| Enumerator |
|---|
| Legacy | |
| Verified | |
| Strict | |
◆ Terrain
| Enumerator |
|---|
| Adaptive | |
| Legacy | |
| Off | |
◆ fromJson()
Decode current-schema resolution fields using defaults for missing or mismatched values.
- Parameters
-
| [in] | o | Borrowed object, unchanged; numeric optional lengths become present only for JSON numbers. |
- Returns
- Owned settings, distances in metres; unknown terrain/reference strings select adaptive/averaged. Missing optional values remain absent. Does not validate ranges, clamp values, convert project units or mutate project state; callers should call validate() before using authoring inputs.
◆ migrate()
Overlay version-1 generation-dialog controls onto a supplied settings value.
- Parameters
-
| [in] | c | Borrowed legacy control object with metre distances and integer combo selections, unchanged. |
| [in] | r | Initial settings copied by value; fields without legacy controls retain their supplied values, except coarsenPasses resets to zero and maximum/breakline tolerance are derived. |
| [in] | extentM | Domain extent in metres, used as extentM/100 when legacy feature size is nonpositive; if not positive the fallback is 1 metre. Caller supplies finite meaningful values. |
- Returns
- Owned migrated settings. Nonpositive minimum becomes feature/4, maximum becomes feature times coarsening factor, nonpositive elevation tolerance becomes absent and copies to breakline tolerance. Legacy terrain without a positive tolerance switches off. No range validation or file/project mutation.
◆ toJson()
| QJsonObject mesh::ResolutionSettings::toJson |
( |
| ) |
const |
|
inline |
Serialize every resolution field into the current project JSON schema.
- Returns
- Owned object with SI metre length controls, null for absent optional lengths, and textual terrain/reference modes. Unknown enum values serialize as off/direct respectively through fallback branches. Does not call validate(), perform unit conversion or write a file; this object is unchanged.
◆ validate()
| QString mesh::ResolutionSettings::validate |
( |
| ) |
const |
|
inline |
Check numeric mesh-resolution settings without modifying or normalizing them.
- Returns
- Empty string when accepted, otherwise the first English validation error. All present lengths must be finite in (0,1e12] metres, maximum must not precede minimum, and enabled feature refinement must lie within minimum/maximum. Coarsening passes must be 0..10, breakline count 0..10000000, transition finite and >=1.05. Enum validity and relationships between other tolerances are not checked. No project mutation or implicit fallback application.
◆ alignTerrain
| bool mesh::ResolutionSettings::alignTerrain = true |
◆ averagingM
| std::optional<double> mesh::ResolutionSettings::averagingM |
◆ breaklineToleranceM
| std::optional<double> mesh::ResolutionSettings::breaklineToleranceM |
◆ cellPlanning
◆ coarseningOrder
| CoarseningOrder mesh::ResolutionSettings::coarseningOrder =CoarseningOrder::LegacyFlatness |
◆ coarsenPasses
| int mesh::ResolutionSettings::coarsenPasses = 0 |
Absent in older projects: retain their original mesh behaviour.
◆ featureM
| std::optional<double> mesh::ResolutionSettings::featureM |
◆ maxBreaklines
| int mesh::ResolutionSettings::maxBreaklines = 0 |
◆ maximumM
| std::optional<double> mesh::ResolutionSettings::maximumM |
◆ minimumBreaklineLengthM
| std::optional<double> mesh::ResolutionSettings::minimumBreaklineLengthM |
◆ minimumEdgeM
| std::optional<double> mesh::ResolutionSettings::minimumEdgeM |
◆ minimumM
| double mesh::ResolutionSettings::minimumM = 6.096 |
◆ reference
◆ refineFeatures
| bool mesh::ResolutionSettings::refineFeatures = false |
◆ sizing
◆ terrain
◆ terrainTolerancePolicy
◆ toleranceM
| std::optional<double> mesh::ResolutionSettings::toleranceM |
◆ transition
| double mesh::ResolutionSettings::transition = 2.0 |
The documentation for this struct was generated from the following file:
- /home/runner/work/openswmm.gui/openswmm.gui/libraries/meshkit/include/mesh/meshresolution.h