Engine tests: rounding the long edge then the left upright matches the three edges their chains take

Stale since 84bd2daad, which gave solid.fillet each pick's tangent chain by default. After the
long top front edge is rounded, the front-left upright meets the round's end (the quarter circle
on the left face) along its tangent, and that circle meets the top-left edge along its tangent:
the second fillet rounds the upright and the top-left edge. The "together" fillet picks the
three edges ([20, -21, 10], [0, -21, 5], [0, -10, 10]); one by one and together remove the same
volume within the display meshes' 2e-4 (it read 60.649 vs 43.185 with two picks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-30 06:20:30 -04:00
committed by Irakli Kourtis
parent 96b248d288
commit 42d4d0ecde
+5 -2
View File
@@ -1786,7 +1786,10 @@ fn fillet_edges_meeting_at_the_front_corner_of_the_arc() {
}
/// The long top front edge rounded, then the small front-left upright as a fillet of its own
/// (as in the app): the new round ends in the earlier one, taking off what both take together.
/// (as in the app). The upright's tangent chain (the Fillet default, since 84bd2daad) runs on
/// through the first round's end, the quarter circle on the left face, to the top-left edge, so
/// the second fillet rounds the upright and the top-left edge: it takes off what the three edges
/// take together.
#[test]
fn fillet_the_long_edge_then_the_small_left_edge() {
let mut s = knife_edge_part();
@@ -1795,7 +1798,7 @@ fn fillet_the_long_edge_then_the_small_left_edge() {
run(&mut s, "solid.fillet", json!({"edges": [[0.0, -21.0, 5.0]], "radius": 2}));
let one_by_one = before - planned(&s);
let mut s = knife_edge_part();
run(&mut s, "solid.fillet", json!({"edges": [[20.0, -21.0, 10.0], [0.0, -21.0, 5.0]], "radius": 2}));
run(&mut s, "solid.fillet", json!({"edges": [[20.0, -21.0, 10.0], [0.0, -21.0, 5.0], [0.0, -10.0, 10.0]], "radius": 2}));
let together = before - planned(&s);
// Within the display meshes' accuracy (the two are built of different faces).
assert!(rel(one_by_one, together) < 2e-4, "one by one {one_by_one} vs together {together}");