From 4a94a025c87d3a6a379958311fd8e5c26818a2bd Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 01:00:48 -0400 Subject: [PATCH] Tests: freezing rebuilt arc borders gets its rebuild from a notch across the arc freezing_rebuilt_arc_borders_keeps_authored_dimension_entity_indices needs the projected border of the sketch's face to come back with a different number of curves. Truck split the sector's arc into pieces that changed with its sweep (270 to 300 degrees); SMLib keeps one arc whatever the sweep, so the count stayed 3. A notch, clear of the sector until a parameter moves it across the arc at 90 degrees, now splits the arc border into two arcs and the notch's sides. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/sketch_face_tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/sketch_face_tests.rs b/crates/engine/src/cmd/sketch_face_tests.rs index 31602ad32..237ff8b96 100644 --- a/crates/engine/src/cmd/sketch_face_tests.rs +++ b/crates/engine/src/cmd/sketch_face_tests.rs @@ -353,6 +353,10 @@ fn freezing_rebuilt_arc_borders_keeps_authored_dimension_entity_indices() { run(&mut s, "sketch.line", json!({"points":[format!("{arc}.end"),format!("{arc}.start")],"infer":false})); run(&mut s, "sketch.finish", json!({})); run(&mut s, "solid.extrude", json!({"sketch":profile,"distance":10,"operation":"new","body_name":"Sector"})); + // A notch clear of the sector until `notch` moves it across the arc at 90°: then the top face's + // arc border is rebuilt in two arcs and the notch's sides. + run(&mut s, "parameters.add", json!({"name":"notch","expression":"30 mm"})); + run(&mut s, "solid.box", json!({"corner":["-1 mm","notch","-1 mm"],"length":2,"width":2,"height":12,"operation":"cut","targets":["Sector"]})); let pick = top_pick(&s, "Sector"); let id = run(&mut s, "sketch.create", json!({"plane":pick}))["sketch"].as_u64().unwrap(); let circle = run(&mut s, "sketch.circle.center", json!({"center":[20,20],"radius":2}))["curves"][0].as_str().unwrap().to_owned(); @@ -360,7 +364,8 @@ fn freezing_rebuilt_arc_borders_keeps_authored_dimension_entity_indices() { run(&mut s, "sketch.finish", json!({})); let before_count = s.model.state().sketch(id).unwrap().sketch.curves.len(); run(&mut s, "parameters.change", json!({"name":"turn","expression":"300 deg"})); - assert!(s.model.result(id).unwrap().error.is_none()); + run(&mut s, "parameters.change", json!({"name":"notch","expression":"9 mm"})); + assert!(s.model.result(id).unwrap().error.is_none(), "{:?}", s.model.result(id).unwrap().error); let visible = s.model.state().sketch(id).unwrap().sketch.clone(); assert_ne!(visible.curves.len(), before_count, "fixture must rebuild projected topology"); let mut pick = top_pick(&s, "Sector");