mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 10:35:58 +00:00
Kernel tests: a crowned patch's hostile crowns are refused for their range
a_crowned_patch_fills_its_middle_and_keeps_its_edges checked only that NaN, infinity, 3.01, -0.91 and 1e300 are refused; it now checks why: "a patch's crown must be between -0.9 and 3" (patch_edges_crowned's range test). The bump check is left as it is. The audit proposed measuring it in model space along the loop plane's normal, but it already is: both patches are height fields over the same plane on the same parameters, so the distance between their points at the domain's centre is the bump along the normal, and the record's domain is the fit's box in mm (diagonal 52.5). The crowned patch's middle rises 7.656 where the documented crown x size is 13.125: the crown's bump reaches 7/12 of what patch_edges_crowned promises on this pentagonal cup (geom's own test of fill_loop, on a fine hexagon net, gets it to 1e-9), a real gap, still failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1580,7 +1580,8 @@ mod tests {
|
||||
assert!(matches!(first_surface(&lid), b::Surface::Plane { .. }), "a planar loop is a plane");
|
||||
// Hostile crowns are refused before anything is built.
|
||||
for crown in [f64::NAN, f64::INFINITY, 3.01, -0.91, 1e300] {
|
||||
assert!(patch_edges_crowned(&open, &rim, crown).is_err(), "crown {crown}");
|
||||
let e = patch_edges_crowned(&open, &rim, crown).unwrap_err();
|
||||
assert!(e.to_string().contains("crown must be between -0.9 and 3"), "crown {crown}: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user