Modular G-Code postprocessor for Prusa/SuperSlicer
Clone this repository git clone https://github.com/vertexbz/gcode-postprocessor.git
Provide path to ./run.sh file of the cloned repository in Print Settings > Output options > Post-processing scripts of your slicer
Log level / verbosity can be used by providing -v (or --verbose) CLI flag, multiple use increases verbosity
- Default: Error
v: Infovv: Info, long formatvvv: Debugvvvv: Debug, long format
Default configuration is available in and loaded from ./config.default.yaml
User defaults can be provided via ./config.yaml (or ./config.yml) this file is not part of this repository, default one can be used as template
Defaults are overriden by file provided via -c (or --config) CLI parameter
Dry run mode fully processes the input but doesn't save the output to file
| CLI | YAML |
|---|---|
|
|
dry_run: Truedry-run: FalsedryRun: truedryrun: false |
Features look for popular custom macros which names may vary
Default configuration file contains full list of used macros
| CLI | YAML |
|---|---|
|
|
macro:
print_start: MY_CUSTOM_START_PRINT
print_end: MY_CUSTOM_END_PRINT |
To have actual benefit from using postprocessor, desired features have to be enabled, via configuration file or with CLI flag
- Features can be specified multiple times, with same or different configurations
- Features are applied in the order provided, first config files, then cli
- Configuration file features configuration overrides previous ones, CLI specified features are appended
| CLI |
|
|---|---|
| YAML |
feature:
- pa-extruder-fixer
- start-xy
- feature-with-config:
option1: value
other_option:
options_option: 1to clear all prior features feature: [] |
Detects first coordinate in g-code and sets X and Y coordinates to START_X and START_Y params of print start macro respectively
Removes final filament unload procedure for multi-material prints
Fixes SET_PRESSURE_ADVANCE gcode for clipper and multi-material prints (removes EXTRUDER parameter)
Removes Z axis movements prior to moving to initial XY position