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
meshgenerator.cpp File Reference
#include "mesh/meshgenerator.h"
#include "mesh/meshcellgeom.h"
#include "mesh/meshcrossfield.h"
#include "mesh/meshquadpoints.h"
#include "mesh/meshquadquality.h"
#include "mesh/meshsubmap.h"
#include <QDebug>
#include <QHash>
#include <QRectF>
#include <QSet>
#include <QStringList>
#include <QtMath>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include "triangle.h"
Include dependency graph for meshgenerator.cpp:

Namespaces

namespace  mesh
 

Macros

#define TRILIBRARY
 

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

Slice AU — Triangle wrapper. Builds the input triangulateio, runs Shewchuk's triangulate(), and re-packs the output into mesh::MeshResult. Tag round-trip is via Triangle's marker (point/segment) and region-attribute (triangle) channels.

Quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §3.3, §4) ride on the same single CDT: Mapped / Submapped rings become internal patches (hole + stitched quads, exactly like addPatch), Free / TrianglesOnly rings become a locked constraint loop with a RegionMarker whose attribute is -(regionIndex+1); Free regions additionally receive a cross-field aligned lattice of Steiner points, no Triangle area refinement inside (the -u hook returns "unconstrained" there), and after Triangle their triangles are paired into quads (template lookup + blossom), cleaned up and smoothed. Without quad regions the pipeline is unchanged.

Macro Definition Documentation

◆ TRILIBRARY

#define TRILIBRARY

Variable Documentation

◆ bbox

QRectF bbox

◆ droppedSteiners

int droppedSteiners = 0

◆ gradeFromField

bool gradeFromField = false

No explicit QuadRegion::spacing was given, so h came from the size function and the lattice should follow it point by point rather than hold the single centroid sample.

◆ h

double h = 0.0

◆ holesR

QVector<QPolygonF> holesR

normalizeRingCCW of every r.holes ring.

◆ index

int index = -1

Position in m_quadRegions / m_quadReports.

◆ isBackground

bool isBackground = false

Ring is a domain outline already present in the PSLG: emit no ring segments for it (QUAD_EVERYWHERE_PLAN_2026-09-07.md §3.1).

◆ mode

QuadRegionMode mode = QuadRegionMode::Free

Resolved mode.

◆ movable

QSet<int> movable

Generated lattice vertices (new pushPoint indices).

◆ ring

QPolygonF ring

normalizeRingCCW(r.ring).

◆ ringInputIdx

QVector<int> ringInputIdx

pushPoint index of every ringR vertex.

◆ ringR

QPolygonF ringR

resampleRing(ring, h) — Free / TrianglesOnly.

◆ seedInputIdx

QVector<int> seedInputIdx

◆ seedSet

QSet<int> seedSet

◆ seedXY

QVector<QPointF> seedXY

Fixed interior seeds (junction Steiners, segment vertices).

◆ tag

QString tag

r.tag or inherited from a dropped RegionMarker.

◆ templates

QVector<QuadTemplate> templates

Input (== Triangle output) vertex ids.