Loading...
Searching...
No Matches
meshpatch.h File Reference

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

#include "mesh/meshresult.h"
#include <QPair>
#include <QPointF>
#include <QPolygonF>
#include <QString>
#include <QVector>
Include dependency graph for meshpatch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mesh::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  mesh::SweptPatch
 Swept patch: the centreline is offset ±width/2 (mitred at interior vertices) and cut into across quads per station. More...
 
struct  mesh::BankPairPatch
 Two open bank polylines with independently supplied directions. More...
 
struct  mesh::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  mesh::PatchMesh
 A generated patch in local indices. More...
 

Namespaces

namespace  mesh
 The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and cell attributes, the mesh generator, quad regions, matching and cleanup, mesh statistics, and the INP and 2DM mesh codecs.
 

Functions

QString mesh::validate (const StructuredPatch &p)
 Input checks.
 
QString mesh::validate (const SweptPatch &p)
 Check a swept patch's inputs and its representable station, cell and boundary counts.
 
QString mesh::validate (const PatchMesh &pm)
 Requires finite convex CCW quads, consistently shared cell edges, and one simple boundary matching exactly the outer cell edges.
 
QPolygonF mesh::orderedPatchBoundary (const PatchMesh &pm, QString *err=nullptr)
 Validate the complete patch and return its CCW boundary, without a repeated closing vertex.
 
PatchMesh mesh::makeTransfinitePatch (const StructuredPatch &p, QString *err=nullptr)
 Transfinite interpolation on the four straight sides.
 
PatchMesh mesh::makeSweptPatch (const SweptPatch &p, QString *err=nullptr)
 Sweep the centreline: (stations)×(across+1) vertices, (stations-1)×across quads.
 
PatchMesh mesh::makeBankPairPatch (const BankPairPatch &p, QString *err=nullptr)
 Build a conforming strip between two simple, disjoint banks.
 
PatchMesh mesh::makeTransfinitePatch (const QVector< QVector< QPointF > > &sides, int n, int m, const QString &tag, QString *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 mesh::makeTransfinitePatchAtStations (const QVector< QVector< QPointF > > &sides, const QString &tag, QString *err=nullptr)
 Coons patch whose boundary vertices are exactly the given side stations.
 
PatchMesh mesh::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, choose n = max(1, round(mean(len0, len2)/h)), m likewise from sides 1/3, and call the polyline overload.
 
PatchMesh mesh::makeMappedPatch (const QPolygonF &ring, const QVector< int > &corners, double hAlong, double hAcross, double alongAngleDeg, const QString &tag, QString *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:

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

Both produce a mesh::PatchMesh in LOCAL vertex indices, which MeshGenerator::addPatch stitches into the triangle domain: the boundary segments become PSLG constraints, the interior a hole, and the quads are appended after the triangles (engine order).