Tests: the mirrored union's volume held to the two integrals' 1e-8 accuracy

measure now integrates to SMLib's finest relative accuracy, 1e-8 (da57f37e5, cherry-picked from
the engine-commands branch), not 1e-4: the mirrored bracket's union and twice its half, each an
integral good to 1e-8, agree to 2e-8. (The test stops earlier on this base, at the mirrored
operand SMLib's check refuses: the mirror-regressions agent's cause.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-29 01:19:25 -04:00
committed by Irakli Kourtis
parent fad9c44dac
commit f9347aca70
+3 -3
View File
@@ -1603,9 +1603,9 @@ fn overlapping_holes_and_mirror_joins() {
let both = boolean(&half, &other, BoolOp::Union).unwrap().unwrap();
let v = measure(&half).unwrap().volume;
let mb = measure(&both).unwrap();
// Both volumes are SMLib's integrals, each good to its relative accuracy (1e-4,
// measure::ACCURACY); a lost round or wall would be off by percent.
assert!(rel(mb.volume, 2.0 * v) < 1e-4, "{} vs {}", mb.volume, 2.0 * v);
// Both volumes are SMLib's integrals, each good to its relative accuracy (1e-8,
// measure::ACCURACY): they agree to the two together.
assert!(rel(mb.volume, 2.0 * v) < 2e-8, "{} vs {}", mb.volume, 2.0 * v);
// One body: the shared face is gone and the faces either side of it merged.
assert_eq!(mb.merged.faces, 10, "{:?}", mb.merged);
// Two equal cylinders on one axis, overlapping: one longer cylinder.