PrusaSlicer post processing script for Duet/Tool Changer
-
Hello,
Finished working on my Prusa Slicer post processing script for the tool changing systems running on Duet / RepRap 3
The script includes the following enhancements:
- Robust prime tower generation
- Smart Active/Idle tool-head temperature management
- PCF speed management
- Validation/stripping of the GCode (i.e. Merlin M900, mapping of the fan ranges etc.)
The documentation and repo can be found here:
https://github.com/mkudzia84/toolchanger-psppSynposis:
PRIME TOWER GENERATION
The wipe tower functionality in PrusaSlicer is build and optimized for a single extruder/multi-material setup. As such it works reasonably well with MMU2s or Palette 2 - but not in an IDEX or multi-tool setup.
For a multi-tool setup the prime tower:
allows to equalize nozzle pressure upon tool activation
doesn't require excesive material extrusion
allows for usage of tool-heads of different nozzle diameters
maintains structural integrity thru-out the print
doesn't create additional tool change operations
In order to achieve this, the script uses tube structure to generate the prime tower; Each tool-head is assigned it's own set of shells within the tube - this is done to ensure that, upon priming, material of same properties is depositor upon each other, increasing the strength of the prime tower In case the tool is not active in that particular layer, the first active tool within that layer is used to fill in the empty shells - this prevents additional tool changes (just for prime tower generation) Each shell band width is determined based on the tools nozzle diameter
EXPERIMENTAL - Support of variable layer heights/prime tower layer optimisation Even with fixed layer heights, PrusaSlicer offsets support/interface layers vs. the model layers (by between 0.03-0.05mm) To handle this and the variable layer heights, the script optimises the prime tower structure by combining the subsequent layer tool change priming moves onto a single prime tower layer. This is done to maximize the prime tower layer height but still keep it within the limits of max layer height for all the tools active in the layerSMART ACTIVE/IDLE TOOL-HEAD TEMPERATURE MANAGEMENT
After generating the prime tower GCode, the post processing script analyzes the result GCode to estimate the run-time of each operation - this is done to determine time periods when each tool is idle between deactivation and activations.
In the script, the user can specify the standby idle temperature delta. Based on the temperature delta, and configured cooling down and heating up temperature rate estimates - the scripts determines if, within each period of idleness, the idle tool will be able to cool down by temperature delta degrees and then heat-up back to the active temperature before being activated. If that is the case, it injects GCode to change standby temperatures within the idle period. This is done to prevent extensive oozing while the tool is idle
The script also inserts GCode to set the temperature of the tool to zero at the last deactivation in the file.PART COOLING FAN MANAGEMENT
The script inserts M106 instructions to disable and enable fans upon tool changes - and set appropriate speed settings based on the Cooling settings of filament assigned to specific tool in PrusaSlicer