Skip to content

Rounded corners in gcode#32

Open
MarkJB wants to merge 1 commit intomainfrom
rounded-corners-for-drag-knife
Open

Rounded corners in gcode#32
MarkJB wants to merge 1 commit intomainfrom
rounded-corners-for-drag-knife

Conversation

@MarkJB
Copy link
Copy Markdown
Member

@MarkJB MarkJB commented Apr 5, 2026

This pull request adds a new "round sharp corners" feature to the G-code export workflow, allowing users to automatically smooth sharp polyline corners with arcs of configurable angle and radius. The implementation affects the user interface, data models, and the G-code generation logic. Additionally, it introduces infrastructure for re-clipping hatch lines against rounded boundaries and updates related types and state management.

image

New round-corner smoothing feature:

  • Added new G-code export options for rounding sharp corners, including a checkbox to enable the feature and numeric fields for angle threshold and radius, with appropriate UI controls and validation in GcodeOptionsDialog.tsx. [1] [2] [3] [4]
  • Updated the G-code options and preferences interfaces (GcodePrefs, GcodeOptions) and the toolbar to support the new round-corner parameters. [1] [2] [3]

G-code engine and SVG worker enhancements:

  • Implemented robust algorithms in gcodeEngine.ts for rounding polyline corners (roundSubpathCorners) and for re-clipping hatch lines against rounded polygons (clipSegmentToPolygon).
  • Integrated the new options and logic into the SVG worker, including passing round-corner parameters, updating G-code comments, and deferring hatch-line processing for accurate clipping. [1] [2] [3] [4]

Data model and state management updates:

  • Extended the VectorObject type to include an optional hatchParentId property for hatch-fill lines, enabling correct association and re-clipping during G-code generation.
  • Updated the canvasStore to set hatchParentId for generated hatch lines. [1] [2] [3]

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

PR build artifacts are ready:

These artifacts are temporary and are deleted automatically when the PR is closed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant