33#ifndef OPENSWMMVIS_MESH_MESHQUADMATCH_H
34#define OPENSWMMVIS_MESH_MESHQUADMATCH_H
51 int v[4] = {-1, -1, -1, -1};
110 const QVector<QuadTemplate> &templates,
111 const QSet<QPair<int, int>> &lockedEdges,
130QVector<int>
maximumMatching(
int n,
const QVector<QPair<int, int>> &edges);
Quadrilateral quality metrics (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §5).
value types for the 2D mesh generator.
The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and...
QVector< int > maximumMatching(int n, const QVector< QPair< int, int > > &edges)
Compute an unweighted maximum-cardinality matching in an undirected general graph.
Definition meshquadmatch.cpp:103
bool unionQuad(const QVector< MeshVertex > &vertices, const MeshTriangle &t1, const MeshTriangle &t2, MeshTriangle &quad)
Form and convexity-check a CCW quadrilateral candidate from two triangle records.
Definition meshquadmatch.cpp:205
QuadPairingStats pairTrianglesIntoQuads(MeshResult &mesh, const QVector< int > &cellIds, const QVector< QuadTemplate > &templates, const QSet< QPair< int, int > > &lockedEdges, const QuadPairingOptions &opts, QVector< int > *oldToNew)
Pair selected valid triangle rows into acceptable CCW quads, then rebuild engine cell order.
Definition meshquadmatch.cpp:255
Result of MeshGenerator::generate.
Definition meshresult.h:203
A cell in the mesh — a triangle or (since the engine's mixed tri-quad meshes, workplans/TRI_QUAD_MESH...
Definition meshresult.h:64
Policy for pairTrianglesIntoQuads().
Definition meshquadmatch.h:55
QuadQualityBounds bounds
Every template or gap quad must pass quadAcceptable() under these bounds; quadScore() with them ranks...
Definition meshquadmatch.h:58
bool polish
Alternating-4-cycle improvement after blossom.
Definition meshquadmatch.h:60
bool gapPairing
Run blossom on the residual (false = templates only; tests).
Definition meshquadmatch.h:59
Counts reported by pairTrianglesIntoQuads().
Definition meshquadmatch.h:64
int leftoverTriangles
Region triangles still triangles on exit.
Definition meshquadmatch.h:68
int polishSwaps
Score-improving alternating-4-cycle swaps (at most 5 passes).
Definition meshquadmatch.h:69
int templateQuads
Quads formed from templates (step 1).
Definition meshquadmatch.h:65
int templatesSkipped
Split, already used, or failed the bounds.
Definition meshquadmatch.h:66
int gapQuads
Quads formed by blossom matching of the residual (step 2).
Definition meshquadmatch.h:67
Acceptance bounds shared by pairing, cleanup, smoothing and the legacy tri-pair merge.
Definition meshquadquality.h:37
Four vertex ids in cyclic (CCW) order, indexed into the generated mesh passed to pairTrianglesIntoQua...
Definition meshquadmatch.h:48
int v[4]
Corner vertex ids; a template with any out-of-range (default -1) or repeated id is skipped.
Definition meshquadmatch.h:51