Skip to content

add concentric fill for laser mode closed shapes#493

Open
clugtu wants to merge 2 commits into
GridSpace:masterfrom
clugtu:feature/laser-concentric-fill
Open

add concentric fill for laser mode closed shapes#493
clugtu wants to merge 2 commits into
GridSpace:masterfrom
clugtu:feature/laser-concentric-fill

Conversation

@clugtu

@clugtu clugtu commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Adds a fill toggle and spacing (mm) input to the laser output settings
  • When enabled, fillOut() generates concentric inset paths inside each closed shape by repeatedly offsetting the outer boundary inward
  • Works correctly for both solid shapes and ring/annular shapes (fill stays within the material region and does not enter holes)

How it works

  • The outer boundary of each shape is offset inward by the spacing distance on each iteration; inner children are stripped before offsetting to prevent Clipper from expanding holes and collapsing the ring after just one pass
  • For shapes with inner holes (e.g. a circle imported as a thin ring), filling stops when the inset polygon's area shrinks to the hole area, keeping fill rings within the material

Settings

Setting Default Description
fill off Enable concentric fill for closed shapes
spacing 1 mm Distance between fill rings

Test plan

  • Enable fill in laser output settings, set spacing to 0.2 mm
  • Slice a DXF with solid closed shapes — verify concentric rings appear inside each shape
  • Slice a DXF with ring/annular shapes — verify fill rings appear only within the ring material, not inside the hole
  • Verify fill is absent when the toggle is off
  • Verify GCode export includes the fill paths

🤖 Generated with Claude Code

clugtu and others added 2 commits June 26, 2026 18:54
Adds a 'send to host' panel in the laser export modal that posts gcode
directly to an OctoPrint or Moonraker endpoint. Enabled via the
exportOcto controller setting. Host and API key persist in localStorage.

Also adds tools/cncjs-bridge — a zero-dependency Node.js shim that
accepts OctoPrint-format multipart uploads from Kiri and forwards them
to CNCjs's /api/gcode endpoint, bridging the two without modifying
either tool's server.

Fixes optional chaining on navigator.serviceWorker in boot path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a fill toggle and spacing setting to laser output. When enabled,
fillOut() generates concentric inset paths inside each closed shape by
repeatedly offsetting the outer boundary inward. Inner children are
stripped before offsetting to prevent Clipper from expanding holes and
collapsing the ring prematurely; for shapes that have holes, filling
stops when the ring shrinks to the hole area so fill stays within the
material region.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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