diff --git a/src/modules/draw/draw/wipeout.rs b/src/modules/draw/draw/wipeout.rs index bce92b5b2..cd854ae10 100644 --- a/src/modules/draw/draw/wipeout.rs +++ b/src/modules/draw/draw/wipeout.rs @@ -107,6 +107,13 @@ impl CadCommand for WipeoutCommand { } } + fn window_corner_pick(&self) -> bool { + // Rectangular mode picks free window corners — exempt from Ortho/Polar + // (#363/#291 class). Polygon points keep the constraints (axis-aligned + // polygon edges are a legitimate use). + matches!(self.mode, WipeoutMode::Rectangular) + } + fn on_mouse_move(&mut self, pt: DVec3) -> Option { let pt = pt.as_vec3(); match &self.mode { WipeoutMode::Rectangular => { diff --git a/src/modules/view/plot_window.rs b/src/modules/view/plot_window.rs index 82fe34210..c0f40d0d5 100644 --- a/src/modules/view/plot_window.rs +++ b/src/modules/view/plot_window.rs @@ -44,6 +44,11 @@ impl CadCommand for PlotWindowCommand { CmdResult::Cancel } + fn window_corner_pick(&self) -> bool { + // Free rectangle corners — exempt from Ortho/Polar (#363/#291 class). + true + } + fn on_mouse_move(&mut self, pt: DVec3) -> Option { let pt = pt.as_vec3(); let p1 = self.p1?.as_vec3(); // Draw the selection rectangle. diff --git a/src/modules/view/zoom_window.rs b/src/modules/view/zoom_window.rs index 85f896ef8..a0565b23d 100644 --- a/src/modules/view/zoom_window.rs +++ b/src/modules/view/zoom_window.rs @@ -59,6 +59,13 @@ impl CadCommand for ZoomWindowCommand { CmdResult::Cancel } + fn window_corner_pick(&self) -> bool { + // Both zoom-window corners are free points; Ortho/Polar must not pin + // the opposite corner to an axis or the window collapses to a line + // (#363, same class as #291). + true + } + fn on_mouse_move(&mut self, pt: DVec3) -> Option { let pt = pt.as_vec3(); let p1 = self.first?; let min = p1.min(pt);