Loading...
Searching...
No Matches
meshquadquality.h File Reference

Quadrilateral quality metrics (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §5). More...

#include "mesh/meshresult.h"
#include <QPointF>
#include <QVector>
#include <algorithm>
#include <cmath>
#include <limits>
Include dependency graph for meshquadquality.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mesh::QuadQualityBounds
 Acceptance bounds shared by pairing, cleanup, smoothing and the legacy tri-pair merge. More...
 
struct  mesh::QuadQuality
 Shape metrics of one quadrilateral, as computed by quadQuality(). More...
 

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.
 
namespace  mesh::quadquality_detail
 Internal checks behind the Qt quadrilateral quality metrics; not part of the supported API.
 

Functions

QuadQuality mesh::quadQuality (const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d)
 Measure one quadrilateral using cyclic corners and translation/scale-resistant planar arithmetic.
 
QuadQuality mesh::quadQuality (const QVector< MeshVertex > &vertices, const MeshTriangle &t)
 Measure a quad cell through its borrowed vertex records.
 
bool mesh::quadquality_detail::validMetrics (const QuadQuality &q)
 Check the internal finite/range/convexity invariants required before acceptance or scoring.
 
bool mesh::quadquality_detail::finiteBounds (const QuadQualityBounds &b)
 Check every supplied quality threshold is finite.
 
bool mesh::quadAcceptable (const QuadQuality &q, const QuadQualityBounds &b)
 Apply inclusive hard angle/Jacobian/aspect limits to a valid convex metric record.
 
double mesh::quadScore (const QuadQuality &q, const QuadQualityBounds &b)
 Rank valid convex quads by Jacobian, rectangularity and a soft aspect penalty.
 
double mesh::triangleScaledJacobian (const QPointF &a, const QPointF &b, const QPointF &c)
 Compute the minimum orientation-normalized corner sine of a triangle.
 
double mesh::cellCornerAngleDeg (const QVector< MeshVertex > &v, const MeshTriangle &t, int i)
 Compute the unsigned corner angle of a triangle or quad.
 

Detailed Description

Quadrilateral quality metrics (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §5).

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

Quadrilateral quality metrics (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §5).

Header-only. Every function takes the four corners in cyclic order (CCW or CW — angles are unsigned). "Scaled Jacobian" is Knupp's algebraic metric: at each corner, the sine of the interior angle; the quad's value is the minimum over the four corners (1 for a rectangle, 0.866 at 60°/120°, 0 when a corner degenerates, negative when the quad folds).