Writers and validators for the slicer 3MF dialect hack.build designs export:
the Orca and Bambu project dialect that Flash Studio opens with every
filament slot filled (target bbs), plus plain 3MF Core (target core).
Split from hackbuild-fab packages/3mf and tools/py (D-027).
Decision ids (D-nnn) are in hackbuild-fab docs/plan/DECISIONS.md.
| folder | package | what it holds |
|---|---|---|
js/ |
npm hackbuild-3mf |
the TypeScript writer, the validator mirror, the artifact hash |
py/ |
PyPI hackbuild_3mf |
validate-3mf (the reference validator), orca3mf (writer), harvest-filament-keys |
corpus/ |
none | the conformance corpus both validators must agree on, with manifest.json |
- Every per-filament key of the gold Flash Studio save is written once per
slot (127 keys per slot, counted from the gold save
corpus/gold/hackbuild-coin-nfc.3mf). A slot takes its non-computed values from the preset row itsfilament_settings_idnames; rows come from slicer saves only. curr_bed_typecomes from the machine preset'sslicer.bedType("Textured PEI Plate" for ffc5p, owner report 2026-10-05).- Bytes are reproducible from
SOURCE_DATE_EPOCH.artifactHashis sha256 overname NUL sha256(bytes) LFper entry in sorted order, and the two writers agree on it entry by entry. - Export completeness runs before any byte is written: an unresolved or repeated name returns a failing check and no file.
Not published yet (D-037). Install from a clone:
npm ci --prefix js && npm run build --prefix js
uv tool install ./py # validate-3mf, orca3mf, harvest-filament-keys
validate-3mf --roundtrip corpus/gold/hackbuild-coin-nfc.3mf
orca3mf out.3mf body.stl:1 inlay.stl:2 --name coin
The JavaScript API is in js/README.md.
After the first release:
npm install hackbuild-3mf
uv tool install hackbuild_3mf
npm ci --prefix js && npm run build --prefix js
npm test --prefix js
uv run --project py pytest
uv run --project py corpus/run.py
The first npm ci --prefix js in a clone also sets core.hooksPath to
.githooks through its prepare script, so the commit-msg and pre-commit
hooks run on every commit (D-002). Confirm it once per clone with git config core.hooksPath, and never pass --no-verify. RULES.md holds the house rules:
people-only authorship with no AI credit anywhere (D-001), no trailers of any
kind (D-002), no emojis, no em or en dashes. CONTRIBUTING.md has the commit
subject format and the PR checklist.
tools/import-from-fab.sh rebuilds js/, py/hackbuild_3mf/, py/tests/
and corpus/ from a hackbuild-fab checkout and its subtree split.
tools/import-from-fab.sh --check <fab> rehearses a split of the fab
working tree (every file git does not ignore, committed at
SOURCE_DATE_EPOCH 315532800), imports it into a scratch copy and names every
file that differs from this tree; run it before a release, since a split
older than fab fails its own agreement tests. A split repo named after
<fab> is checked instead.
- 2026-10-13, after
npm run build --prefix js:npm test --prefix jspassed 233 of 233 tests (counted). In the full run 229 passed and 4 timed out at a load average near 300 (measured); the 4 passed on a rerun by name. The legacy read-back test injs/test/plate-layout.test.tsran because a hackbuild-fab checkout sat beside this one; without one (HBF_FABunset and no../hackbuild-fab) it skips. - 2026-10-13:
uv run --project py pytestpassed 85 of 85 tests (counted), with the owner saves under fab-knowledge present, so none skipped. The agreement tests importjs/dist, so the js build runs first. - 2026-10-13:
uv run --project py corpus/run.pyreached the expected verdict on 126 of 126 rows with the two validators agreeing on every row (counted), and rewrotecorpus/reports/. - 2026-10-13:
npm run check:presets --prefix jsmatched 2 saves and 4 rows (counted), both saves read fromcorpus/. - 2026-10-13:
tools/import-from-fab.sh --check ../hackbuild-fabexited 0 against the fab working tree as it stood that day (no fab commit exists).
- none at the package level
None. No export of this writer has been printed.
- Installation from the registries: nothing is published until the owner clears D-037.
- The
coretarget in any slicer.
Each path takes the licence of the first row that matches it:
| paths | what | licence |
|---|---|---|
corpus/known-bad/**, corpus/reports/** |
failure corpus | CC-BY-4.0 (LICENSES/CC-BY-4.0.txt) |
corpus/owner/**, corpus/legacy/**, corpus/boss/**, corpus/sprue/**, corpus/gold/** |
printable designs by the owner | CC-BY-SA-4.0 (LICENSES/CC-BY-SA-4.0.txt) |
*.md |
this README, CHANGELOG.md and the other docs |
CC-BY-4.0, with the code samples inside them also MIT |
| everything else | code, tests, corpus inputs and scripts | MIT (LICENSE) |
The hack.build name and logo are outside every grant (TRADEMARKS.md).