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
meshquadpoints.cpp File Reference
#include "mesh/meshquadpoints.h"
#include "mesh/meshquadregion.h"
#include <QHash>
#include <QRectF>
#include <QSet>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
Include dependency graph for meshquadpoints.cpp:

Namespaces

namespace  mesh
 

Functions

double mesh::distanceToRing (const QPolygonF &ring, const QPointF &p)
 Distance from p to the closest ring edge.
 
double mesh::distanceToRings (const QPolygonF &ring, const QVector< QPolygonF > &holes, const QPointF &p)
 Distance from p to the closest edge of ring or of any hole.
 
QuadPointSet mesh::placeQuadPoints (const QPolygonF &ring, const QVector< QPointF > &seeds, int ringCount, const CrossField &field, const QuadPointOptions &opts)
 Place lattice points inside ring (CCW, open) aligned to field. seeds = ring vertices (exactly ringCount of them, in ring order) followed by fixed interior points. Returns an empty set when h <= 0 or the ring has fewer than 3 vertices.
 
QuadPointSet mesh::placeQuadPoints (const QPolygonF &ring, const QVector< QPolygonF > &holes, const QVector< QPointF > &seeds, int ringCount, const CrossField &field, const QuadPointOptions &opts)
 Hole-aware overload: no point is placed inside any ring of holes, and the boundary clearance is kept from the hole rings as well as from ring (QUAD_EVERYWHERE_PLAN_2026-09-07.md §3.1). An empty holes is identical to the overload above.
 

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

Field-aligned frontal point placement (QUAD_MESHING_REDESIGN_PLAN §4.4d): boundary layer at distance h inside the ring, FIFO front along the four cross-field directions with Shimada-style clearance / separation tests, and template (lattice square) recognition by nearest-point snapping. All queries go through a uniform grid hash of cell size h; every tie is broken by the lowest point index so the output is deterministic.