HUB
Sign inSign up

hitluca94/chromaplate

By hitluca94

•Updated 1 day ago

Flat artwork to multi-material 3D print plates. image→trace→SVG→build→verify.

Image
Web servers
0

188

hitluca94/chromaplate repository overview

⁠Chromaplate

Turns flat, few-colour artwork (logos, cartoons, stickers — not photos) into multi-material 3D-print plates: one watertight STL per colour, a thin base under only the printed elements, all in one shared coordinate system so the parts load into a slicer already aligned.

⁠Pipeline

image → trace.py → cleaned SVG → build.py → <colour>.stl + manifest.json → verify.py
StepScriptWhat it does
Tracescripts/trace.pyupscale + denoise, background removal, palette detection, vtracer; anti-aliased edge pixels re-coloured from nearest flat pixel
Cleanscripts/clean_svg.pyresolves stacked layers into non-overlapping islands, one <path> per island
Buildscripts/build.pyextrudes each colour's islands plus a base of the printed elements; one STL per colour, centred on the origin
Verifyscripts/verify.pyre-reads the STLs and checks them against the SVG (exit 1 on failure)

⁠Quick start

uv run scripts/trace.py   data/01_input_transparent.png out/quickstart/traced.svg
uv run scripts/build.py   out/quickstart/traced.svg out/quickstart --height 200
uv run scripts/verify.py  out/quickstart

⁠Web UI

uv run scripts/web.py              # http://127.0.0.1:8000
uv run scripts/web.py --host 0.0.0.0 --port 8000  # reachable from other machines

Upload an image, then run Trace → Build → Verify with previews at each step.

⁠Docker

docker build -t chromaplate .
docker run --rm -p 8000:8000 -v chromaplate_out:/app/out chromaplate

Mount /app/out to keep jobs between containers. Version tags (vX.Y.Z) publish multi-arch images (amd64/arm64) to Docker Hub via GitHub Actions.

⁠Tests

uv run pre-commit install
uv run pre-commit run --all-files
uv run pytest

Full per-script options, measurements and known limits: docs/pipeline.md⁠

License: MIT

Tag summary
Recent tags
Content type
Image
Digest
sha256:785f0fc5f…
Size
121.9 MB
Last updated
1 day ago
docker pull hitluca94/chromaplate:latest