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
meshpatch.h
Go to the documentation of this file.
1
20#ifndef OPENSWMMVIS_MESH_MESHPATCH_H
21#define OPENSWMMVIS_MESH_MESHPATCH_H
22
23#include "mesh/meshresult.h"
24
25#include <QPair>
26#include <QPointF>
27#include <QPolygonF>
28#include <QString>
29#include <QVector>
30
31namespace mesh {
32
37{
38 QVector<QPointF> corners;
39 int n = 0, m = 0;
40 QString tag;
41};
42
48{
49 QVector<QPointF> centreline;
50 double width = 0.0;
51 int across = 0;
52 double along = 0.0;
53 QString tag;
54};
55
58{
59 QVector<QPointF> xy;
60 QVector<MeshTriangle> quads;
61 QVector<QPair<int,int>> boundarySegments;
62 QString tag;
63};
64
66QString validate(const StructuredPatch &p);
67QString validate(const SweptPatch &p);
70QString validate(const PatchMesh &pm);
71
75PatchMesh makeTransfinitePatch(const StructuredPatch &p, QString *err = nullptr);
76
80PatchMesh makeSweptPatch(const SweptPatch &p, QString *err = nullptr);
81
82// ── Quad-region redesign (QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §4.2) ───
83
92PatchMesh makeTransfinitePatch(const QVector<QVector<QPointF>> &sides, int n, int m,
93 const QString &tag, QString *err = nullptr);
94
98PatchMesh makeMappedPatch(const QPolygonF &ring, const QVector<int> &corners, double h,
99 const QString &tag, QString *err = nullptr);
100
101} // namespace mesh
102
103#endif // OPENSWMMVIS_MESH_MESHPATCH_H
QString err
Definition inpmeshwriter.cpp:575
ArrowPlacement p
Definition linesymbollayer.cpp:27
MaskMode m
Definition maskspec.cpp:18
int h
Definition mesh2dresultsexport.cpp:387
std::size_t n
Definition mesh2dresultsexport.cpp:426
QPolygonF ring
normalizeRingCCW(r.ring).
Definition meshgenerator.cpp:156
QString tag
r.tag or inherited from a dropped RegionMarker.
Definition meshgenerator.cpp:167
Definition meshcommands.h:302
PatchMesh makeTransfinitePatch(const StructuredPatch &p, QString *err=nullptr)
Transfinite interpolation on the four straight sides. The result has (n+1)×(m+1) vertices and n×m qua...
Definition meshpatch.cpp:160
PatchMesh makeMappedPatch(const QPolygonF &ring, const QVector< int > &corners, double h, const QString &tag, QString *err=nullptr)
Split a CCW ring at the four corners (ring vertex indices, ring order) into polyline sides,...
Definition meshpatch.cpp:318
PatchMesh makeSweptPatch(const SweptPatch &p, QString *err=nullptr)
Sweep the centreline: (stations)×(across+1) vertices, (stations-1)×across quads. On invalid input (or...
Definition meshpatch.cpp:367
QString validate(const StructuredPatch &p)
Input checks. Empty string = valid.
Definition meshpatch.cpp:94
A generated patch in local indices. Quads are emitted CCW.
Definition meshpatch.h:58
QVector< QPair< int, int > > boundarySegments
Local index pairs around the patch.
Definition meshpatch.h:61
QVector< MeshTriangle > quads
v3 >= 0, local indices.
Definition meshpatch.h:60
QString tag
Definition meshpatch.h:62
QVector< QPointF > xy
Definition meshpatch.h:59
Four-sided patch: corners in cyclic order (either orientation); n subdivisions along corner0→corner1 ...
Definition meshpatch.h:37
QString tag
Definition meshpatch.h:40
int n
Definition meshpatch.h:39
QVector< QPointF > corners
Exactly 4, cyclic.
Definition meshpatch.h:38
int m
Definition meshpatch.h:39
Swept patch: the centreline is offset ±width/2 (mitred at interior vertices) and cut into across quad...
Definition meshpatch.h:48
double along
Definition meshpatch.h:52
QString tag
Definition meshpatch.h:53
double width
Definition meshpatch.h:50
int across
Definition meshpatch.h:51
QVector< QPointF > centreline
>= 2 points.
Definition meshpatch.h:49