Skip to content

feat(GcodePreview): improved arc support#1846

Merged
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/gcode-arc-support
May 19, 2026
Merged

feat(GcodePreview): improved arc support#1846
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/gcode-arc-support

Conversation

@pedrolamas

Copy link
Copy Markdown
Member

Improved G2 and G3 command support, to include R argument, and G17, G18, and G19 multi-planar handling.

The 'xy' plane (G17) is the currently handled case, for 'xz' and 'yz' (G18 and G19), we just represent it as line from the origin point to the destination.

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added this to the 1.37.1 milestone May 19, 2026
@pedrolamas pedrolamas requested a review from Copilot May 19, 2026 14:40
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label May 19, 2026
@pedrolamas pedrolamas requested review from Copilot and removed request for Copilot May 19, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves G-code preview arc handling by tracking active arc planes and adding support for G2/G3 arcs that use the R radius parameter.

Changes:

  • Tracks modal arc plane selection via G17, G18, and G19 during parsing.
  • Adds ArcPlane typing and stores the active plane on parsed arc moves.
  • Renders XY-plane R arcs as SVG arcs, while representing XZ/YZ-plane arcs as straight XY-projection lines.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/workers/parseGcode.ts Parses modal arc plane commands and attaches the active plane to arc moves.
src/util/gcode-preview.ts Adds R-parameter arc rendering and fallback handling for non-XY planes.
src/store/gcodePreview/types.ts Adds ArcPlane and records it on ArcMove.

@pedrolamas pedrolamas merged commit 9d5e81d into fluidd-core:develop May 19, 2026
8 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/gcode-arc-support branch May 19, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants