Timeline chip test: a fillet that really reduces

The R20 fillet with fit reduce on one top edge of a 10 mm box builds on SMLib
without a reduced-radius warning, so the fixture had no warned feature. It
now rounds the four vertical edges at R6, reduced to the full round (5), as
the copy-warning test beside it does, and checks the warning says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEu4Lr3moCCisdZShKz
This commit is contained in:
brett19
2026-11-01 17:07:43 -07:00
parent 3048d8c49e
commit dc88b80e24
2 changed files with 6 additions and 2 deletions
+6 -1
View File
@@ -2120,12 +2120,17 @@ mod tests {
#[test]
fn each_chip_finds_its_own_result() {
let mut h = two_boxes(false);
h.app.run("solid.fillet", json!({"edges": [[5, 0, 10]], "radius": 20, "fit": "reduce", "body": "One"})).unwrap();
// Too large for the box: R6 on its four vertical edges is reduced to the full round (5),
// and the feature warns that it was.
let edges = json!([[0, 0, 5], [10, 0, 5], [10, 10, 5], [0, 10, 5]]);
h.app.run("solid.fillet", json!({"edges": edges, "radius": 6, "fit": "reduce", "body": "One"})).unwrap();
h.frames(2);
let model = &h.app.session.model;
let index = super::result_index(&model.results);
let ids: Vec<u64> = h.app.session.doc.features.iter().map(|f| f.id).collect();
assert!(ids.len() >= 3 && model.results.iter().any(|r| r.warning.is_some()), "a warned feature among others");
let warning = ids.last().and_then(|id| model.result(*id)).and_then(|r| r.warning.clone()).unwrap_or_default();
assert!(warning.contains("reduced"), "the fillet is the warned feature: {warning}");
for id in &ids {
let found = index.get(id).and_then(|k| model.results.get(*k));
assert!(found.is_some_and(|r| std::ptr::eq(r, model.result(*id).unwrap())), "feature {id}");
-1
View File
@@ -21,4 +21,3 @@ solidcraft-kernel::corner_g2::tests::a_long_setback_keeps_the_g2_patch_inside_th
solidcraft-kernel::corner_g2::tests::the_box_corner_g2_patch_is_a_closed_solid_curvature_continuous_to_its_neighbours the fitted G2 corner patch bulges 1.7e-5 past the box, which SMLib's exact tight box now sees (the explicit G2 corner builds it inside)
solidcraft-kernel::tests::fillet_tabbed_plate_outer_loop_and_partial_selection_after_hole the arc and tab rounds together remove 9.20067 against 9.20420 (3.8e-4 off, 1e-5 allowed)
solidcraft-smlib::ops::tests::a_variable_round_with_a_corner_in_its_law_is_its_balls_union the two halves' rounds end on their own touch circles at the law's corner, not where they cross: 39.6456 removed against 39.5421
solidcraft-ui-egui::timeline::tests::each_chip_finds_its_own_result main's test: its radius 20 fillet with fit reduce on a 10 mm box builds on SMLib without a reduced-radius warning, so the fixture has no warned feature (same reply on develop's kernel)