From 93bbde86ef648a4dc7d37406deea0e7385162f9b Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 00:22:24 -0400 Subject: [PATCH] Tests: a script keeps a fillet a parameter makes impossible, a radius below zero ids_names_suppression_marker_and_failures_survive needs a feature that a parameter change makes fail, to see the failure survive the script's replay. It made a 1 mm round 50 mm, which truck refused as too big; SMLib builds a convex round wider than its faces by subtraction (the owner's overflow decision), so that round now succeeds. A radius of -1 mm fails on any kernel, and the replay still has to keep the failing feature, its id and its marker. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/script_tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/script_tests.rs b/crates/engine/src/cmd/script_tests.rs index 1528d6174..a091f1dc4 100644 --- a/crates/engine/src/cmd/script_tests.rs +++ b/crates/engine/src/cmd/script_tests.rs @@ -103,12 +103,13 @@ fn ids_names_suppression_marker_and_failures_survive() { run(&mut s, "parameters.add", json!({"name": "twice_depth", "expression": format!("{depth} * 2")})); run(&mut s, "parameters.comment", json!({"name": depth, "comment": "plate depth"})); run(&mut s, "parameters.favorite", json!({"name": depth})); - // A fillet that a parameter change makes too big fails, and the design keeps it. + // A fillet that a parameter change makes impossible (a radius below zero) fails, and the + // design keeps it. (A convex round wider than its faces is built now, by subtraction.) run(&mut s, "parameters.add", json!({"name": "r", "expression": "1 mm"})); // Pick only the plate's edge, clear of the overlapping box's edge. run(&mut s, "solid.fillet", json!({"edges": [[20, 0, 10]], "radius": "r"})); let fillet = s.doc.features.last().unwrap().id; - run(&mut s, "parameters.change", json!({"name": "r", "expression": "50 mm"})); + run(&mut s, "parameters.change", json!({"name": "r", "expression": "-1 mm"})); assert!(s.model.result(fillet).and_then(|r| r.error.clone()).is_some(), "the fillet fails"); run(&mut s, "timeline.rollback", json!({"position": 3})); let mut t = replay(&script(&mut s));