mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 02:25:55 +00:00
Kernel tests: three rounds at a box corner end on one rational patch on the ball's sphere, not an analytic sphere
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user