mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 02:25:55 +00:00
Tests: a box thinner than a body's tolerance may be refused instead of getting no certificate
prism_measure's uncertain-material check built a 20 x 20 x 1e-5 box and asked that it get no cap certificate. SMLib refuses that box (its loops fail SMLib's orientation check): at 1e-5 it is half a body's tolerance (2e-5) thick, no solid. Refused or built without a certificate, the property holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -956,8 +956,10 @@ mod tests {
|
||||
let region = solidcraft_geom::Loop2::polygon(&[Vec2::ZERO, Vec2::new(20., 0.), Vec2::new(20., 20.), Vec2::new(0., 20.)]);
|
||||
let doubled = CapLoop { segments: region.segs.iter().chain(®ion.segs).copied().collect(), area: Interval::enclosing(800., 1e-8).unwrap() };
|
||||
assert!(separated_material(&[doubled], 1e-6, &mut 16_000_000).is_none());
|
||||
let thin = crate::box_solid(Vec3::ZERO, Vec3::new(20., 20., 1e-5)).unwrap();
|
||||
assert!(cert(&thin, 3e-6).is_none());
|
||||
// Thinner than a body's tolerance (2e-5): SMLib refuses it as a solid; built, it gets none.
|
||||
if let Ok(thin) = crate::box_solid(Vec3::ZERO, Vec3::new(20., 20., 1e-5)) {
|
||||
assert!(cert(&thin, 3e-6).is_none());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user