Skip to content
SebG3DPublic

About

3D name tag printing software

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

3DNameTagBooth

Kiosk for the Christmas booth: kids type a name, pick font, shape and text colour; tags are printed in batches on a Prusa Core One (base colour of the day + text colour via M600). Plan: docs/PLAN.md.

Layout

  • fonts/ – six OFL/Apache fonts: src/ upstream, ttf/ + woff2/ built by tools/build_fonts.py, list in fonts.json
  • scad/lib/tag.scad – tag core (base, text, hole); scad/shapes/<id>/ – shape plugins (shape.json + shape.scad, see backend/nametag/shapes.py)
  • slicer/profiles/ – flat PrusaSlicer profiles (tools/make_profile.py): Core One 0.4 (0.20 mm BALANCED) and 0.25 (0.15 mm SPEED), Prusament PLA; 0.25 also with Prusament PETG. Plain G-code, set up as two tools on one nozzle (text = tool 2, tool change = M600) so PrusaSlicer can build a wipe tower; bed stays hot after a plate
  • config/print.json – print setups (profile, scale, base/text height, hole, min text size, color_change: tower | wiper + wiper_z); active is used by default, tools take --setup; materials adds other filaments per setup (e.g. pla → coreone_025.ini, Prusament PLA), picked with the staff toggle PLA/PETG (booth.json material, used for every plate started after saving; a restarted plate is re-sliced if its G-code was for the other material)
  • backend/nametag/ – pipeline: names → layout/render (OpenSCAD) → plate packing (3MF with text layer range on tool 2, wipe tower position) → slicing (M600 at the tower or the nozzle wiper, T lines stripped, footer merged to one tool)
  • backend/booth/ – booth backend: service.py (previews, orders, payment, plate scheduler, time model), db.py (SQLite), printer.py (simulator + PrusaLink), server.py (FastAPI), static/staff/ (staff page for the phone)
  • frontend/ – kiosk app (Vite + React + TS), built to frontend/dist/, served by the backend at /kiosk/
  • config/booth.json – booth settings (colours, prices, plate size/wait, PIN, printer)

Tools

python3 -m venv backend/.venv && backend/.venv/bin/pip install -r backend/requirements.txt -r backend/requirements-dev.txt
backend/.venv/bin/python -m pytest -q backend/tests
python3 tools/check_shapes.py sheet.png           # contact sheet of all shapes/fonts
python3 tools/make_plate.py -o out/ EMMA:baloo:stadium OMA:titan:tree
python3 tools/make_plate.py -o out/ --all-shapes EMMA
backend/.venv/bin/python tools/selfcheck.py      # is this machine booth-ready? (tools, render, slice, printer)
backend/.venv/bin/python tools/simulate_day.py   # a whole booth day in fast-forward: waits, ETA accuracy, capacity
backend/.venv/bin/python -m booth.fakelink       # fake Core One (PrusaLink) on :8081 for dry runs

Pi setup (kiosk, service, network, read-only): deploy/pi/README.md. Needs openscad, prusa-slicer, rsvg-convert (contact sheet only).

Backend

cd backend && .venv/bin/python -m booth.server --port 8080      # simulated printer by default

Staff page: http://<pi>:8080/staff/ (PIN from config/booth.json or env BOOTH_PIN). "⚙ Einstellungen" on the staff page edits config/booth.json and applies it live (no restart): event name, base/text colours, prices, order/queue limits, plate size/wait, fonts/shapes on/off, kiosk idle time + sound (every letter is a pentatonic note, the names play as a tune after ordering), staff sounds (each Kasse item has its own synthesized sound with ▶ test, ka-ching/fanfare on payment, alerts for plate done / colour change (repeats every minute) / error / new order; 🔊 in the header mutes one device), printer (sim/PrusaLink, connection test), print setup (only with an empty queue), material PLA/PETG (any time, next plate start), staff PIN. The kiosk picks changes up the next time it is on its start screen. --config <file> / BOOTH_CONFIG selects another booth.json. Kiosk API: GET /api/config, GET /api/status, POST /api/fit, POST /api/preview, POST /api/orders. For the real printer set "printer": {"type": "prusalink", "host": ..., "api_key": ...} – a USB stick must be in the printer (upload target). The PrusaLink client is tested on the real Core One+ (digest auth with user maker + password); results and timings: docs/hardware-test-2026-11-10.md. Note: the printer starts a new upload even in FINISHED – the "Druckplatte leer?" question when staff press Start is the only guard against printing onto a full bed.

Staff page "🟢 Bestellen an/aus" (header): stop ordering on the kiosk with a preset or own message, a closing time ("Annahmeschluss": the kiosk refuses orders whose tags would not be printed by then, using the forecast + eta_factor margin), show/hide the estimated wait on the kiosk start screen, and "Kiosk zurücksetzen" (kiosk reloads to its start screen, dropping a half-finished order). Stored in the DB (state.ordering), survives restarts; PUT /api/staff/ordering, POST /api/staff/kiosk/reset.

Staff page tabs (top left): 🖨️ plates + pickup (default), 🧾 Kasse, 📊 Tag, ⚙️ Einstellungen.

Staff page "🧾 Kasse": sell the other things on the stand (shop_items in booth.json, edited under ⚙️ "Kasse – Artikel"; price 0 = asked with a number pad, e.g. Sonstiges). The 🧾 button on a pickup order opens the Kasse with that order's unpaid tag price on the receipt. Money given (5/10/20/50 €, exact, keypad) shows the change. "✓ Bezahlt" → POST /api/staff/sales stores the sale (sales + sale_items), marks the order paid, and picks it up if all its tags are printed. Item money counts in 📊 "kassiert" and the CSV.

Staff page "📊 Tag": today's numbers (orders, printed, money, colours, Kasse items), CSV export, backups (hourly, data/backups/), "Tag abschließen" at the end of the day, clock + shutdown on the Pi.

Flow: order → all tags queued at once (extra tags are paid at pickup) → each tag goes onto a waiting plate of its text colour (up to plate.max_tags and what fits) → staff press ▶ Start on a plate (nothing starts by itself; ⭐ marks the recommended one: full, or its oldest tag waited plate.max_wait_min) → colour change: staff load the text colour and confirm on the printer → plate done: take tags off (tap the plate for the preview with order numbers), load the base colour, start the next plate. Failed or done plates can be restarted (🔁); a done plate leaves the list with ✓ Abgenommen (tags stay printed), any other plate can be deleted (🗑️, unprinted names go back onto a new plate). Pickup: 🎁 Abgeholt (asks for the money if something is due).

Kiosk frontend

cd frontend && npm install
npm run build                  # -> frontend/dist, backend serves it at /kiosk/ (restart backend after the first build)
npm run dev                    # dev server on :5173, proxies /api and /fonts to the backend on :8080

Flow: start → name (own keyboard) → font → shape (shapes that don't fit the name are greyed out) → text colour (real preview from the backend, rendered as SVG) → review ("+ Noch einen Anhänger", price) → order number + ETA. Idle 90 s → "Bist du noch da?" → reset. Backend unreachable → pause screen with auto-retry. 5 taps in the top-left corner within 3 s open the staff page (only then it shows a "Kiosk" link back; the dedicated staff screen has none). Shape icons come from GET /api/shapes/<id>/icon (rendered once, cached in backend/data/icons/ – delete after changing a shape).

New shape

Copy a folder in scad/shapes/, keep the folder name = id in shape.json, define module outline(tw, th) and function hole_pos(tw, th) in shape.scad, run tools/check_shapes.py and look at the sheet. Restart the backend.

About

3D name tag printing software

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages