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
patch.hpp File Reference
Include dependency graph for patch.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  meshkit::plan::StructuredPatch
 Four-sided patch: corners in cyclic order (either orientation); n subdivisions along corner0→corner1 (and corner3→corner2), m along corner0→corner3 (and corner1→corner2). More...
 
struct  meshkit::plan::SweptPatch
 Swept patch: the centreline is offset ±width/2 (mitred at interior vertices) and cut into across quads per station. along > 0 resamples every centreline segment to that target spacing (original vertices are kept); 0 = one station per centreline vertex. More...
 
struct  meshkit::plan::BankPairPatch
 Two open bank polylines with independently supplied directions. Endpoints are paired by minimum total connection length. Stations use the union of normalized arc-length vertices, retaining every bank bend exactly. Positive along subdivides that union to the target spacing; zero retains only the union. This is normalized arc correspondence, not surveyed stations. More...
 
struct  meshkit::plan::PatchLine
 A polyline through a patch's vertices that must be reported as mesh edges with a marker — a conduit running along a strip's middle row. More...
 
struct  meshkit::plan::PatchMesh
 A generated patch in local indices. Quads are emitted CCW. More...
 

Namespaces

namespace  meshkit
 
namespace  meshkit::plan
 

Functions

Text meshkit::plan::validate (const StructuredPatch &p)
 Input checks. Empty string = valid.
 
Text meshkit::plan::validate (const SweptPatch &p)
 Check swept input geometry and representable station/cell/boundary counts.
 
Text meshkit::plan::validate (const PatchMesh &pm)
 Requires finite convex CCW quads, consistently shared cell edges, and one simple boundary matching exactly the outer cell edges. Boundary crossings, remote touches, holes and disconnected pieces are rejected; an indexed boundary check avoids comparing every cell pair. Empty string = valid.
 
Polygon meshkit::plan::orderedPatchBoundary (const PatchMesh &pm, Text *err=nullptr)
 Validate the complete patch and return its CCW boundary, without a repeated closing vertex. Segment input orientation/order is immaterial. On failure returns an empty ring and sets err.
 
PatchMesh meshkit::plan::makeTransfinitePatch (const StructuredPatch &p, Text *err=nullptr)
 Transfinite interpolation on the four straight sides. The result has (n+1)×(m+1) vertices and n×m quads. On invalid input returns an empty PatchMesh and sets *err.
 
PatchMesh meshkit::plan::makeSweptPatch (const SweptPatch &p, Text *err=nullptr)
 Sweep the centreline: (stations)×(across+1) vertices, (stations-1)×across quads. Station and index counts are checked before allocation. Invalid or globally overlapping/touching offsets return an empty PatchMesh and a diagnostic identifying the affected stations.
 
PatchMesh meshkit::plan::makeBankPairPatch (const BankPairPatch &p, Text *err=nullptr)
 Build a conforming strip between two simple, disjoint banks. Rejects ambiguous endpoint pairing, touching/crossing banks, folded cells, unrepresentable station geometry and unsafe subdivision counts.
 
PatchMesh meshkit::plan::makeTransfinitePatch (const Vector< Vector< Point2 > > &sides, int n, int m, const Text &tag, Text *err=nullptr)
 Transfinite (Coons) interpolation on four POLYLINE sides forming a loop: sides[0] runs c0→c1, sides[1] c1→c2, sides[2] c2→c3, sides[3] c3→c0 (each side's last point equals the next side's first). Sides are arc-length parametrised; n subdivisions along sides 0/2, m along 1/3. Boundary vertices are placed ON the polylines (so the ring the caller emits as PSLG segments is exactly this patch's boundary loop). Returns an empty PatchMesh + *err on invalid input (side with < 2 points, endpoints not matching, n or m < 1, folded quad).
 
PatchMesh meshkit::plan::makeTransfinitePatchAtStations (const Vector< Vector< Point2 > > &sides, const Text &tag, Text *err=nullptr)
 
PatchMesh meshkit::plan::makeMappedPatch (const Polygon &ring, const Vector< int > &corners, double h, const Text &tag, Text *err=nullptr)
 Split a CCW ring at the four corners (ring vertex indices, ring order) into polyline sides, choose n = max(1, round(mean(len0, len2)/h)), m likewise from sides 1/3, and call the polyline overload.
 
PatchMesh meshkit::plan::makeMappedPatch (const Polygon &ring, const Vector< int > &corners, double hAlong, double hAcross, double alongAngleDeg, const Text &tag, Text *err=nullptr)
 Mapped patch with independent physical-axis spacing. The axis is undirected, measured counterclockwise from +x in degrees. The opposite logical side pair most aligned with it receives hAlong; the other receives hAcross. Equal association scores are rejected. Ring rotation/reversal must not exchange the physical spacings. Widths use the ring's coordinate units.