mesh: a projection plan meshes a symmetric body by its symmetry; partitioned bodies and cells plan (#473)

mesh.plan.apply finds the planes a projection plan's body is its own mirror image across
(through the middle of its extent, square to the sweep's in-plane axes, through no ring: every
triangle middle of its tessellation, a little inside and outside, has its mirror image inside and
outside alike). It cuts the body by them, plans and meshes the cell on their negative side, and
mirrors that mesh across each plane in turn (mesh.mirror, joined node to node on the planes), so
mirror-image regions mesh exactly alike. `symmetry: false` meshes the whole body.

A cell of a partitioned body is planned from the features that built its body, with the rings it
holds; a partitioned body is planned whole as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-16 07:26:28 -04:00
1 parent 4ad793ca5e
commit b905f1bc89
3 files changed
+226 -26

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ fn solid_angle(a: V3, b: V3, c: V3) -> f64 {
}
/// The generalized winding number of the closed surface `mesh` at `p`: 1 inside, 0 outside.
fn winding(mesh: &SurfaceMesh, p: V3) -> f64 {
pub(super) fn winding(mesh: &SurfaceMesh, p: V3) -> f64 {
let at = |i: u32| mesh.positions.get(i as usize).map(|q| sub(*q, p));
let mut sum = 0.0;
for t in mesh.triangles.iter().take(MAX_CLASSIFY_TRIANGLES) {