Skip to content

G-code generators: tool library, totem, cuthole, vcarve, pocket, relief3D - #7

Draft
shuckc wants to merge 14 commits into
mainfrom
stash-apply
Draft

shuckc wants to merge 14 commits into
mainfrom
stash-apply

Conversation

@shuckc

@shuckc shuckc commented Nov 7, 2026

Copy link
Copy Markdown
Member

Draft: collecting the generator work in one place while we decide whether it belongs in this package, a separate one, or another repository.

Contents

  • Tool library (rollingmill.tools, ~/.rollingmill/tools.json) and --tool support in the text, maze and spiral emitters (text_to_gcode is now rollingmill.text)
  • Generators: totem (4-axis turned shapes, donut as G02/G03 arcs), cuthole, vcarve (SVG medial-axis V-carving), pocket, relief3D
  • Packaging: new relief and vcarve extras alongside maze; README sections for each generator
  • *.bin firmware dumps and the manuals directory are gitignored
  • A final ruff format commit over the generator files only (the NC linter and core modules are untouched)

Test plan

  • pytest -q on Python 3.11: 214 passed, 1 skipped (maze tests need the maze extra)
  • CI run on this PR

🤖 Generated with Claude Code

shuckc and others added 14 commits November 7, 2026 21:10
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
render_preview spread each toolpath centreline into its V-groove using a
single grey_dilation with one large conical structuring element, which
dominated the preview runtime (~19s of it on the 300mm sample).

Because dilating a cone by a cone gives a wider cone of the same slope,
iterate a small (r=3px) conical kernel instead: a handful of passes rebuild
the identical envelope for a fraction of the cost. Output matches the single
big-kernel result to within ~0.07mm (sub-pixel) and the preview renders in
about a tenth of the time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Filled regions are now carved along a medial axis computed directly from
the vector outline as the interior of the boundary's Voronoi diagram,
replacing the raster-skeletonisation pass. This is robust where the raster
skeletoniser failed: clean convex glyphs (a diamond) kept their full cross
instead of collapsing to a dot, and tiny dots (a colon) are no longer lost.

Fills no longer rasterise, so the Inkscape dependency and the --fill-pitch
flag are gone; --medial-step controls the outline sampling density. The
--png raster path (with --pitch) is retained as a skeletoniser fallback.

Tests cover the diamond-stays-a-cross and tiny-dot-not-dropped cases via
the new vector fill path. README and module docstring updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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