Skip to content

Start From (Absolute / Current Position / User Origin) with a 9-point job origin #518

Open

Description

@switch87

Is your feature request related to a problem? Please describe.

I often engrave on things that are already lying on the bed: a coaster, a cue, an offcut. Today I have to move the design on the canvas to the exact spot, or zero a WCS at the corner of the material and design around (0, 0). Both work, but there is no quick way to say "put the centre of this job where the laser head is now", the way LightBurn's Start From (Absolute Coordinates / Current Position / User Origin) with its 9-point Job Origin does.

Describe the solution you'd like

A Start From setting with a 3×3 job origin selector, stored in the project:

  • Absolute Coordinates (default): exactly today's behaviour.
  • User Origin: the chosen job origin point (a corner, an edge midpoint or the centre of the job's bounding box) is placed on the zero point of the active WCS (G54–G59; machine zero for G53).
  • Current Position: the job origin point is placed at the head position the controller reports when you press Frame, Start or Export (the pointer dot when pointer alignment is on). Needs a connected, idle machine.

How it fits the existing WCS model:

  • The placement is one rigid XY translation of the whole job in world space, applied where the job aggregate is built. Everything downstream (machine transform, encoder, 3D preview, framing, sanity checks) sees the placed job, so frame, preview and output cannot disagree.
  • The G-code stays plain absolute G90 in the active WCS. No G92, no G10 L20, nothing is written to the controller. G10 would rewrite the user's WCS in EEPROM on every run, and a G92 offset is hidden modal state that survives an aborted job on some firmwares and would confuse Rayforge's own position display and Move-To. A translation needs no dialect changes and also works for non-G-code drivers.
  • With User Origin, the output coordinates are relative to the WCS zero and do not depend on the stored offset value, so an exported file follows the WCS when it is re-zeroed on the machine (the safe choice for files run from SD/USB). A Current Position export is tied to the head position at export time.

Safety:

  • The existing sanity check (work area, machine extents, no-go zones) runs on the placed job. For Current Position and User Origin, sending is also refused in the backend when the placed job leaves the machine extents or enters a no-go zone.
  • Frame uses the same placement. Because the dialect postscript usually returns to X0 Y0, the head is moved back to the start position after framing (and after a finished job) in Current Position mode, so Frame → Start lands in the same place.
  • Layers with rotary enabled only support Absolute (refused with a message otherwise).
  • The 2D canvas shows the placed job outline and the origin point when the mode is not Absolute.

Describe alternatives you've considered

  • Zeroing a WCS at the head and designing around (0, 0): works, but needs the design to be moved to the origin and gives no centre/edge anchoring.
  • Emitting G92 X0 Y0 at job start (what some senders do for "current position"): rejected for the reasons above.

Additional context

I'm working on this (GRBL first, golden G-code tests for each mode and anchor) and will report back with a branch.

Activity

  1. knipknap commented on Oct 9, 2026

    @knipknap
    Contributor

    Thanks — this is a feature I've wanted for a while myself, and your design is the first one I've seen that I'd actually merge. The crucial insight is doing the placement as a single rigid XY translation of the whole job before anything downstream runs, so the 3D preview, framing, sanity checks and the generated G-code can never disagree with each other.

    I also strongly agree with rejecting G92-based approaches. A hidden modal offset that survives an aborted job on some firmwares would desynchronise our own position display and Move-To, and G10 L20 rewriting the user's WCS storage on every run is unacceptable. Plain absolute moves in the active WCS, with the translation applied on our side, is the safe and driver-independent route. And making User Origin exports relative to the WCS zero (so a re-zeroed machine still runs an exported file correctly) is the right default for SD/USB workflows.

    The safety details are well thought out: running the existing work-area and no-go checks on the placed job, refusing out-of-bounds sends in the backend for the head-relative modes, and moving the head back after framing so Frame → Start lands in the same spot. The rotary restriction to Absolute is also correct.

    GRBL first with golden G-code tests per mode and anchor sounds right. Please go ahead — happy to review the branch.

  2. added
    rca-doneA root cause analysis was attached
    and removed on Oct 9, 2026
  3. switch87 commented on Oct 9, 2026

    @switch87
    ContributorAuthor

    Pull request opened: #538

    Start From with the 9-point origin and the placement outline, tested with the headless harness (screenshots in the PR description).

  4. 2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    rca-doneA root cause analysis was attached

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions