A G-code post-processor for RepRapFirmware, delivered as a DuetWebControl 3.7 plugin.
Browse the G-code files already on your Duet's SD card, apply find/replace rules, command mappings, layer-anchored insertions and scripted transforms, preview the diff, then write the result back — without a PC, a slicer re-slice, or an SD card shuffle.
Status: v1.0.0 — feature-complete and in active testing on real hardware. 800+ unit, golden-file, safety and component tests pass; typecheck and
verify-buildare green against DWCv3.7-dev. The plugin ZIP is about 72 KB. What is and is not implemented is listed in PLAN.md; docs/usage.md is the full guide.
- Browse the G-code on the SD card, and inspect any file: slicer, print time, layers, extents, tools, temperatures, command histogram, dialect detection, and preflight checks against the machine's own limits.
- Transform it with an ordered recipe: find and replace (PrusaSlicer-compatible), command mapping that moves parameters properly, layer/Z/tool/object-anchored insertion, deletion, parameter arithmetic, calibration-tower sweeps, a no-code rules tier and a JavaScript tier.
- Preview the exact diff before anything is written.
- Write it back safely: backup, atomic temp-then-move, post-write size verification, an identity stamp that catches a repeat run, and a hard refusal to touch the file being printed.
Slicers already do this — PrusaSlicer has G-code Substitutions (find/replace with regex) and Post-processing scripts (an external Perl/Python/Bash executable handed the output file path); OrcaSlicer has the same. Both have two limitations this project fixes:
- They only run at slice time. A file already on the SD card — sliced last month, sent by someone else, downloaded from a model site — can't be touched without re-slicing.
- Post-processing scripts need a desktop. They shell out to a local interpreter. There is nothing equivalent when the printer is the only machine in the loop.
This plugin runs the same class of transformation in the browser, against the files already on the board, from the same UI you're already looking at.
| Project | What's borrowed |
|---|---|
| PrusaSlicer | G-code Substitutions semantics — find/replace pairs with regex, case-sensitivity and whole-word flags, applied per layer block (docs) |
| PrusaSlicer / OrcaSlicer | Post-processing scripts — the "hand the whole file to a script" model, reimagined as a sandboxed in-browser worker |
| oozeBot preFlight | Slicer-side profile/metadata conventions and the "know what produced this file" idea |
| oozeBot OPP | The concept of a dedicated post-processor pass for a specific printer family |
GPL-3.0-or-later, matching the other plugins in this family.