SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
meshquadcleanup.cpp File Reference
#include "mesh/meshquadcleanup.h"
#include "mesh/meshcellgeom.h"
#include "mesh/meshquadmerge.h"
#include <QHash>
#include <algorithm>
#include <cmath>
Include dependency graph for meshquadcleanup.cpp:

Namespaces

namespace  mesh
 

Functions

QVector< int > mesh::reorderTrianglesFirst (MeshResult &mesh)
 Reorder cells triangles-first, stable within each class. Returns the old→new cell index map. Shared with meshquadmatch.
 
QuadCleanupStats mesh::cleanupAndSmoothQuads (MeshResult &mesh, const QSet< int > &movable, const QuadCleanupOptions &opts, QVector< int > *vertexOldToNew)
 Run cleanup then smoothing. vertexOldToNew (optional) receives the vertex remap after doublet compaction (-1 = removed); identity when nothing was removed. Cells are rebuilt triangles-first afterwards.
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Topological cleanup and guarded smoothing inside quad regions (QUAD_MESHING_REDESIGN_PLAN §4.4g–h): doublet removal, valence-driven diagonal swaps, then Jacobi "parallelogram" smoothing accepted only when the minimum scaled Jacobian around the vertex does not drop and every incident cell keeps its orientation (quads: convexity). Only vertices in the movable set are moved or removed.

Variable Documentation

◆ cellAlive

QVector<bool> cellAlive

◆ cells

QVector<MeshTriangle>& cells

◆ incident

QVector<QVector<int> > incident

◆ V

QVector<MeshVertex>& V

◆ vertexAlive

QVector<bool> vertexAlive