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

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

#include "meshkit/patch.hpp"
#include "meshkit/cdt.hpp"
#include <algorithm>
#include <cmath>
#include <limits>
Include dependency graph for patch.cpp:

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::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.
 
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.
 

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 (TRI_QUAD_MESHING_PLAN §3.2, phase G3): transfinite four-sided patches and swept channel patches, in local indices. The polyline-side transfinite overload and makeMappedPatch serve the quad-region redesign (QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §4.2).