Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

2.3 KB
Raw Blame
[
  {"note": "Alias preset (#304): Shift+Alt+left drag orbits, Shift+Alt+middle pans, Shift+Alt+right zooms (down: out, up: in). Other presets don't navigate with Shift+Alt+left."},
  {"call": "engine.execute", "params": {"command": "solid.box", "params": {"length": 20, "width": 10, "height": 5}}},
  {"call": "ui.prefs", "params": {"nav": "alias"}},
  {"note": "The orbit centre is its own preference, and the origin and cursor pivots move the camera's target: pin the view centre (the default) here so `panned` measures the binding, not the pivot."},
  {"call": "ui.prefs", "params": {"orbit_around": "view_centre"}},
  {"expect": {"prefs": {"nav": "alias"}}},

  {"note": "Orbit: like a right drag (from the drag threshold on), and Shift (part of the binding) doesn't snap."},
  {"camera": {"yaw": 0, "pitch": 0}},
  {"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 848, "y1": 500, "steps": 8, "shift": true, "alt": true}},
  {"expect": {"camera": {"yaw_deg": 19.25, "pitch_deg": 0, "panned": false, "zoomed": "no"}, "selection": 0}},

  {"note": "Pan."},
  {"camera": {"yaw": 0, "pitch": 0}},
  {"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 860, "y1": 540, "steps": 8, "shift": true, "alt": true, "button": "middle"}},
  {"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": true, "zoomed": "no"}}},

  {"note": "Zoom (dolly): dragging down moves away, dragging up moves closer."},
  {"camera": {"yaw": 0, "pitch": 0}},
  {"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 800, "y1": 560, "steps": 8, "shift": true, "alt": true, "button": "right"}},
  {"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "out"}, "dialog": null}},
  {"camera": {"yaw": 0, "pitch": 0}},
  {"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 800, "y1": 440, "steps": 8, "shift": true, "alt": true, "button": "right"}},
  {"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "in"}}},

  {"note": "Fusion: Shift+Alt+left drag is not navigation."},
  {"call": "ui.prefs", "params": {"nav": "fusion"}},
  {"camera": {"yaw": 0, "pitch": 0}},
  {"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 848, "y1": 500, "steps": 8, "shift": true, "alt": true}},
  {"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "no"}}}
]