From a76239169760a76bbabaa0bbcd3d67a5417ac84c Mon Sep 17 00:00:00 2001 From: bherbruck Date: Thu, 8 Oct 2026 13:46:27 +0000 Subject: [PATCH] =?UTF-8?q?Move=20triad=20handles=20published=20for=20scen?= =?UTF-8?q?arios=20(move=5Fx,=20move=5Frz=E2=80=A6);=20s33=20(Move=20opens?= =?UTF-8?q?=20at=200,=20the=20X=20arrow=20moves=20along=20X=20only)=20enab?= =?UTF-8?q?led?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL --- crates/ui-egui/src/gizmo.rs | 6 ++++++ crates/ui-egui/tests/scenarios.rs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/gizmo.rs b/crates/ui-egui/src/gizmo.rs index 014c8099..a176d1f4 100644 --- a/crates/ui-egui/src/gizmo.rs +++ b/crates/ui-egui/src/gizmo.rs @@ -247,6 +247,12 @@ pub fn show(ui: &mut egui::Ui, painter: &egui::Painter, proj: &Proj, id: egui::I let l = mm_per_px(proj, t.center)? * LEN_PX; LAST.with(|x| *x.borrow_mut() = Some((t.center, l))); let sh = shapes(proj, t, l)?; + // Handles by name for scenarios ("move_x", "move_rz", "move_ball"…). + for n in ["x", "y", "z", "xy", "yz", "xz", "rx", "ry", "rz", "ball"] { + if let Some(q) = handle_point(n, Vec3::ZERO, 60.0).and_then(|p| proj.to_screen(p)) { + crate::scenario::publish_handle(&format!("move_{n}"), q); + } + } let state: Option = ui.data(|d| d.get_temp(id)); let pointer = ui.input(|i| i.pointer.hover_pos()); let hovered = if state.is_none() { pointer.filter(|p| proj.rect.contains(*p)).and_then(|p| hit(&sh, p)) } else { None }; diff --git a/crates/ui-egui/tests/scenarios.rs b/crates/ui-egui/tests/scenarios.rs index 2bcb9e32..9ff3d5d6 100644 --- a/crates/ui-egui/tests/scenarios.rs +++ b/crates/ui-egui/tests/scenarios.rs @@ -49,7 +49,8 @@ scenarios!( s23_configurations, s24_motion_study, s25_autosave_recovery, - s27_move_triad + s27_move_triad, + s33_move_x_arrow, ); /// Scenarios written ahead of their fixes or features (the user's open bugs): run with @@ -67,7 +68,6 @@ macro_rules! pending { pending!( s31_sketch_on_face_projects: "user bug: a sketch on a face projects its loops as reference (solvecraft-sketch)", s32_cut_in_active_component: "user bug: a cut in the active component leaves others alone (solvecraft-params)", - s33_move_x_arrow: "user bug: Move opens at 0 and its X arrow moves along X only (solvecraft-ui)", s34_component_move_carries_sketches: "user bug: moving a component carries its sketches (solvecraft-repo)", - s30_pattern_a_hole: "a hole patterned as a feature gives one hole, not three (solvecraft-ui)", + s30_pattern_a_hole: "the dialog sends the hole as a feature; the engine's pattern of a blind hole cuts too little (one hole short)", );