Loading...
Searching...
No Matches
meshquadcleanup.cpp File Reference

Topological cleanup and guarded smoothing inside quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §4.4g–h). More...

#include "mesh/meshquadcleanup.h"
#include "mesh/meshcellgeom.h"
#include "mesh/meshedgekey.h"
#include <QHash>
#include <algorithm>
#include <cmath>
Include dependency graph for meshquadcleanup.cpp:

Namespaces

namespace  mesh
 The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and cell attributes, the mesh generator, quad regions, matching and cleanup, mesh statistics, and the INP and 2DM mesh codecs.
 

Functions

QVector< int > mesh::reorderTrianglesFirst (MeshResult &mesh)
 Stable-partition cell rows into triangles followed by quads and remap selected cell metadata.
 
QuadCleanupStats mesh::cleanupAndSmoothQuads (MeshResult &mesh, const QSet< int > &movable, const QuadCleanupOptions &opts, QVector< int > *vertexOldToNew)
 Remove eligible quad doublets, improve valence diagonals, smooth movable xy and compact/reorder cells.
 

Detailed Description

Topological cleanup and guarded smoothing inside quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §4.4g–h).

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License
Apache-2.0

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.