From f5dfb78ee859bd62e5d9f9db2469e92d510c409d Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 02:00:00 -0400 Subject: [PATCH] kernel: a cut's tool face blocks a planar role only where it enters the result map_planar_sources took every plane of a cut's tool as competing with an input face on it, facing either way, and dropped that face's exact role. A text pocketed 1 mm down from a block's top has its tool's top on the top's plane facing up, as the top does; the top then lost its CertifiedExtrudeCap, and the sketch on it reported "the top cap of Extrude1 no longer exists" (a_face_sketch_saved_with_fitted_letters_reopens_and_builds_the_same). A cut's tool faces enter the result turned round, as the walls of the hollow, so a tool face can only take the place of a face on its plane facing against it (a pocket's floor, a face the tool sat on from outside). Only that orientation competes now; the existing blocking cases (a tool's bottom on a pocket floor, a tool face against a wall) are unchanged. Co-Authored-By: Claude Opus 5.5 --- crates/kernel/src/planar_sources.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/kernel/src/planar_sources.rs b/crates/kernel/src/planar_sources.rs index 51ed1f83a..43c8e559a 100644 --- a/crates/kernel/src/planar_sources.rs +++ b/crates/kernel/src/planar_sources.rs @@ -225,9 +225,13 @@ impl Body { let mapped = guard("exact planar support lineage", || { let mut competing = Vec::new(); for plane in blocker.map(actual_planes).transpose()?.into_iter().flatten().flatten() { - // A tool face blocks a face on its plane facing either way. + // A cut's tool face enters the result turned round (the wall of the hollow it + // leaves), so it competes only with a face on its plane facing against it: a + // pocket's floor, or a target face the tool sat on from outside. A tool face that + // faces the same way as the target's face on its plane (a pocket cut down from a + // cap, its top on the cap) is the tool's own outside and leaves the cap the cap. let opposing = Plane::new(plane.origin, plane.x, -plane.y).ok_or_else(|| KernelError::Invalid("invalid opposing plane".into()))?; - competing.extend([plane, opposing]); + competing.push(opposing); } competing.sort_by(|a, b| a.normal().x.total_cmp(&b.normal().x)); let mut candidates = Vec::new();