Repository navigation
Printability guardrails + v0.4.0 - #12
Merged
Merged
Conversation
Detect color regions with features thinner than the nozzle line width at the chosen print size — strands the slicer would skip or print fragile — and flag colors so thin they'd vanish (the mesh builder drops sub-min-area islands). - colorplate/printability.py: shared, dependency-light detector (morphological opening at nozzle & 2x-nozzle to find sub-nozzle features, distance transform for the thinnest real strand width, a "bump size to clear it" suggestion). - Web: service.printability() + POST /api/printability return a per-color report plus an at-risk overlay PNG aligned with the 2D preview; app.jsx adds a nozzle control, a warnings panel, the highlight overlay, and a one-click bump-size. - CLI/pipeline: --nozzle flag, PlateConfig.nozzle_mm, the report on PlateResult/StackResult + manifest, and per-color warnings to stderr. - Warns only — Generate/Export is never blocked. - tests/test_printability.py (64 tests total). Release prep: bump to 0.4.0 and finalize the CHANGELOG (printability + the guided tour ship in this release). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detects color regions with features thinner than the nozzle line width at the chosen size — strands the slicer would skip or print fragile — and flags colors so thin they'd vanish entirely. Warns + suggests a fix; never blocks.
How it works
colorplate/printability.py(shared, numpy + scipy.ndimage + cv2): morphological opening at nozzle & 2×nozzle finds sub-nozzle features (boundary-noise-free); a distance transform gives the thinnest real strand width; suggests the size that brings it to a safe width.service.printability()+POST /api/printabilityreturn a per-color report plus an at-risk overlay PNG aligned with the 2D preview. The GUI adds a nozzle control, a warnings panel (✓ / ⚠ fragile / ✗ won't print, with the thinnest width), the highlight overlay (magenta = won't print, amber = fragile), and a one-click "bump size to ~X mm".--nozzle(default 0.4),PlateConfig.nozzle_mm, the report onPlateResult/StackResult+ in the manifest, and per-color warnings to stderr.Tests / verification
tests/test_printability.py— synthetic thin/thick masks, the service + endpoint, and the pipeline report. Full suite: 64 passing (3.10 + 3.12 in CI). Verified live in a headless browser: small size → warnings panel + magenta/amber overlay on the preview; click bump size → size updates and warnings clear; works across MMU / single-extruder / 3D / dark mode; no console errors. CLI prints warnings at small--height, clean at large.Ships as v0.4.0 (also rolls up the previously-merged guided tour). Auto-deploys to colorplate.spoolr.io on merge.
🤖 Generated with Claude Code