Loading...
Searching...
No Matches
patch.hpp File Reference

Structured quad patches (workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md §3.2, phase G3). More...

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. More...
 
struct  meshkit::plan::BankPairPatch
 Two open bank polylines with independently supplied directions. 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. More...
 

Namespaces

namespace  meshkit
 The Qt-free MeshKit library: job events and progress (meshkit::runtime), the neutral mesh model, meshing jobs, the constrained Delaunay kernel and terrain surfaces (meshkit::core), and the MKB and SMS 2DM codecs (meshkit::io).
 
namespace  meshkit::plan
 Planning algorithms on standard containers: quad patch planning and placement, size fields, source-geometry simplification and the independent constraint and sizing audits.
 

Functions

Text meshkit::plan::validate (const StructuredPatch &p)
 Input checks.
 
Text meshkit::plan::validate (const SweptPatch &p)
 Input checks for a swept patch: >= 2 finite centreline points with no repeated consecutive vertex, finite width > 0, across >= 1, finite along >= 0, and station, cell and boundary counts that fit in int.
 
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.
 
Polygon meshkit::plan::orderedPatchBoundary (const PatchMesh &pm, Text *err=nullptr)
 Validate the complete patch and return its CCW boundary, without a repeated closing vertex.
 
PatchMesh meshkit::plan::makeTransfinitePatch (const StructuredPatch &p, Text *err=nullptr)
 Transfinite interpolation on the four straight sides.
 
PatchMesh meshkit::plan::makeSweptPatch (const SweptPatch &p, Text *err=nullptr)
 Sweep the centreline: (stations)×(across+1) vertices, (stations-1)×across quads.
 
PatchMesh meshkit::plan::makeBankPairPatch (const BankPairPatch &p, Text *err=nullptr)
 Build a conforming strip between two simple, disjoint banks.
 
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).
 
PatchMesh meshkit::plan::makeTransfinitePatchAtStations (const Vector< Vector< Point2 > > &sides, const Text &tag, Text *err=nullptr)
 Coons patch on four already-stationed sides that keeps every station exactly.
 
PatchMesh meshkit::plan::makeMappedPatch (const Polygon &ring, const Vector< int > &corners, double h, const Text &tag, Text *err=nullptr)
 Split a ring (either winding) 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.
 

Detailed Description

Structured quad patches (workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md §3.2, phase G3).

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License
Apache-2.0

Structured quad patches (workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md §3.2, phase G3). Two authoring forms:

  • meshkit::plan::StructuredPatch — a four-sided polygon meshed by transfinite (Coons) interpolation between opposite sides, n × m quads;
  • meshkit::plan::SweptPatch — a centreline polyline swept with a width, quads laid across the channel at each station (channel / street case).

Both produce a meshkit::plan::PatchMesh in LOCAL vertex indices. The native job plans and places patches through preparePatches() before triangulation; the Qt MeshGenerator::addPatch stitches the mesh:: mirror types into the triangle domain (the boundary segments become PSLG constraints, the interior a hole, and the quads are appended after the triangles).