![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Namespaces | |
| namespace | detail |
| namespace | quadquality_detail |
Classes | |
| struct | 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 | ConstraintAuditExample |
| struct | ConstraintAuditOptions |
| struct | ConstraintAuditReport |
| struct | ConstraintPolicyOverride |
| struct | ConstraintSegment |
| struct | ConstraintSimplificationOptions |
| struct | ConstraintSimplificationPolicy |
| struct | ConstraintSimplificationResult |
| struct | Line2 |
| struct | MeshEdge |
| struct | MeshResult |
| struct | MeshTriangle |
| struct | MeshVertex |
| struct | PatchAssessment |
| struct | PatchDecision |
| struct | PatchInterfaceConflict |
| struct | PatchInterfaceReport |
| struct | PatchLimits |
| struct | 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 | PatchMesh |
| A generated patch in local indices. Quads are emitted CCW. More... | |
| class | Polygon |
| struct | QuadBlockGrid |
| Local cell size on a regular grid; NaN marks unusable cells. More... | |
| struct | QuadBlockOptions |
| struct | QuadPlan |
| struct | QuadPlanningGeometry |
| struct | QuadPlanningOptions |
| struct | QuadQuality |
| struct | QuadQualityBounds |
| Acceptance bounds shared by pairing, cleanup, smoothing and the legacy tri-pair merge. Defaults are the plan's (§5): hard 60°/120°, SJ ≥ 0.866, aspect ≤ 2. More... | |
| struct | QuadRegion |
| class | ReadArray |
| struct | SimplificationChange |
| struct | SimplificationFeature |
| class | SizeField |
| Distance-to-feature field sampled as a max-area function. More... | |
| struct | SizeFieldOptions |
| struct | SteinerPoint |
| struct | 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 | 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... | |
| class | Text |
Typedefs | |
| using | Bytes = std::string |
Enumerations | |
| enum class | PatchDisposition { Triangles , Accepted , Repaired , RequiredFailure } |
| enum class | QuadRegionMode { Auto , Mapped , Submapped , Free , TrianglesOnly } |
Functions | |
| QuadBlockGrid | quadBlockGridFromMesh (const MeshResult &mesh, double pitch, const Vector< Vector< Point2 > > &blockers) |
| Estimate local equilateral side lengths from triangles and mask existing quads/features. | |
| QuadBlockGrid | quadBlockGridFromField (const Box2 &, double pitch, const std::function< double(const Box2 &)> &maximumSize, const Vector< Vector< Point2 > > &blockers, const std::function< bool()> &cancelled={}, std::int64_t maximumCells=1000000) |
| Vector< QuadRegion > | placeQuadBlocks (const QuadBlockGrid &grid, const QuadBlockOptions &options) |
| Greedily select axis-aligned mapped quad regions from approximately uniform usable grid bands. | |
| ConstraintAuditReport | auditConstraintSimplification (const Vector< SimplificationFeature > &original, const ConstraintSimplificationResult &candidate, const ConstraintAuditOptions &options={}) |
| ConstraintAuditReport | auditMeshConstraints (const Vector< SimplificationFeature > &constraints, const MeshResult &mesh, const ConstraintAuditOptions &options={}) |
| ConstraintSimplificationResult | simplifyConstraints (const Vector< SimplificationFeature > &features, const ConstraintSimplificationOptions &options={}) |
| bool | cellIsConvex (const Vector< MeshVertex > &v, const MeshTriangle &c) |
| Text | validate (const StructuredPatch &p) |
| Input checks. Empty string = valid. | |
| Text | validate (const SweptPatch &p) |
| Check swept input geometry and representable station/cell/boundary counts. | |
| Text | 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 | 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 | 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 | 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 | 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 | 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 | makeTransfinitePatchAtStations (const Vector< Vector< Point2 > > &sides, const Text &tag, Text *err=nullptr) |
| PatchMesh | 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 | 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. | |
| PatchAssessment | assessPlannedPatch (const PatchMesh &, const PatchLimits &) |
| QuadPlan | planQuadRegions (const Vector< QuadRegion > &, const QuadPlanningGeometry &, const QuadPlanningOptions &={}) |
| PatchInterfaceReport | auditPatchInterfaces (const MeshResult &, const Vector< MeshEdge > &, double maximumRatio, const std::function< bool()> &cancelled={}, int maximumExamples=64) |
| QuadQuality | quadQuality (const Point2 &a, const Point2 &b, const Point2 &c, const Point2 &d) |
| Measure one quadrilateral using cyclic corners and translation/scale-resistant planar arithmetic. | |
| QuadQuality | quadQuality (const Vector< MeshVertex > &vertices, const MeshTriangle &t) |
| Measure a quad cell through its borrowed vertex records. | |
| bool | quadAcceptable (const QuadQuality &q, const QuadQualityBounds &b) |
| Apply inclusive hard angle/Jacobian/aspect limits to a valid convex metric record. | |
| double | quadScore (const QuadQuality &q, const QuadQualityBounds &b) |
| Rank valid convex quads by Jacobian, rectangularity and a soft aspect penalty. | |
| double | triangleScaledJacobian (const Point2 &a, const Point2 &b, const Point2 &c) |
| Compute the minimum orientation-normalized corner sine of a triangle. | |
| double | cellCornerAngleDeg (const Vector< MeshVertex > &v, const MeshTriangle &t, int i) |
| Compute the unsigned corner angle of a triangle or quad. | |
| QuadQualityBounds | quadRegionQualityBounds (const QuadRegion ®ion, QuadQualityBounds global) |
| Copy global quality bounds and apply an explicitly nonnegative region aspect override. | |
| Polygon | normalizeRingCCW (const Polygon &ring) |
| Copy a ring while dropping scale-fuzzy consecutive/closing duplicates and reversing negative area. | |
| bool | polylineIntersectsRect (const Vector< Point2 > &path, const Box2 &rect) |
| Test whether any consecutive path segment meets a normalized closed rectangle. | |
| double | ringSignedArea (const Polygon &ring) |
| Compute oriented shoelace area after translating corners to the first vertex. | |
| bool | pointInRing (const Polygon &ring, const Point2 &p) |
| Test a point using a strict horizontal-ray odd-even crossing rule. | |
| bool | pointInRegion (const Polygon &ring, const Vector< Polygon > &holes, const Point2 &p) |
| Combine outer-ring parity with exclusion by every supplied hole-ring parity. | |
| bool | ringIsSimple (const Polygon &ring) |
| Reject proper nonadjacent edge crossings using plain double orientation signs. | |
| Text | validateQuadRegion (const QuadRegion &r, const Vector< Polygon > &domains, const Vector< Polygon > &holes) |
| Check region authoring policy, normalized ring and sampled domain/hole containment. | |
| Text | validateQuadRegionsDisjoint (const Vector< QuadRegion > ®ions) |
| Check explicit region pairs for proper crossings or strictly interior sampled vertices. | |
| QuadRegionMode | classifyQuadRegion (const Polygon &ring, Vector< int > *corners, double cornerTolDeg=25.0, double rectilinearTolDeg=2.0) |
| Heuristically classify normalized ring turns as Mapped, Submapped or Free. | |
| Polygon | resampleRing (const Polygon &ring, double h, double keepTurnDeg=0.0) |
| Normalize a ring and insert equal-part subdivisions along all implicit closing edges. | |
| double | ringTurnDeg (const Polygon &ring, int i) |
| Compute a signed exterior turn at one ring corner using adjacent edge cross/dot products. | |
Variables | |
| constexpr double | pi = 3.141592653589793238462643383279502884 |
| using meshkit::plan::Bytes = typedef std::string |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Auto | classifyQuadRegion() decides: Mapped → Submapped → Free. |
| Mapped | Four logical sides (polylines) → transfinite quads. Needs 4 corners. |
| Submapped | Exactly rectilinear ring → grid-based structured quads. |
| Free | Cross-field aligned lattice + template pairing (quad-dominant). |
| TrianglesOnly | Region ring is still a constraint loop, interior stays triangles. |
| PatchAssessment meshkit::plan::assessPlannedPatch | ( | const PatchMesh & | patch, |
| const PatchLimits & | limits | ||
| ) |
| ConstraintAuditReport meshkit::plan::auditConstraintSimplification | ( | const Vector< SimplificationFeature > & | original, |
| const ConstraintSimplificationResult & | candidate, | ||
| const ConstraintAuditOptions & | options = {} |
||
| ) |
| ConstraintAuditReport meshkit::plan::auditMeshConstraints | ( | const Vector< SimplificationFeature > & | constraints, |
| const MeshResult & | mesh, | ||
| const ConstraintAuditOptions & | options = {} |
||
| ) |
| PatchInterfaceReport meshkit::plan::auditPatchInterfaces | ( | const MeshResult & | mesh, |
| const Vector< MeshEdge > & | boundaries, | ||
| double | maximumRatio, | ||
| const std::function< bool()> & | cancelled = {}, |
||
| int | maximumExamples = 64 |
||
| ) |
|
inline |
Compute the unsigned corner angle of a triangle or quad.
| [in] | v | Stable vertex storage containing every referenced cell index in range. |
| [in] | t | Valid cyclic cell, preserved. |
| [in] | i | Local corner in[0,t.vertexCount()), unchecked. |
Interior angle at corner i of a cell (degrees), triangles and quads.
|
inline |
| QuadRegionMode meshkit::plan::classifyQuadRegion | ( | const Polygon & | ring, |
| Vector< int > * | corners, | ||
| double | cornerTolDeg = 25.0, |
||
| double | rectilinearTolDeg = 2.0 |
||
| ) |
Heuristically classify normalized ring turns as Mapped, Submapped or Free.
| [in] | ring | Borrowed finite valid planar ring, unchanged; normalized CCW/open before evaluating turns. |
| [out] | corners | Optional borrowed vector, cleared first; Mapped success fills four indices into the normalized ring, not necessarily original input positions. Other modes leave it empty. |
| [in] | cornerTolDeg | Finite nonnegative degree tolerance, default 25. Mapped needs exactly four turns within inclusive 90+/-tolerance and all other absolute turns strictly below tolerance. |
| [in] | rectilinearTolDeg | Finite nonnegative degree tolerance, default 2. Submapped accepts every absolute turn close to 90 or close to zero (straight-through vertices are allowed). |
Auto-classification (plan §4.1) on the normalised ring.
Turning angle at each vertex (exterior angle, CCW positive): - exactly four vertices with turn in [90 − cornerTolDeg, 90 + cornerTolDeg] and every other |turn| < cornerTolDeg → Mapped (corners = those four, in ring order); - every turn within rectilinearTolDeg of ±90° or zero → Submapped; - otherwise Free. corners receives the Mapped corners when non-null (cleared otherwise).
| PatchMesh meshkit::plan::makeBankPairPatch | ( | const BankPairPatch & | p, |
| Text * | err | ||
| ) |
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.
Build a conforming strip between two finite simple disjoint open banks.
| [in] | p | Borrowed bank arrays/across/along/tag, unchanged. across>=1, finite nonnegative along; each bank >=2 finite nonduplicate consecutive points and not explicitly closed. Common XY units. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| PatchMesh meshkit::plan::makeMappedPatch | ( | const Polygon & | ring, |
| const Vector< int > & | corners, | ||
| double | h, | ||
| const Text & | tag, | ||
| Text * | err | ||
| ) |
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.
Choose isotropic subdivision counts from opposite-side arc lengths and build a Coons patch.
| [in] | ring | Borrowed finite ring in either winding, unchanged; exact repeated closing point allowed. |
| [in] | corners | Borrowed four strictly increasing indices in original open-ring order, unchanged. |
| [in] | h | Positive finite target spacing in ring XY units; opposite mean lengths round to nearest positive integer count, so h is a target rather than strict maximum gap. |
| [in] | tag | Borrowed copied patch/cell tag, unchanged. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| PatchMesh meshkit::plan::makeMappedPatch | ( | const Polygon & | ring, |
| const Vector< int > & | corners, | ||
| double | hAlong, | ||
| double | hAcross, | ||
| double | alongAngleDeg, | ||
| const Text & | tag, | ||
| Text * | err | ||
| ) |
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.
Associate physical directional spacings with opposite logical side pairs before Coons generation.
| [in] | ring | Borrowed finite cyclic ring, either winding, unchanged; exact closing duplicate allowed. |
| [in] | corners | Borrowed four strictly increasing open-ring indices, unchanged. |
| [in] | hAlong | Positive finite target spacing along the selected physical axis, ring horizontal units. |
| [in] | hAcross | Positive finite orthogonal target spacing in same units. |
| [in] | alongAngleDeg | Finite undirected axis counterclockwise from +x, degrees modulo 180. |
| [in] | tag | Borrowed copied tag, unchanged. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| PatchMesh meshkit::plan::makeSweptPatch | ( | const SweptPatch & | p, |
| Text * | err | ||
| ) |
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.
Sweep a finite centerline with mitred offsets into a globally validated quad strip.
| [in] | p | Borrowed centerline/positive width/across/along spacing/tag, unchanged, common XY units. Original vertices retained and each segment subdivided to target along spacing when positive. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| PatchMesh meshkit::plan::makeTransfinitePatch | ( | const StructuredPatch & | p, |
| Text * | err | ||
| ) |
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.
Generate a bilinear grid between four straight convex sides.
| [in] | p | Borrowed cyclic four-corner patch, unchanged, common finite XY frame; n,m>=1 checked. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| 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 |
||
| ) |
Copy a ring while dropping scale-fuzzy consecutive/closing duplicates and reversing negative area.
| [in] | ring | Borrowed finite planar points, unchanged; fuzzy coordinate tolerance is 1e-9 times max(1,largest absolute original coordinate), separately on x/y, so it depends on projected origin. |
Drop a closing duplicate, drop consecutive duplicates, make CCW.
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.
Validate a quad patch and extract its ordered open CCW perimeter.
| [in] | pm | Borrowed patch, unchanged; full validatePatchMesh checks apply. |
| [out] | err | Optional borrowed diagnostic, set on failure, not retained; success clearing is stated below. |
| Vector< QuadRegion > meshkit::plan::placeQuadBlocks | ( | const QuadBlockGrid & | grid, |
| const QuadBlockOptions & | options | ||
| ) |
Greedily select axis-aligned mapped quad regions from approximately uniform usable grid bands.
| [in] | grid | Borrowed stable grid with finite positive pitch/origin and valid storage extent, unchanged; nonfinite/nonpositive h entries are unusable. All logarithmic band indices, powers, spacing-to-cell ceil conversions and loop/product arithmetic must be representable. |
| [in] | options | Borrowed policy with finite bandRatio>1, feasible finite minSpacing and positive minQuadsPerSide recommended. maxBlocks<=0 produces no regions; nonpositive minimum spacing does not filter. |
Axis-aligned rectangles over nearly uniform usable cells, largest first, each at least minQuadsPerSide quads of its spacing per side, kept one spacing apart from each other. Each comes back as a Mapped QuadRegion whose spacing is its band's.
| QuadPlan meshkit::plan::planQuadRegions | ( | const Vector< QuadRegion > & | regions, |
| const QuadPlanningGeometry & | geometry, | ||
| const QuadPlanningOptions & | options = {} |
||
| ) |
| bool meshkit::plan::pointInRegion | ( | const Polygon & | ring, |
| const Vector< Polygon > & | holes, | ||
| const Point2 & | p | ||
| ) |
Combine outer-ring parity with exclusion by every supplied hole-ring parity.
| [in] | ring | Borrowed finite planar outer ring, unchanged. |
| [in] | holes | Borrowed finite hole rings in the same frame, unchanged; no containment/disjointness validation. |
| [in] | p | Borrowed finite point, unchanged. |
Inside ring and outside every ring of holes — the region's meshable interior. With no holes this is exactly pointInRing().
Test a point using a strict horizontal-ray odd-even crossing rule.
| [in] | ring | Borrowed finite planar ring, unchanged; scale-fuzzy closing duplicate ignored. |
| [in] | p | Borrowed finite query in the same planar units, unchanged. |
Odd-even point-in-polygon (closed ring, last == first optional).
Test whether any consecutive path segment meets a normalized closed rectangle.
| [in] | path | Borrowed finite planar coordinates, unchanged; at least two points required, zero-length segments still test as points. Parameter-interval arithmetic must remain representable. |
| [in] | rect | Borrowed finite rectangle in the same planar units, unchanged; normalized internally, zero-width/height normalized boxes return false. |
True when any segment of a finite-coordinate polyline intersects the closed rectangle, including boundary contact and axis-aligned paths. Fewer than two points or an empty rectangle returns false.
|
inline |
Apply inclusive hard angle/Jacobian/aspect limits to a valid convex metric record.
| [in] | q | Stable metrics with positive finite area and valid ranges, otherwise rejected. |
| [in] | b | Finite thresholds, angles degrees, minimum Jacobian and maximum aspect dimensionless; maxAspect<=0 disables aspect cap. Caller chooses meaningful angle/score limits; no automatic clamping. |
Hard acceptance test (finite valid geometry + convexity + unchanged angle bounds, SJ floor and aspect cap).
| QuadBlockGrid meshkit::plan::quadBlockGridFromField | ( | const Box2 & | bounds, |
| double | pitch, | ||
| const std::function< double(const Box2 &)> & | maximumSize, | ||
| const Vector< Vector< Point2 > > & | blockers, | ||
| const std::function< bool()> & | cancelled = {}, |
||
| std::int64_t | maximumCells = 1000000 |
||
| ) |
| QuadBlockGrid meshkit::plan::quadBlockGridFromMesh | ( | const MeshResult & | mesh, |
| double | pitch, | ||
| const Vector< Vector< Point2 > > & | blockers | ||
| ) |
Estimate local equilateral side lengths from triangles and mask existing quads/features.
| [in] | mesh | Borrowed stable finite valid triangle/quad geometry, unchanged. Every cell vertex ID must be in range; area/centroid/products and grid coordinate-to-int conversions must be representable. |
| [in] | pitch | Finite positive background cell side in planar mesh units, feasible integer dimensions; nonpositive/NaN or no vertices returns invalid grid, but infinite pitch is caller-invalid, not rejected. |
| [in] | blockers | Borrowed finite feature paths in the same CRS/units, unchanged. Only consecutive segments are sampled, so repeat first point to close rings. Sample-step counts must fit int. |
The local cell size of mesh on a grid of pitch, with every cell touched by blockers (domain and hole rings, constraint lines, break lines) or by an existing quad marked unusable.
|
inline |
Measure one quadrilateral using cyclic corners and translation/scale-resistant planar arithmetic.
| [in] | a | First finite planar corner, used as local origin; same coordinate units as other corners. |
| [in] | b | Second cyclic corner, preserved. |
| [in] | c | Third cyclic corner, preserved. |
| [in] | d | Fourth cyclic corner, preserved; winding may be clockwise or counterclockwise. |
Metrics for corners a,b,c,d in cyclic order. Coordinates and all metric values, including positive area, must remain representable. Invalid inputs return a non-convex result; CW and CCW valid quads share metrics.
|
inline |
Measure a quad cell through its borrowed vertex records.
| [in] | vertices | Stable storage containing every t index in range, planar coordinates in common units. |
| [in] | t | Quad with four valid indices and v3>=0; triangle or invalid index use is unchecked. |
Metrics for a quad cell of mesh (t.v3 >= 0 required).
|
inline |
Copy global quality bounds and apply an explicitly nonnegative region aspect override.
| [in] | region | Borrowed region policy, unchanged; aspectMax<0 inherits, zero disables aspect cap, positive values override. NaN compares false/inherits; infinity is copied and later finite checks reject it. |
| [in] | global | Bounds copied by value, only maxAspect can change. |
Resolve Free-region bounds. Only the aspect cap may override the global bounds; negative values inherit and zero explicitly disables it.
|
inline |
Rank valid convex quads by Jacobian, rectangularity and a soft aspect penalty.
| [in] | q | Stable metrics, invalid ranges/nonconvex/nonfinite geometry scores zero. |
| [in] | b | Finite bounds; only positive maxAspect affects score, other finite hard thresholds are not applied here. Nonpositive maxAspect disables penalty. |
Pairing / legacy tri-pair ranking in [0,1]: SJ · rectangularity · min(1, aspectMax/aspect). Perfect rectangles within the configured aspect cap tie squares; angle distortion penalizes rhombi and kites. Diagonal skew remains a diagnostic, not a ranking term. Invalid/non-convex quads score zero. Smoothing retains its separate SJ guard.
Normalize a ring and insert equal-part subdivisions along all implicit closing edges.
| [in] | ring | Borrowed finite planar ring, unchanged; fuzzy duplicates are removed and winding normalized. |
| [in] | h | Finite positive target spacing in planar units; nonpositive/NaN returns normalized ring. For active resampling every lround(edgeLength/h), int narrowing and output count must be representable. |
| [in] | keepTurnDeg | Retained compatibility parameter in degrees, currently ignored; every normalized original vertex survives regardless of turn. |
Resample a closed ring at spacing h: every edge is split into max(1, round(len/h)) equal parts; ring vertices whose |turn| >= keepTurnDeg are always kept, others are kept too (geometry is never simplified here — run pslg::simplifyPolyline first). Output is CCW, open (no closing duplicate).
| bool meshkit::plan::ringIsSimple | ( | const Polygon & | ring | ) |
Reject proper nonadjacent edge crossings using plain double orientation signs.
| [in] | ring | Borrowed finite planar sequence, unchanged; fuzzy closing duplicate ignored. |
True when ring is simple (no proper self-intersection). O(n²).
Compute oriented shoelace area after translating corners to the first vertex.
| [in] | ring | Borrowed finite planar sequence, unchanged; closes implicitly, explicit duplicate allowed. |
Signed shoelace area (CCW positive).
Compute a signed exterior turn at one ring corner using adjacent edge cross/dot products.
| [in] | ring | Borrowed finite planar sequence, unchanged; fuzzy closing duplicate excluded. |
| [in] | i | Corner index, wrapped cyclically including negative values; modulo/addition must fit int. |
Exterior turning angle (degrees, CCW positive) at ring vertex i.
| ConstraintSimplificationResult meshkit::plan::simplifyConstraints | ( | const Vector< SimplificationFeature > & | features, |
| const ConstraintSimplificationOptions & | options = {} |
||
| ) |
|
inline |
Compute the minimum orientation-normalized corner sine of a triangle.
| [in] | a | First planar vertex, finite coordinates and representable differences/products required. |
| [in] | b | Second vertex in same coordinate units. |
| [in] | c | Third vertex in same coordinate units, winding may be either direction. |
Minimum sine of a triangle's angles (1 is unattainable; equilateral = 0.866; right isosceles = 0.707). Used by the smoothing guard for the triangles that remain inside a quad region.
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.
Validate complete convex CCW quad patch topology and one simple matching boundary.
| [in] | pm | Borrowed local-index patch, unchanged; vertex/cell/boundary counts must fit int. |
| Text meshkit::plan::validate | ( | const StructuredPatch & | p | ) |
Input checks. Empty string = valid.
Check four finite convex cyclic corners and representable subdivision products.
| [in] | p | Borrowed structured patch, unchanged; corners may use either winding, subdivisions >=1. |
| Text meshkit::plan::validate | ( | const SweptPatch & | p | ) |
Check swept input geometry and representable station/cell/boundary counts.
| [in] | p | Borrowed patch, unchanged; >=2 finite nonduplicate consecutive centerline vertices, positive finite width, across>=1 and finite nonnegative along spacing required, common XY units. |
| Text meshkit::plan::validateQuadRegion | ( | const QuadRegion & | r, |
| const Vector< Polygon > & | domains, | ||
| const Vector< Polygon > & | holes | ||
| ) |
Check region authoring policy, normalized ring and sampled domain/hole containment.
| [in] | r | Borrowed region, unchanged. Finite aspect override must be negative/inherit, zero/unbounded or >=1. Directional spacing requires finite positive along/across lengths and finite angle, Auto/Mapped mode, no background flag or owned holes; isotropic spacing is used only when >0 without an explicit finite check. |
| [in] | domains | Borrowed finite planar domain rings, unchanged; empty skips domain tests, background regions also skip them. Every normalized vertex plus area centroid must lie in exactly one same domain, with scale-fuzzy boundary counting inside. |
| [in] | holes | Borrowed finite excluded rings in the same units, unchanged. A vertex/centroid strictly inside a hole rejects, fuzzy boundary contact is allowed. r.holes is not otherwise geometrically validated here. |
Validate one region: >= 3 distinct vertices, simple, area >= 4·h² (h = spacing when > 0, else skipped), every vertex inside exactly one of domains and outside every holes ring. Empty string = valid.
| Text meshkit::plan::validateQuadRegionsDisjoint | ( | const Vector< QuadRegion > & | regions | ) |
Check explicit region pairs for proper crossings or strictly interior sampled vertices.
| [in] | regions | Borrowed finite region rings, unchanged; normalized to open CCW copies. Call individual validation separately; degenerate <3-corner rings are ignored by overlap testing. |
Pairwise check: rings may share edges/vertices but no ring vertex of one may lie strictly inside another and edges may not properly cross. Returns the first offending pair as "region i overlaps region j", or "".
|
inlineconstexpr |