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

PSLG quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §3, §4.1): closed polygons inside the meshing domain where quadrilateral cells are prioritised. More...

Include dependency graph for regions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  meshkit::plan::QuadRegion
 A closed polygon whose interior should be meshed with quadrilaterals, with its holes, scheme, spacing and tagging policy. 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.
 

Enumerations

enum class  meshkit::plan::QuadRegionMode {
  meshkit::plan::Auto ,
  meshkit::plan::Mapped ,
  meshkit::plan::Submapped ,
  meshkit::plan::Free ,
  meshkit::plan::TrianglesOnly
}
 Requested meshing scheme for a QuadRegion's interior. More...
 

Functions

QuadQualityBounds meshkit::plan::quadRegionQualityBounds (const QuadRegion &region, QuadQualityBounds global)
 Copy global quality bounds and apply an explicitly nonnegative region aspect override.
 
Polygon meshkit::plan::normalizeRingCCW (const Polygon &ring)
 Copy a ring while dropping scale-fuzzy consecutive/closing duplicates and reversing negative area.
 
bool meshkit::plan::polylineIntersectsRect (const Vector< Point2 > &path, const Box2 &rect)
 Test whether any consecutive path segment meets a normalized closed rectangle.
 
double meshkit::plan::ringSignedArea (const Polygon &ring)
 Compute oriented shoelace area after translating corners to the first vertex.
 
bool meshkit::plan::pointInRing (const Polygon &ring, const Point2 &p)
 Test a point using a strict horizontal-ray odd-even crossing rule.
 
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.
 
bool meshkit::plan::ringIsSimple (const Polygon &ring)
 Reject proper nonadjacent edge crossings using plain double orientation signs.
 
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.
 
Text meshkit::plan::validateQuadRegionsDisjoint (const Vector< QuadRegion > &regions)
 Check explicit region pairs for proper crossings or strictly interior sampled vertices.
 
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.
 
Polygon meshkit::plan::resampleRing (const Polygon &ring, double h, double keepTurnDeg=0.0)
 Normalize a ring and insert equal-part subdivisions along all implicit closing edges.
 
double meshkit::plan::ringTurnDeg (const Polygon &ring, int i)
 Compute a signed exterior turn at one ring corner using adjacent edge cross/dot products.
 

Detailed Description

PSLG quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §3, §4.1): closed polygons inside the meshing domain where quadrilateral cells are prioritised.

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

PSLG quad regions (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §3, §4.1): closed polygons inside the meshing domain where quadrilateral cells are prioritised. Everything outside a region stays triangulated; the interface conforms because the region ring is a constraint loop in the same CDT.

This header holds the data model plus the pure-geometry helpers (validation, auto-classification, ring resampling). How a region is turned into cells lives in MeshGenerator::generate(): supported four-sided regions become structured patches, stitched into the surrounding constrained Delaunay triangulation.