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
pslgminsize.cpp File Reference
#include "mesh/pslgminsize.h"
#include "mesh/pslgprep.h"
#include <QHash>
#include <QSet>
#include <QtGlobal>
#include <QtMath>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>
Include dependency graph for pslgminsize.cpp:

Namespaces

namespace  mesh
 
namespace  mesh::pslg
 

Functions

QString mesh::pslg::violationCauseName (ViolationCause c)
 
QVector< Violationmesh::pslg::analyseLocalFeatureSize (const QVector< QPolygonF > &domains, const QVector< QVector< QPointF > > &holeRings, const QVector< ConstraintSegment > &segs, const QVector< SteinerPoint > &pts, double h, int maxReported=200)
 Analyse the PSLG's local feature size. Read-only.
 
bool mesh::pslg::conditionMinSize (QVector< QPolygonF > *domains, QVector< QVector< QPointF > > *holeRings, QVector< ConstraintSegment > *segs, QVector< SteinerPoint > *pts, const MinSizePolicy &policy, ConditionReport *report, const std::function< bool()> &isCancelled={})
 Condition the PSLG so it can support cells of size policy.minCellSize.
 

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

See pslgminsize.h for why this file exists and what it guarantees.

Everything here works on one unified Pool of vertices plus a list of Paths that index into it. That indirection is the whole trick: welding a vertex is a union-find link, and every path referencing it — a domain ring, a hole ring, three conduits — follows automatically. Conditioning each geometry kind separately cannot work, because the violations that matter are BETWEEN kinds (a conduit endpoint a hair from the domain edge).

The segment index is chunked with a global chunk budget, copied from the worker's existing near-constraint filter (meshgenerationdialog.cpp:1429) so a pathological bufferDist degrades the same way in both places.

Variable Documentation

◆ a

QPointF a

◆ b

QPointF b

◆ byCoord

QHash<QPair<quint64, quint64>, int> byCoord

◆ closed

bool closed = false

◆ closedDup

bool closedDup = false

input repeated its first vertex at the end

◆ crossings

int crossings = 0

proper X crossings

◆ degenerateRings

int degenerateRings = 0

closed paths that enclose no area

◆ dropped

bool dropped = false

◆ duplicates

int duplicates = 0

the same undirected vertex pair emitted twice

◆ e

int e = -1

◆ kind

PathKind kind = PathKind::Constraint

◆ marker

int marker = 0

◆ origPos

QVector<QPointF> origPos

for the displacement bound

◆ overflow

bool overflow = false

◆ overlaps

int overlaps = 0

collinear and sharing more than a point

◆ parent

QVector<int> parent

union-find

◆ path

int path = -1

◆ paths

QVector<Path> paths

◆ pool

Pool pool

◆ pos

QVector<QPointF> pos

◆ prio

QVector<int> prio

◆ readOnly

bool readOnly = false

◆ ref

EdgeRef ref

◆ src

int src = -1

index into the caller's vector; -1 = new

◆ tag

QString tag

◆ v

QVector<int> v

pool vertex indices

◆ verified

bool verified = false

false when the broad phase gave up

◆ zeroLength

int zeroLength = 0