Files
OrcaSlicer/src/slic3r/GUI
Tommaso Bianchi b7397b48bd Transform: drag the body, the numbers follow
The Placement > Transform verb opened a card of spin controls — dx/dy/dz, an
axis combo, an angle — with nothing on the geometry. The 3-axis drag gizmo the
charter asks for already existed and was fully implemented (arrows, rotation
rings, click-to-type per axis), reachable only from a small icon button in the
tree card header. The prominent verb opened the form; the geometry-first
control was hidden behind an icon. That was backwards.

Transform now arms that same gizmo on the target body. The card stays as L2's
typed half: the drag writes dx/dy/dz, the axis and the angle, and the pivot is
seeded from the body's centroid so the parametric feature reproduces exactly
what was dragged.

Decomposition is exact for the interaction that matters — the gizmo's rings are
per-world-axis, so a ring drag is an axial rotation. A pose composed from two
rings is not axial and the card can only name one axis, so it reports the
dominant one rather than refusing to answer.

Three things this had to get right:

- The gizmo bakes its drag into the display transform so the body follows the
  cursor, and the feature performs the same motion parametrically. Committing
  without reverting first would move the body twice.
- tool_confirm() and tool_cancel() both tested moving_body() BEFORE the active
  tool, so with the gizmo armed Confirm would have dropped the gizmo and never
  created the feature. Both are now guarded on Tool::None.
- close_tool() is the single revert point. Esc, Cancel and switching tools all
  pass through it, so a Transform that was never committed cannot leave the body
  displaced.

Edit mode is untouched: re-seeding the gizmo from a stored feature is a separate
problem, so editing an existing Transform still gets the card alone.

Reviewed and compiled (libslic3r_gui, RC=0); not exercised. snaporca-qtf4.
2026-08-12 20:04:45 +02:00
..
2026-06-18 09:13:51 -03:00
2025-10-05 16:02:17 +08:00
2026-04-20 19:27:38 -03:00
2026-01-03 23:06:57 +08:00
2026-07-11 20:24:03 +03:00
2025-07-06 11:34:47 +08:00
2026-06-07 13:12:51 +08:00
2026-06-18 09:13:51 -03:00
2026-07-18 03:15:11 +08:00
2026-07-14 13:10:42 +08:00
2026-07-20 18:14:01 -03:00
2026-06-18 09:13:51 -03:00
2025-08-22 20:02:26 +08:00
2026-07-02 17:49:36 +08:00
2025-09-21 13:47:51 +08:00
2025-10-02 09:30:48 +08:00
2026-07-24 09:41:24 -03:00
2026-06-18 09:13:51 -03:00
2025-10-02 09:30:48 +08:00
2025-10-28 15:29:56 +08:00
2026-07-17 08:30:22 +08:00
2025-10-28 15:29:56 +08:00
2025-09-21 23:01:08 +08:00
2026-04-25 18:14:51 +08:00
2026-04-25 18:14:51 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2026-04-25 18:14:51 +08:00
2026-01-23 17:05:56 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2024-07-23 18:00:21 +08:00
2026-05-21 09:04:26 +08:00
2026-06-18 09:13:51 -03:00
2026-01-03 23:06:57 +08:00
2026-01-23 17:05:56 +08:00
2026-01-03 23:06:57 +08:00
2026-07-24 09:41:24 -03:00
2026-02-04 11:40:02 +00:00
2026-01-23 17:05:56 +08:00
2026-01-23 17:05:56 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2025-10-28 15:30:06 +08:00
2025-10-28 15:29:56 +08:00
2026-04-25 18:14:51 +08:00