From 38385ab5d36e8d875d9b85b4c89bb503159bb552 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Sun, 1 Nov 2026 15:54:48 -0500 Subject: [PATCH] Kernel tests: three rounds at a box corner end on one rational patch on the ball's sphere, not an analytic sphere MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SMLib's Ball corner is always the rational patch exactly on the sphere (owner ruling, blend design §23), so the corner counts as an 'other' face beside the three cylinders and six planes. The removed volume still checks the corner against r³ − πr³/6. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- crates/kernel/src/tests.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/kernel/src/tests.rs b/crates/kernel/src/tests.rs index 2056d1b2e..d2c6c859b 100644 --- a/crates/kernel/src/tests.rs +++ b/crates/kernel/src/tests.rs @@ -1974,8 +1974,14 @@ fn fillet_three_edges_at_a_corner() { let a = r * r * (1.0 - PI / 4.0); let want = a * (40.0 + 30.0 + 20.0) - 3.0 * a * r + (r * r * r - PI * r * r * r / 6.0); assert!(rel(removed, want) < 2e-3, "removed {removed} vs {want}"); + // The corner is one face: SMLib builds it as a rational patch exactly on the ball's sphere + // (not an analytic sphere), between the three cylinders and the six planes. let m = measure(&f).unwrap().merged; - assert_eq!(m.face_types.get("sphere"), Some(&1), "{m:?}"); + assert_eq!( + (m.faces, m.face_types.get("plane"), m.face_types.get("cylinder"), m.face_types.get("other")), + (10, Some(&6), Some(&3), Some(&1)), + "{m:?}" + ); } #[test]