Flat artwork to multi-material 3D print plates. image→trace→SVG→build→verify.
188
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.
image → trace.py → cleaned SVG → build.py → <colour>.stl + manifest.json → verify.py
| Step | Script | What it does |
|---|---|---|
| Trace | scripts/trace.py | upscale + denoise, background removal, palette detection, vtracer; anti-aliased edge pixels re-coloured from nearest flat pixel |
| Clean | scripts/clean_svg.py | resolves stacked layers into non-overlapping islands, one <path> per island |
| Build | scripts/build.py | extrudes each colour's islands plus a base of the printed elements; one STL per colour, centred on the origin |
| Verify | scripts/verify.py | re-reads the STLs and checks them against the SVG (exit 1 on failure) |
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
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 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.
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
docker pull hitluca94/chromaplate:latest