16namespace n = meshkit::plan;
20 return {p.x(), p.y()};
25 return {p.
x(), p.
y()};
38 return {{b.left(), b.top()}, {b.right(), b.bottom()}};
57inline n::Text
native(
const QString &s)
59 return s.toStdString();
69inline QString
qt(
const n::Text &s)
71 return QString::fromStdString(s);
98template <
class T> T
qt(T v)
188inline n::Polygon
native(
const QPolygonF &);
189inline QPolygonF
qt(
const n::Polygon &);
201template <
class T>
auto native(
const QVector<T> &v)
203 n::Vector<
decltype(
native(T{}))> out;
204 out.reserve(v.size());
205 for (
int i = 0; i < v.size(); ++i) {
206 const T value = v[i];
207 out.append(
native(value));
222template <
class T>
auto qt(
const n::Vector<T> &v)
224 QVector<
decltype(
qt(T{}))> out;
225 out.reserve(v.size());
226 for (
int i = 0; i < v.size(); ++i) {
227 const T value = v[i];
228 out.append(
qt(value));
240inline n::Polygon
native(
const QPolygonF &v)
243 out.reserve(v.size());
249inline QPolygonF
qt(
const n::Polygon &v)
251 return QPolygonF(
qt(
static_cast<const n::Vector<meshkit::Point2> &
>(v)));
256 return static_cast<n::QuadRegionMode
>(v);
266 return static_cast<n::PatchDisposition
>(v);
279 return static_cast<n::ConstraintSimplificationPolicy::Mode
>(v);
295 return static_cast<n::SimplificationFeature::Role
>(v);
362 n::StructuredPatch out;
404 n::BankPairPatch out;
479 n::ConstraintSegment out;
524 n::ConstraintSimplificationPolicy out;
556 n::ConstraintPolicyOverride out;
585 n::SimplificationFeature out;
619 n::SimplificationChange out;
652 n::ConstraintSimplificationOptions out;
680 n::ConstraintSimplificationResult out;
713 n::ConstraintAuditOptions out;
739 n::ConstraintAuditExample out;
761 n::ConstraintAuditReport out;
805 n::PatchDecision out;
831 n::PatchAssessment out;
853 n::PatchInterfaceConflict out;
875 n::PatchInterfaceReport out;
901 n::QuadPlanningGeometry out;
955 n::QuadBlockGrid out;
977 n::QuadBlockOptions out;
1012 out.vertices.borrow(&m.
vertices, m.
vertices.size(), [](
const void *p, std::size_t i) {
1013 const auto &v = (*static_cast<const QVector<MeshVertex> *>(p))[i];
1014 return n::MeshVertex{native(v.xy), v.z};
1016 out.triangles.borrow(&m.triangles, m.triangles.size(), [](
const void *p, std::size_t i) {
1017 const auto &v = (*static_cast<const QVector<MeshTriangle> *>(p))[i];
1025 out.boundaryEdges.borrow(&m.boundaryEdges, m.boundaryEdges.size(),
1026 [](
const void *p, std::size_t i) {
1027 const auto &v = (*static_cast<const QVector<MeshEdge> *>(p))[i];
1031 e.marker = v.marker;
1047 n::SizeFieldOptions out;
1057 out.regions.append({
native(r.ring), r.h});
1059 out.terrainRegions.append({
native(r.ring), r.h});
1088 out.terrainToleranceForFootprint =
1092 QPointF points[3] = {
qt(p[0]),
qt(p[1]),
qt(p[2])};
1093 return f(points, z);
1109 n::QuadPlanningOptions out;
1119 out.excluded = [f = o.
excluded](
const n::Polygon &p) {
return f(
qt(p)); };
Automatic open-area quad blocks (workplans/MESH_REGIONAL_TRIQUAD_PLAN_2026-10-03.md,...
Axis-aligned rectangle in the XY plane, stored as an origin corner and a signed size.
Definition geometry.hpp:167
constexpr double left() const
X of the origin corner; the minimum x when width() >= 0.
Definition geometry.hpp:186
constexpr double bottom() const
top() + height(); the maximum y when height() >= 0.
Definition geometry.hpp:192
constexpr double right() const
left() + width(); the maximum x when width() >= 0.
Definition geometry.hpp:188
constexpr double top() const
Y of the origin corner; the minimum y when height() >= 0.
Definition geometry.hpp:190
Point or displacement vector in the horizontal (XY) plane.
Definition geometry.hpp:21
constexpr double y() const noexcept
Y coordinate in XY plane units.
Definition geometry.hpp:36
constexpr double x() const noexcept
X coordinate in XY plane units.
Definition geometry.hpp:34
Conversions between the Qt value types of namespace mesh and the standard types of meshkit::plan,...
meshkit::Point2 native(QPointF p)
Copy the x and y of a QPointF into a meshkit::Point2.
Definition qtnative.h:18
QPointF qt(meshkit::Point2 p)
Copy the x and y of a meshkit::Point2 into a QPointF.
Definition qtnative.h:23
QuadRegionMode
Requested (or classified) cell strategy of a QuadRegion.
Definition meshquadregion.h:45
PatchDisposition
Final outcome of one quad region in unified cell planning.
Definition cellplanner.h:19
Planning algorithms on standard containers: quad patch planning and placement, size fields,...
Automatic open-area quad blocks (workplans/MESH_REGIONAL_TRIQUAD_PLAN_2026-10-03.md,...
Graded element sizing for Delaunay refinement (MESH_MINSIZE_ENFORCEMENT_V2_AND_GRADING_PLAN_2026-09-0...
Graded element sizing for Delaunay refinement (MESH_MINSIZE_ENFORCEMENT_V2_AND_GRADING_PLAN_2026-09-0...
Two open bank polylines with independently supplied directions.
Definition meshpatch.h:68
QVector< QPointF > bankA
First bank: open polyline of >= 2 finite points with no repeated consecutive point.
Definition meshpatch.h:73
QVector< QPointF > bankB
Second bank, same rules; must not touch or cross bankA.
Definition meshpatch.h:73
int across
Quads between the banks at every station; must be >= 1.
Definition meshpatch.h:74
QString tag
Copied to the generated patch and its quads.
Definition meshpatch.h:76
double along
Target station spacing in XY units; finite >= 0 (0 = union only).
Definition meshpatch.h:75
Qt form of meshkit::plan::ConstraintAuditExample: one recorded audit violation.
Definition constraintaudit.h:33
QString featureId
Id of the offending feature, or "pin", "graph" or "mesh" for violations not tied to one feature.
Definition constraintaudit.h:41
int segment
Index of the related vertex, segment, pin or delivered edge record (meaning depends on the message); ...
Definition constraintaudit.h:44
QString message
English description of the violation.
Definition constraintaudit.h:41
Qt form of meshkit::plan::ConstraintAuditOptions: pins, cancellation and resource limits for the cons...
Definition constraintaudit.h:11
std::function< bool()> cancelled
Optional; polled before work starts and every 4096 work units.
Definition constraintaudit.h:18
QVector< QPointF > protectedPoints
XY pins that simplified shortcuts must not cross, sweep over or (with the feature's minimumClearance)...
Definition constraintaudit.h:15
quint64 workBudget
Work units allowed; 0 selects 256 per input item plus 100,000 (items: original and candidate vertices...
Definition constraintaudit.h:22
int maximumExamples
Violations kept in ConstraintAuditReport::examples, clamped to [0, 1000]; all are still counted.
Definition constraintaudit.h:28
quint64 maximumWorkspaceBytes
Estimated workspace limit in bytes (default 1 GiB); exceeding it sets resourceLimited.
Definition constraintaudit.h:25
Qt form of meshkit::plan::ConstraintAuditReport: result of auditConstraintSimplification() or auditMe...
Definition constraintaudit.h:50
double coordinateRoundoff
Largest XY matching tolerance used, 32 machine epsilons times the segment's coordinate scale; mesh au...
Definition constraintaudit.h:98
quint64 violations
Total violations found, including those beyond maximumExamples.
Definition constraintaudit.h:81
quint64 segmentsChecked
Output segments (simplification audit) or required source segments (mesh audit) examined.
Definition constraintaudit.h:80
QString error
Empty when no violation was found and the audit finished; otherwise "<id>: <message>" of the first vi...
Definition constraintaudit.h:65
bool ok
complete and no violations: the only state that certifies the input.
Definition constraintaudit.h:62
quint64 featuresChecked
Features examined (simplification audit), or required features examined (mesh audit).
Definition constraintaudit.h:80
double maximumXYDeviation
Largest XY distance found: of a removed vertex from its output shortcut (simplification audit),...
Definition constraintaudit.h:97
double maximumZDeviation
Largest Z difference found, in Z units: of a removed vertex from linear interpolation,...
Definition constraintaudit.h:97
bool cancelled
ConstraintAuditOptions::cancelled stopped the audit.
Definition constraintaudit.h:62
quint64 workUsed
Work units consumed.
Definition constraintaudit.h:81
bool complete
Not cancelled and not resource-limited.
Definition constraintaudit.h:62
double maximumAreaChange
Largest absolute ring area change in squared XY units; simplification audit only.
Definition constraintaudit.h:97
QVector< ConstraintAuditExample > examples
First violations, at most maximumExamples (clamped to [0, 1000]).
Definition constraintaudit.h:100
quint64 cellsChecked
Delivered cells visited; mesh audit only.
Definition constraintaudit.h:80
bool resourceLimited
The work budget or workspace estimate ran out.
Definition constraintaudit.h:62
Partial ConstraintSimplificationPolicy layered over a parent policy, for per-source overrides.
Definition constraintsimplifier.h:65
int mode
Mode override; validate() rejects values outside [-1, 1].
Definition constraintsimplifier.h:67
std::optional< double > maxTurnDegrees
Replaces ConstraintSimplificationPolicy::maxTurnDegrees when set (degrees).
Definition constraintsimplifier.h:79
std::optional< double > minimumClearance
Replaces ConstraintSimplificationPolicy::minimumClearance when set (XY units).
Definition constraintsimplifier.h:80
std::optional< double > maxAreaChangeFraction
Replaces ConstraintSimplificationPolicy::maxAreaChangeFraction when set; must be nonnegative here,...
Definition constraintsimplifier.h:80
std::optional< double > maxZDeviation
Replaces ConstraintSimplificationPolicy::maxZDeviation when set (Z units).
Definition constraintsimplifier.h:79
std::optional< double > maxDeviation
Replaces ConstraintSimplificationPolicy::maxDeviation when set (XY units).
Definition constraintsimplifier.h:79
A polyline that must appear as constrained edges in the mesh.
Definition meshgenerator.h:53
double stripWidth
Width of a swept quad strip along the line; 0 (default) = no strip.
Definition meshgenerator.h:64
int marker
Preserved on output edges.
Definition meshgenerator.h:55
QVector< QPointF > path
>= 2 points; consecutive pairs become constrained edges.
Definition meshgenerator.h:54
QString tag
Resolved later via the marker→tag lookup the caller maintains.
Definition meshgenerator.h:56
Collection-wide inputs and resource limits for simplifyConstraints().
Definition constraintsimplifier.h:166
std::function< bool()> cancelled
Optional cancellation poll, called synchronously at the start and about every 4096 work units; return...
Definition constraintsimplifier.h:172
quint64 maximumWorkspaceBytes
Estimated byte limit for the shared-edge canonicalization records (1 GiB by default).
Definition constraintsimplifier.h:183
QVector< QPointF > protectedPoints
Finite points in the planar frame that no shortcut may pass through or enclose between itself and the...
Definition constraintsimplifier.h:169
quint64 workBudget
Work-unit limit for the pass; 0 selects 256 per input vertex plus 100,000.
Definition constraintsimplifier.h:176
bool canonicalizeSharedEdges
Simplify segments shared exactly by several features once, as canonical chains under the strictest ow...
Definition constraintsimplifier.h:180
Per-feature limits for constraint simplification.
Definition constraintsimplifier.h:21
double maxDeviation
Largest XY distance a removed vertex may lie from the shortcut replacing it; 0 allows removing only e...
Definition constraintsimplifier.h:32
Mode mode
Simplification mode; Preserve by default.
Definition constraintsimplifier.h:29
double minimumClearance
XY distance a shortcut must keep from other original segments and protected points that do not touch ...
Definition constraintsimplifier.h:48
double maxTurnDegrees
Corner limit in degrees (0 = straight on): a vertex whose direction change exceeds it,...
Definition constraintsimplifier.h:39
double maxAreaChange
Rings only: largest |area change|; must be finite and nonnegative or exactly -1.
Definition constraintsimplifier.h:45
Mode
Whether a feature may lose vertices.
Definition constraintsimplifier.h:28
double maxAreaChangeFraction
Rings only: largest |area change| as a fraction of |original area|, in [0, 1] or exactly -1.
Definition constraintsimplifier.h:42
double maxZDeviation
Largest difference between a removed vertex's z and the height interpolated linearly along the shortc...
Definition constraintsimplifier.h:36
Output of simplifyConstraints(); features and changes are parallel to the input.
Definition constraintsimplifier.h:186
bool ok
True when the pass finished, also when exhausted limits kept the originals (see SimplificationChange:...
Definition constraintsimplifier.h:192
quint64 sharedChains
Canonical chains built from shared segments; counted only by the shared-edge path,...
Definition constraintsimplifier.h:204
quint64 sharedSegments
Distinct segments owned by more than one feature; counted only by the shared-edge path,...
Definition constraintsimplifier.h:204
bool cancelled
Cancellation was observed; ok is false and the features are the originals.
Definition constraintsimplifier.h:192
QVector< SimplificationFeature > features
Output features; the originals on failure.
Definition constraintsimplifier.h:194
QVector< SimplificationChange > changes
One outcome per input feature.
Definition constraintsimplifier.h:195
QString error
English reason when ok is false without cancellation; otherwise empty.
Definition constraintsimplifier.h:193
quint64 workUsed
Work units consumed, including shared-edge indexing.
Definition constraintsimplifier.h:204
Result of MeshGenerator::generate.
Definition meshresult.h:203
QVector< MeshVertex > vertices
Mesh vertices; cells and edges index into this array.
Definition meshresult.h:206
bool ok
True only when the producer (generator or reader) succeeded.
Definition meshresult.h:262
QString errorMsg
Failure reason when ok is false; empty on success.
Definition meshresult.h:263
A cell in the mesh — a triangle or (since the engine's mixed tri-quad meshes, workplans/TRI_QUAD_MESH...
Definition meshresult.h:64
int v2
Third corner, cyclically after v1.
Definition meshresult.h:71
int v1
Second corner, cyclically after v0.
Definition meshresult.h:71
int v3
Fourth vertex of a quadrilateral; -1 = triangle.
Definition meshresult.h:72
int v0
First corner: index into MeshResult::vertices (not range-checked here).
Definition meshresult.h:71
QString tag
Region tag, for example a subcatchment ID; empty if untagged.
Definition meshresult.h:73
Result of assessPlannedPatch().
Definition cellplanner.h:79
QString reason
English reason for the first failure; empty when ok.
Definition cellplanner.h:89
bool cancelled
PatchLimits::cancelled returned true.
Definition cellplanner.h:88
bool ok
Every cell met every limit.
Definition cellplanner.h:88
bool repairable
When ok is false: finer stations may fix the failure (angle, aspect, directional spacing,...
Definition cellplanner.h:88
Per-region planning record explaining the disposition chosen by planQuadRegions().
Definition cellplanner.h:21
QString source
Region tag, or "region:<i>" with the zero-based index when the tag is empty.
Definition cellplanner.h:27
QString reason
English explanation: the acceptance note, the refusal or priority reason, or the last repairable fail...
Definition cellplanner.h:27
int repairRounds
Station-doubling rounds the delivered patch needed; 0 otherwise.
Definition cellplanner.h:34
quint64 cells
n x m cell count at the patch's last successful assessment; 0 if none passed.
Definition cellplanner.h:33
PatchDisposition disposition
Final outcome.
Definition cellplanner.h:30
int region
Zero-based index into the planned regions; -1 when not assigned.
Definition cellplanner.h:28
bool required
QuadRegion::requireMapped or directionalSpacing was set.
Definition cellplanner.h:29
One interface face whose nominal-size ratio exceeds the limit.
Definition cellplanner.h:197
double firstSize
Nominal size of cell first (XY length).
Definition cellplanner.h:207
int second
Higher MeshResult::triangles index of the two incident cells.
Definition cellplanner.h:202
int first
Lower MeshResult::triangles index of the two incident cells.
Definition cellplanner.h:202
double secondSize
Nominal size of cell second (XY length).
Definition cellplanner.h:207
Result of auditPatchInterfaces().
Definition cellplanner.h:210
QVector< PatchInterfaceConflict > examples
Up to maximumExamples violations, sorted by cell indices.
Definition cellplanner.h:224
QString error
English reason when ok is false; empty otherwise.
Definition cellplanner.h:216
bool cancelled
Cancellation was observed; ok is false.
Definition cellplanner.h:215
quint64 violations
Shared faces whose size ratio exceeds the limit.
Definition cellplanner.h:221
bool ok
The audit completed on valid input; violations may still be present.
Definition cellplanner.h:215
quint64 sharedFaces
Interface edges with exactly two incident cells.
Definition cellplanner.h:221
double largestRatio
Largest size ratio over shared faces; 1 when none.
Definition cellplanner.h:222
Acceptance limits for one mapped patch, checked cell by cell by assessPlannedPatch().
Definition cellplanner.h:43
std::function< double(const QRectF &)> maximumSize
Optional size cap for a cell's XY bounding box, compared with sqrt(cell area); 0 means no cap,...
Definition cellplanner.h:67
double minimumAngleDegrees
Smallest allowed interior angle in degrees, in [0, 180); 0 disables.
Definition cellplanner.h:50
std::function< double(double, double)> elevationAt
Terrain elevation at (x, y), sampled at the quad corners; required by terrain checks.
Definition cellplanner.h:70
double terrainTolerance
Constant terrain error tolerance, used when terrainToleranceForFootprint is unset.
Definition cellplanner.h:61
double alongSize
Limit on the mean length of the opposite edge pair best aligned with alongAngleDegrees; 0 disables th...
Definition cellplanner.h:58
double maximumAspect
Largest allowed quad aspect ratio as computed by quadQuality(); 0 disables.
Definition cellplanner.h:50
double minimumEdge
Shortest allowed cell edge; 0 disables.
Definition cellplanner.h:50
std::function< double(const QRectF &)> terrainToleranceForFootprint
Optional tolerance for a cell's XY bounding box; replaces terrainTolerance and must return a finite p...
Definition cellplanner.h:64
double alongAngleDegrees
Undirected along axis in degrees counterclockwise from +x; must be finite.
Definition cellplanner.h:58
double acrossSize
Limit on the mean length of the other opposite edge pair; 0 disables.
Definition cellplanner.h:58
std::function< bool()> cancelled
Optional cancellation poll; planQuadRegions() also uses it as its cancellation source.
Definition cellplanner.h:76
std::function< double(const QPointF *, const double *)> terrainBound
Certified terrain error bound of the planar triangle through three XY points and heights (arrays vali...
Definition cellplanner.h:74
A polyline through a patch's vertices that must be reported as mesh edges with a marker — a conduit r...
Definition meshpatch.h:81
QVector< int > path
Local vertex indices, consecutive ones joined by quad edges.
Definition meshpatch.h:82
QString tag
Edge tag; empty = MeshGenerator resolves it from marker's constraint tag.
Definition meshpatch.h:84
int marker
Copied to each emitted MeshEdge::marker.
Definition meshpatch.h:83
A generated patch in local indices.
Definition meshpatch.h:88
QVector< MeshTriangle > quads
v3 >= 0, local indices.
Definition meshpatch.h:90
QString tag
Patch tag; MeshGenerator gives it to stitched quads whose own tag is empty.
Definition meshpatch.h:92
QVector< PatchLine > lines
Interior lines emitted as MeshResult::boundaryEdges with their marker and tag, and bounding region ta...
Definition meshpatch.h:95
QVector< QPair< int, int > > boundarySegments
Local index pairs around the patch.
Definition meshpatch.h:91
QVector< QPointF > xy
Vertex coordinates (caller XY units); local index = position.
Definition meshpatch.h:89
Local cell size on a regular grid; NaN marks unusable cells.
Definition quadblocks.h:34
int cols
Cells along +x; cell (c, r) is h[r * cols + c].
Definition quadblocks.h:41
QPointF origin
Lower-left corner of cell (0, 0).
Definition quadblocks.h:35
int rows
Cells along +y.
Definition quadblocks.h:41
QVector< float > h
Row-major, cols x rows.
Definition quadblocks.h:42
double pitch
Square cell side in planar mesh units; must be > 0 to be valid.
Definition quadblocks.h:36
Policy for placeQuadBlocks().
Definition quadblocks.h:58
int maxBlocks
Cap on regions returned; <= 0 returns none.
Definition quadblocks.h:64
double minSpacing
Blocks finer than this are not worth a patch.
Definition quadblocks.h:59
int minQuadsPerSide
Fewest quads of the block spacing per rectangle side (each side also spans >= 3 grid cells before it ...
Definition quadblocks.h:63
double bandRatio
Size bands are powers of this.
Definition quadblocks.h:60
Result of planQuadRegions().
Definition cellplanner.h:147
QVector< int > patchRegions
Zero-based region index of each entry in patches.
Definition cellplanner.h:158
bool resourceLimited
A work, workspace or cell budget stopped the plan or refused a required region.
Definition cellplanner.h:154
QVector< PatchDecision > decisions
One decision per input region, in input order.
Definition cellplanner.h:159
quint64 workUsed
Work units consumed.
Definition cellplanner.h:166
bool ok
Planning finished and every required region has a patch.
Definition cellplanner.h:154
QVector< PatchMesh > patches
Delivered patches with CCW quads, required regions first, then in region order.
Definition cellplanner.h:157
bool cancelled
Cancellation was observed; ok is false.
Definition cellplanner.h:154
quint64 plannedCells
Total quads over patches.
Definition cellplanner.h:166
quint64 sharedSides
Region sides that matched an already registered identical side path.
Definition cellplanner.h:166
QString error
English reason when ok is false; empty on success.
Definition cellplanner.h:155
Source geometry that protects against planned patches, in the regions' XY frame.
Definition cellplanner.h:132
QVector< QVector< QPointF > > lines
Protected open polylines; they may run along a patch boundary but not enter or cross it.
Definition cellplanner.h:140
QVector< PatchMesh > fixedPatches
Existing patches; their boundaries (orderedPatchBoundary()) take priority like holes.
Definition cellplanner.h:144
QVector< QPolygonF > domains
Domain rings; a patch must lie inside one (tested at its first cell's centroid) and no domain edge ma...
Definition cellplanner.h:138
QVector< QPolygonF > holes
Hole rings; they take priority over any patch.
Definition cellplanner.h:138
QVector< QPointF > pins
Protected points; one inside or on a patch must coincide with a generated vertex.
Definition cellplanner.h:142
Settings and budgets for planQuadRegions().
Definition cellplanner.h:104
quint64 maximumWorkspaceBytes
Estimated limit for the source index, stations and planned cells (2 GiB by default); not a bound on t...
Definition cellplanner.h:123
quint64 maximumPatchCells
Cell limit for a single patch.
Definition cellplanner.h:117
double defaultSize
Spacing for regions without a positive QuadRegion::spacing; finite and positive.
Definition cellplanner.h:107
std::function< bool(const QPolygonF &)> excluded
Optional veto given a candidate's ordered patch boundary; returning true refuses it.
Definition cellplanner.h:126
bool allowQuads
False refuses all regions: global triangles-only priority.
Definition cellplanner.h:105
quint64 workBudget
Work-unit limit; 0 selects 512 per maximumCells plus 100,000.
Definition cellplanner.h:123
int maximumRepairRounds
Rounds that double station counts after repairable failures; valid range [0, 3].
Definition cellplanner.h:112
quint64 maximumCells
Cell budget over all planned patches; also bounds side subdivision counts.
Definition cellplanner.h:117
PatchLimits limits
Limits for every candidate patch; a region's aspectMax, isotropic spacing and directional spacing ove...
Definition cellplanner.h:110
A polygon in which quadrilateral cells are requested, with its spacing, shape and tagging policy.
Definition meshquadregion.h:61
bool automaticCandidate
Derived candidate; no outline constraint on fallback.
Definition meshquadregion.h:79
QPolygonF ring
Closed (last == first optional), simple, any orientation.
Definition meshquadregion.h:62
double mappedAlongAngleDeg
Physical undirected along-axis, degrees from +x CCW; independent of ring start.
Definition meshquadregion.h:88
QVector< int > corners
Mapped: 4 ring vertex indices in ring order; empty = auto-pick.
Definition meshquadregion.h:98
QString tag
MeshTriangle::tag for every cell inside; empty = inherit region marker's.
Definition meshquadregion.h:99
double aspectMax
Free: opposite-side mean ratio cap; < 0 inherits global, 0 unbounded, >= 1 explicit.
Definition meshquadregion.h:90
double hAlong
Spacing for the side pair most aligned with mappedAlongAngleDeg (directional only).
Definition meshquadregion.h:85
bool directionalSpacing
Explicit Mapped spacing; failure must not fall back to isotropic cells.
Definition meshquadregion.h:81
QVector< QPointF > alignGuide
Free: optional polyline the field aligns to (streets, channels).
Definition meshquadregion.h:97
double alignAngleDeg
Free: cross-field angle, degrees from +x CCW, meaningful when hasAlignAngle.
Definition meshquadregion.h:95
bool hasAlignAngle
Free: constant cross field at alignAngleDeg (from +x, CCW).
Definition meshquadregion.h:92
QVector< QPolygonF > holes
Areas subtracted from ring (QUAD_EVERYWHERE_PLAN_2026-09-07.md §3.1): domain hole rings,...
Definition meshquadregion.h:67
double hAcross
Positive spacings in mesh CRS units, used only when directionalSpacing.
Definition meshquadregion.h:86
QuadRegionMode mode
Requested strategy (default Auto).
Definition meshquadregion.h:77
bool isBackground
True when ring IS a domain outline rather than a ring drawn inside one — the "toggle quads on for the...
Definition meshquadregion.h:74
double spacing
Target quad edge length h; 0 = derive from the size field / max area.
Definition meshquadregion.h:80
bool requireMapped
Explicit hard requirement, used by unified planning.
Definition meshquadregion.h:78
Outcome for one input feature; ConstraintSimplificationResult::changes is parallel to the input.
Definition constraintsimplifier.h:137
bool rolledBack
A simplification was reverted: the ring area limits failed or the ring area changed sign or vanished,...
Definition constraintsimplifier.h:160
qsizetype rejectedShortcuts
Candidate shortcuts refused by a deviation or topology check; each refusal keeps one more vertex and ...
Definition constraintsimplifier.h:145
double areaChange
Rings only: |output area - input area| in squared XY units.
Definition constraintsimplifier.h:152
QVector< int > sourceVertices
Output-to-input vertex indices, increasing; a repeated closing vertex maps to the last.
Definition constraintsimplifier.h:163
double maxZDeviation
Largest elevation error of a removed vertex against its accepted shortcut.
Definition constraintsimplifier.h:152
QString id
Copy of SimplificationFeature::id.
Definition constraintsimplifier.h:138
double maxDeviation
Largest XY distance of a removed vertex from its accepted shortcut.
Definition constraintsimplifier.h:152
bool budgetRetained
The work budget, the workspace limit or cancellation stopped the pass, so the original geometry was k...
Definition constraintsimplifier.h:160
qsizetype removed
Vertices removed (input minus output xy count); 0 when the feature is unchanged.
Definition constraintsimplifier.h:145
One source constraint, an open polyline or a ring, given to simplifyConstraints().
Definition constraintsimplifier.h:104
QString label
Display label; makeConstraintPreview() falls back to id when it is empty.
Definition constraintsimplifier.h:130
QVector< double > z
Elevations parallel to xy; a repeated closing vertex must repeat its elevation.
Definition constraintsimplifier.h:108
ConstraintSimplificationPolicy policy
Limits for this feature; validated before use.
Definition constraintsimplifier.h:112
bool closed
Treat the feature as a ring even without a repeated closing vertex.
Definition constraintsimplifier.h:111
Role
Meaning of the feature for the delivered-mesh audit; ignored by the simplifier.
Definition constraintsimplifier.h:126
QVector< QPointF > xy
Vertices in the common planar frame; all must be finite.
Definition constraintsimplifier.h:106
bool requiredInMesh
False makes the delivered-mesh audit skip it.
Definition constraintsimplifier.h:128
QString id
Caller identifier, copied to SimplificationChange::id and error prefixes.
Definition constraintsimplifier.h:105
enum mesh::SimplificationFeature::Role role
Feature role; Role::Line by default.
QVector< bool > fixed
Per-vertex flags parallel to xy; a flagged vertex is never removed.
Definition constraintsimplifier.h:110
int marker
Boundary marker; when nonzero, the mesh audit matches only this marker.
Definition constraintsimplifier.h:127
Policy for SizeField::build().
Definition sizefield.h:61
std::function< double(double, double)> terrainSizeAt
Terrain-error size bound in mesh units at a mesh coordinate (mesh::TerrainSizeField through the worke...
Definition sizefield.h:93
QVector< QVector< QPointF > > steps
Terrain break lines (mesh coordinates) that the generator lays mesh edges along (MESH_TRIANGLE_ENGINE...
Definition sizefield.h:116
qint64 maxGridCells
Nominal background-grid cell budget.
Definition sizefield.h:83
double maxSize
Upper clamp on the size (h_max, map units); 0 = unbounded.
Definition sizefield.h:88
double nearSize
Element size (edge length, map units) AT a feature.
Definition sizefield.h:66
double gradation
Lipschitz slope g: how fast the target size may grow per unit of distance from a feature.
Definition sizefield.h:73
double areaFloor
Refinement floor A_min (map units², from MinSizePolicy).
Definition sizefield.h:78
QVector< Region > regions
Size caps applied at grid centres inside each ring, and by bounding box in SizeField::minimumSizeInBo...
Definition sizefield.h:105
QVector< Region > terrainRegions
Finer prescribed directional scales; footprint terrain queries only.
Definition sizefield.h:106
bool footprintBounds
Build a compact min pyramid for verified sizing.
Definition sizefield.h:62
A point that must appear as a vertex in the output mesh.
Definition meshgenerator.h:68
bool hasZ
If true, z is exact — skip DTM re-sampling in post-mesh step.
Definition meshgenerator.h:73
QString tag
Convenience copy (caller can resolve via marker, but stash here too).
Definition meshgenerator.h:71
int marker
Carries a tag id; resolved via marker→tag map.
Definition meshgenerator.h:70
QPointF xy
Location in the mesh XY frame; must be finite or generate() fails.
Definition meshgenerator.h:69
double z
Pre-sampled elevation when hasZ is true (e.g. from DTM thinner).
Definition meshgenerator.h:72
Four-sided patch: corners in cyclic order (either orientation); n subdivisions along corner0→corner1 ...
Definition meshpatch.h:41
QString tag
Copied verbatim to PatchMesh::tag and to every quad's tag.
Definition meshpatch.h:48
int n
Quads along corner0→corner1; must be >= 1 (the default 0 fails validate()).
Definition meshpatch.h:47
QVector< QPointF > corners
Exactly 4, cyclic.
Definition meshpatch.h:42
int m
Quads along corner0→corner3; >= 1, and (n+1)(m+1) must fit an int index.
Definition meshpatch.h:47
Swept patch: the centreline is offset ±width/2 (mitred at interior vertices) and cut into across quad...
Definition meshpatch.h:55
double along
Target station spacing in XY units; finite >= 0 (0 = vertices).
Definition meshpatch.h:59
QString tag
Copied verbatim to PatchMesh::tag and to every quad's tag.
Definition meshpatch.h:60
double width
Full strip width in XY units; must be finite and > 0.
Definition meshpatch.h:57
int across
Quads across the strip at every station; must be >= 1.
Definition meshpatch.h:58
QVector< QPointF > centreline
>= 2 points.
Definition meshpatch.h:56