mesh: unstructured all-hex octree mesher

`fieldcraft_mesh::octree::octree_hex_mesh` meshes any closed part with hex8 only:

- an adaptive 3-refinement grid (27-tree) with strong balance and closure, filled with
  conforming node-marking transition templates (Schneiders; checked over all 48 symmetries);
- a core of grid cells kept clear of the boundary (the HybridOctree buffer rule), with
  non-manifold cleanup and a genus check against the part;
- a feature graph from the B-rep (corners, curves, patches) and a partition-first map of the
  core's boundary onto it, then two boundary layers: a padding layer and a pillow per patch,
  so every face boundary and sharp edge is captured by element edges;
- a Garanzha-type untangling and fitting energy (shape term |J|^3/chi, a volume term and a
  soft fitting term, deterministic across platforms), a compass search on the worst
  elements and a certified repair; failures refine the grid near them and rebuild, within
  bounded attempts and growth.

The output passes the certified Jacobian check of every element and a gate that the
boundary encloses the elements' volume; boundary quads carry their B-rep faces. Quality is
reported with the same scaled Jacobian as mesh.quality. Literature notes for each step are in
docs/meshing/literature.md (B1.6-B1.10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 07:38:11 -04:00
1 parent 741a803785
commit 3587b0de74
12 files changed
+3676 -7

No files matched your search

+14 -5
View File
@@ -68,12 +68,21 @@ Rules beyond the layer order:
its B-rep face tag survives. Then constrained Delaunay refinement to a
size field, ODT smoothing interleaved as in Tournois et al. 2009, and the Klingner–Shewchuk 2007
improvement schedule against slivers.
4. **Hexahedral meshing (the core).** Octree/grid dual all-hex first, the one family that meshes
any input validly (Livesu et al. 2021 dual schemes, Pitzalis et al. 2021 refinement, Gao et al.
2019 feature projection and padding, Garanzha et al. 2021 untangling). Then hex-dominant by tet
4. **Hexahedral meshing (the core).** Grid-based all-hex first, the one family that meshes any
input validly. `fieldcraft-mesh::octree` (command `mesh.hex.octree`): a 27-tree over the part,
refined by curvature, thickness and narrow faces, balanced and cut by the 3-refinement
node-marking templates (Schneiders 1996, Ito et al. 2009) into a conforming grid; the core of
grid elements inside the part (exact inside test) is cleaned to a manifold boundary; the part's
patches, sharp curves and corners are mapped onto it (Gao et al. 2019); one padding layer and a
pillow under each patch carry the boundary and capture every sharp curve; the foldover-free
energy (Garanzha et al. 2021) with a growing fitting term moves the boundary onto the geometry
while every element stays valid; the worst elements are improved, and every element is proven
valid by the certified Bernstein Jacobian check (Johnen et al. 2013; Marschner et al. 2020)
before the boundary quads are tagged with their B-rep faces. Where a stage fails the grid is
refined there and the mesh rebuilt. The dual schemes of Livesu et al. 2021 (fewer elements,
concave transitions) are the next upgrade of the transitions. Then hex-dominant by tet
recombination (Pellerin et al. 2018), then polycube (DualCube labelling) for blocky parts;
frame-field/integer-grid-map methods stay research. Validity uses a certified trilinear Jacobian
check (Marschner et al. 2020), not corner Jacobians alone.
frame-field/integer-grid-map methods stay research.
5. **Structured hex and face meshing.** Faces get all-quad meshes on shared, prescribed edge
nodes (`fieldcraft-mesh::quad`): transfinite interpolation for four-sided faces (Gordon and
Hall 1973), and for free faces a half-resolution constrained Delaunay triangulation,