pyboxbuilder.export.exporter

BoxExporter — writes per-box and per-spacer 3MF files (T068a/T068b/T070/T072).

Output layout (FR-025):

{out_dir}/{game}/mmu/{label}_body.3mf {out_dir}/{game}/mmu/{label}_lid.3mf {out_dir}/{game}/single/{label}_body_single.3mf {out_dir}/{game}/single/{label}_lid_single.3mf

The mmu pass keeps positive inserts (labels, accents) as separate coloured solids so the slicer can assign them their own material; the single pass fuses everything into one body. Writes are gated on each piece’s fingerprint — the description it was built from — so re-exporting an unchanged project rewrites nothing (see pyboxbuilder.export.fingerprint).

Geometry export runs through PythonSCAD. When it is unavailable this raises: it used to create the file tree anyway, writing a 0-byte 3MF per piece and reporting every one as written, so a broken install looked exactly like a successful export until the files reached a slicer (FR-000h).

Classes

BoxExporter

Writes the 3MF tree for one project.

ExporterState

Files written / skipped so far, plus the bounding boxes measured.

PieceBounds

Measured bounding box of one exported piece (T068b / FR-027).