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

2D mesh generator (workplans/MESH_TRIANGLE_ENGINE_PLAN_2026-09-30.md): a constrained Delaunay triangulation of every constraint, refined to the caller's size function and a requested minimum angle (mesh/meshcdt.h), with aligned quad strips only where features ask for them — four-sided quad regions, corridors, streets between facing break lines, conduits. More...

#include "mesh/meshgenerator.h"
#include "mesh/breaklinestrips.h"
#include "mesh/meshcdt.h"
#include "mesh/meshcellgeom.h"
#include "mesh/pslgprep.h"
#include "core/editgeometry.h"
#include <QDebug>
#include <QHash>
#include <QPainterPath>
#include <QRectF>
#include <QSet>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <limits>
#include <memory>
Include dependency graph for meshgenerator.cpp:

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.
 

Detailed Description

2D mesh generator (workplans/MESH_TRIANGLE_ENGINE_PLAN_2026-09-30.md): a constrained Delaunay triangulation of every constraint, refined to the caller's size function and a requested minimum angle (mesh/meshcdt.h), with aligned quad strips only where features ask for them — four-sided quad regions, corridors, streets between facing break lines, conduits.

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

Mesh generator (workplans/MESH_TRIANGLE_ENGINE_PLAN_2026-09-30.md):

  1. size function h(x) from the caller's RefineHook (or the uniform maxArea), with quad-region spacings as overrides;
  2. constraint polylines: domain rings, holes, breaklines, region rings, patch boundaries; Steiner points are fixed vertices; lines that cross or come closer than the refinement floor are joined at shared vertices;
  3. quad strips: the caller's patches (corridors), four-sided quad regions, conduit strips and strips between facing terrain break lines — each a structured patch whose boundary is fixed in the CDT; a strip that does not fit is dropped and its feature stays triangles;
  4. terrain break lines cut back to keep clear of all of those;
  5. every other constraint resampled at h(x), triangulated with the constrained-Delaunay kernel (mesh/meshcdt.h), exterior, holes and patch interiors removed, then Delaunay refinement to h(x) and the minimum angle;
  6. assembly: markers and tags, boundary edges, structured patches stitched by coordinate, region tags by flood fill bounded by constraints.