bookbox

Parametric 3D-printed book boxes - Bambu Lab P1S + AMS, 0.4 nozzle, PLA, no supports

A box that shelves like a book, opens on a pin hinge, closes on magnets, and holds tools in a fitted insert. Agents draw the multi-color cover panels as SVG. One build writes one Bambu Studio 3MF with every part already on its extruder; you map extruders to AMS slots and print.

uv sync
uv run bookbox coupon --book books/hex-bits   # tolerance coupon, print this first
uv run bookbox build books/hex-bits           # -> books/hex-bits/out/hex-bits.3mf + report.md
uv run bookbox gallery books/hex-bits --serve # pick stamp candidates per face

Pipeline

One manifest in, one 3MF out. Nothing in the pipeline sends jobs to the printer.

manifest.yaml format, palette, items, stamps shell tray + cover, pin hinge, magnet pockets insert auto layout, slots, inlaid labels stamped panels SVG stamps: inlay + deboss, linted .3mf parts on extruders, plates Bambu Studio map extruders to AMS print P1S + AMS bookbox build bookbox verify bookbox gallery / stamp lint by hand, coupon first

What exists

Renders from the shell module, insert layouts from the solver, and the 3MFs as Bambu Studio opens them.

tray and cover render
Tray with pin-hinge knuckles on the spine edge and magnet pockets; cover in the corner.
hinge close-up
Hinge close-up: knuckle with the 1.9 mm hole for a 1.75 mm filament pin.
hex-bits insert layout
hex-bits insert: 24 upright 25 mm bits, 6 flat 50 mm bits, 2 nut setters, finger channels. 32 of 32 placed.
precision-drivers insert layout
precision-drivers insert: one round handle and 12 precision shafts. 13 of 13 placed.
hex-bits in Bambu Studio
hex-bits.3mf in Bambu Studio: plate 1 tray + spine panel, plate 2 cover, plate 3 yellow insert with black labels. Opens with no dialogs.
threemf check
threemf demo: parts arrive on their extruders with the palette preset, P1S printer selected.
threemf overrides
Per-object slicer overrides from Part.settings: 8% infill, 2 walls on one object only.
stamp gallery
Stamp gallery for hex-bits: 20 candidates per face with lint status; pick writes the manifest.

Stamps rendered by stamps.preview: the regions the engine prints, hex-bits palette

Text is outlined by the engine, so these show the real letterforms. Deboss shows as a lighter shade on the black body.

stamps/examples/

front-icon
spine-typographic
back-honeycomb-use
back-deboss

books/hex-bits/stamps/candidates/ - 8 of 40

front-01
front-04
front-07
front-09
front-12
front-19
spine-09
spine-13

Numbers e2e run, 2026-10-28, Bambu Studio CLI, 0.20 mm Standard

buildthicknessitemsplatesparts / objectsfilamentprint timebuild
hex-bits (octavo 220 x 150)35 mm32 of 3237 / 4~348 g454 min (~7.6 h)8 s
precision-drivers40 mm13 of 1348 / 5~521 g *569 min (~9.5 h) *8 s
coupon (one color)--112 / 238.9 g75 min9 s

hex-bits per plate: tray + spine panel 130.5 g / 154 min, cover 77.0 g / 95 min, insert 141 g / 205 min (after the 8% gyroid override; was 183 g / 221 min solid). * precision-drivers was sliced before the insert override: insert 246 g / 246 min, plate 4 holds only the inside_cover panel (57 g / 59 min). uv run pytest: 115 passed in 23 s.

Decisions settled with the owner, 2026-10-28

topicdecision
printerBambu Lab P1S, AMS, bed 256 x 256 x 256, 0.4 nozzle, PLA
colorsup to 4 per book (palette slots c1..c4 = extruders 1..4)
openinghinged front cover, pin hinge, 1.75 mm filament pin (hole 1.9 mm)
closure2 neodymium discs 3 x 4 mm, pockets open to the inside, pressed in after printing; hinge: none and snap lip later
formatspocket 180x120, octavo 220x150, quarto 250x190 in formats.yaml; caps height 250, width 200
thicknessauto from the insert, rounded up to 5 mm, clamped 15..70; manifest may pin it
decoration1.6 mm panels press-fit into recesses on any face; glue fallback; agents freestyle
marksinlay (flush, other color) and deboss (0.6 mm recess); no emboss
spine textreads top to bottom
insertsseparate part, dropped into the tray, accent color, labels inlaid on top
itemslibrary of shape primitives (items/*.yaml); item + count; auto layout with a pin escape hatch
stampsLLM-drawn SVG under a strict contract and a linter; 20 candidates per face in a 2D gallery
CADbuild123d (OCCT) in Python, managed by uv
capture rigsilhouette rig designed in a separate session; not in this repo yet
printingowner opens the 3MF in Bambu Studio and prints; coupons first
agentstools print markdown by default, --json for scripts

Open items tk ls, 2026-10-28

Rows in yellow wait on an owner decision.

tickettitle
boo-14rz closedinsert: solid insert costs 183 g and 3.7 h on hex-bits. Infill override done (141 g / 205 min); further cuts need geometry (ribbed underside, lower body) owner decision
boo-ivwnSpine panel is only T-9.6 mm wide: hinge takes the top of the spine owner decision
boo-xxmoBed-side panels as windows with a 45 deg lip (proposal B) so front/back panels are swappable owner decision
boo-jeh9Check the insert finger notch and 45 deg undercut on the first print
boo-lywtCheck the hinge opening angle (stops near 145 deg) on the first print
boo-sge1Side-face panel recesses print with a 1.6 mm horizontal ledge
boo-uuyeinsert labels: i/j dot gap is 0.3 mm, under the 0.5 mm minimum
boo-zh18One bundled font for insert labels and stamps
boo-s7edstamps: text outlines have no kerning
boo-px69threemf: map palette filament names to Bambu filament presets
boo-s25uthreemf: size the prime tower reservation from Bambu's own estimate
boo-gotnthreemf: regenerate the P1S settings template after Bambu Studio upgrades
boo-4zo4hinge: none and no-magnet snap-lip variants
boo-ou8aStamp batches via OpenRouter script
boo-yjxqCapture rig: silhouette scanner for slot outlines
boo-stymCapture flow: second side photo for item height