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

Namespaces

namespace  mesh
 

Functions

bool mesh::ringIsRectilinear (const QPolygonF &ring, double tolDeg, double *frameAngleDeg)
 True when every edge of the (normalised) ring is parallel to one of two perpendicular axes within tolDeg. frameAngleDeg receives the frame rotation when non-null.
 
PatchMesh mesh::makeSubmappedPatch (const QPolygonF &ring, double h, const QString &tag, QString *err=nullptr, double tolDeg=2.0)
 Build the submapped patch. On failure returns an empty PatchMesh and sets *err ("not rectilinear", "spacing must be > 0", "degenerate ring").
 

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

Grid-based submapping of a rectilinear ring (QUAD_MESHING_REDESIGN_PLAN §4.3, reduced scope): local frame from the length-weighted mean edge direction (angle doubling trick on 4φ), axis snapping of every edge run, grid bands between the distinct local coordinates split at spacing h, and one rectangle per grid cell whose centre lies inside the ring.