- Python 100%
| adr | ||
| filaments | ||
| printers/qidi_q2 | ||
| scripts | ||
| .dprint.json | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
A declarative configuration for 3D printing: one repository that describes the printers, their firmware and the slicer profiles, and keeps every machine reproducible.
Status: the first printer, its slicer presets and the filament records are in printers/qidi_q2 and filaments/. The decisions live in adr/.
What It Is
A printer is described by its configuration rather than by the state of its controller. The firmware settings, the slicer presets and the calibration results live together, so a printer is rebuilt from the repository and a change to a profile is reviewed like any other change.
Layout
adr/— architecture decision records, the source of truth for the design;printers/— one directory per printer, withprinter.yaml, a README and the Orca Slicer process and filament presets;filaments/— one record per filament product, plus a calibration record per printer and nozzle;scripts/— the checks, the bundle generator and the command-line slicer;.dprint.json— the formatting rules for the Markdown, JSON and YAML files.
Usage
python3 scripts/check_orca.py
python3 scripts/check_filaments.py
python3 scripts/pack_orca.py
dprint check
dprint fmt
To slice a model without opening Orca:
python3 scripts/slice.py model.stl \
--printer qidi_q2 \
--process 0_20mm_petg_cf \
--filament eryone_petg_cf \
--output-dir .target
Print-specific settings, such as supports or a brim, are passed with
--setting KEY=VALUE; the script writes the G-code, project, sliced 3MF,
statistics and a job.json. See adr/slicing.md.
Sloped and rounded surfaces show fewer steps with a variable layer height. The script computes the profile from the mesh, so the result does not depend on a manual edit in the GUI:
python3 scripts/slice.py model.stl \
--printer qidi_q2 \
--process 0_20mm_petg_cf \
--filament eryone_petg_cf \
--output-dir .target \
--variable-layer-height
--layer-step sets the largest horizontal step a surface may show within one
layer; the default is 0.1 mm. Layers thin towards --min-layer-height where a
surface crosses the layers at an angle and grow to --max-layer-height where
nothing is stepped, so a taller cap trades surface quality for time. Only STL
input carries the geometry the profile needs.
--layer-skin is on by default: the profile counts only faces on the convex
outline of the model, so hidden bosses and pockets do not thin layers nobody
looks at. --no-layer-skin counts every face, which costs time for no visible
gain on a closed shell.
A tall part is slow to iterate on. --crop-z prints only the part of the model
below a height, which keeps the same bed contact and the same corners in a
fraction of the time:
python3 scripts/slice.py case.stl \
--printer qidi_q2 --process 0_20mm_petg_cf --filament eryone_petg_cf \
--rotate-x -90 --rotate-z -45 --crop-z 40 --variable-layer-height
A setting is passed as --setting when it belongs to the process and as
--filament-setting when it belongs to the filament. Orca resolves a filament
key from the filament profile, so passing one with --setting does nothing and
says nothing.