feat: add rotatable panel orientation - #342
Conversation
|
@pborges so after many refactoring commits before this (which are already in main) I ported your PR to the now cleaned up latest version of main. Due to the cleanups in main, the PR is now a lot smaller. I think I also fixed some bugs (WCS line direction and Ops positioning in the 3D canvas). Can you please test? Does this work? |
Port the rotatable panel orientation with the document model in WORLD space and the canvas presenting PANEL space. - MachinePanel now exposes both WORLD (native) and PANEL (rotated) transforms; the encoder stays native WORLD->MACHINE. - Add panel_orientation to device profiles and orientation controls to the hardware settings and machine wizard. - The 2D canvas presents PANEL space: document content rotates via the layer transform and machine markers project machine->PANEL. - The 3D preview threads the world_to_panel rotation so ops, models, laser beams, and no-go zones follow the panel presentation. - Reject rotary layers under a rotated panel with a user-actionable pipeline error. Co-authored-by: Paulo Borges <pborges475@gmail.com>
d2fa2d5 to
606ff73
Compare
606ff73 to
f5dddf1
Compare
|
I sure can! Sorry I didn't get a notification for this tag, but I will list out some manual test cases and their results tonight |
Manual Test Plan — Panel Orientation (LightBurn-style X/Y Swap)Branch: Use a real machine with a non-square bed (X extent ≠ Y extent) for Scope: hardware-only checks. UI-only items (settings screens, canvas Safety: for every new orientation, first jog cautiously off the corners 1. Jogging & HomingFor each orientation (Native, Rotate Left, Rotate Right):
2. Canvas Keyboard Nudge (Arrow Keys)
Likely root cause: 3. Other Canvas Transform Operations (Suspected Same Bug Class)
4. Origin Corner + Axis Reversal Combinations
5. Job Execution — G-code Correctness (critical)
6. Framing (outline/boundary preview)
7. Soft Limits
8. Work Coordinate Systems (WCS)
9. 3D Simulation vs. Real Machine
10. Regression Sweep (Native orientation only)Run a quick smoke pass in Native orientation only, on real hardware,
Sign-off
Result summary (full pass complete)🐛 Confirmed bugs — block sign-off:
✅ Verified working (core physical pipeline is sound):
|
|
Thank you for testing, I will work on porting the other functionality to the new PANEL coordinate system. One thing I cannot reproduce: spread vertically / horizontally seems to work fine for me (when unrotated). How did you test this? You need a minimum of three workpieces selected, then they are placed equidistant. |
|
Turns out I was "holding it wrong" I didn't realize the "spread" works within the extents of the selected objects, I had objects overlapping each other and expected them to align to a grid and spread out, once I manually spread them out, the alignment did work, chalk that up to operator ignorance. However vertical and horizontal spreading do seem like they need to be translated. |
|
All fixes done. Can you confirm it is ready to merge? |
Manual Retest Plan — Panel Orientation Fixes1. Arrow-key nudgingRepeat in Rotate Left and Rotate Right:
Result: Nudging worked correctly throughout the Rotate Left and Rotate 2. Align and centerRepeat in Rotate Left and Rotate Right, undoing after each command:
Finding: The Center commands initially appeared to be flipped because Result: Align and Center worked correctly in both rotated orientations. 3. Spread and flipRepeat in both rotated orientations:
Result: Spread and Flip worked correctly in both rotated orientations. 4. Move shortcuts on real hardwareThese buttons move the head, not the workpiece. Do not fire the laser. Repeat in Rotate Left and Rotate Right:
Result — single item: Move to Lower-Left, Center, and Upper-Right reached Result — multiple items: The collective lower-left, center, and 5. 3D simulationUse the default WCS; no additional WCS configuration is required. For Native, Rotate Left, and Rotate Right:
Result — head tracking: Physical, 2D, and 3D head positions tracked 6. Quick regression and sign-off
Result: The Native smoke test, orientation round-trip, and restart check Result
Overall assessment: The panel-orientation behavior feels good. No issues |
|
I think it's ready to merge! The last thing to keep in mind is when a sketch is added while the canvas is rotated, the newly added sketch |
|
Thanks again for the thorough testing! I think the sketcher topic could be a follow up. |
|
I agree! Thanks again for this |
Ports the rotatable workspace orientation from PR #334 with the document model in WORLD space and the canvas presenting PANEL space.
MachinePanelexposes both WORLD (native) and PANEL (rotated) transforms; the encoder stays native WORLD→MACHINEpanel_orientationdevice-profile field and orientation controls in hardware settings + machine wizardworld_to_panelrotation so ops, models, laser beams, and no-go zones follow the panel presentationCo-authored-by: Paulo Borges @pborges