Sample python scripts for PrusaSlicer or SuperSlicer
This version was tested with python 3.8 (32 bits). You can find a version of the Python distribution and the development environment : https://www.python.org/downloads/
Go to: Print Settings
> Output options
> Post-processing scripts
Add line: "[python directory]\python.exe" "[script directory]\ReplaceM73.py";
Replace the M73 P R instruction into a M117 line for non Prusa MK3 printer. In order to get also the Total number of layer you must add the code :
';LAYER_COUNT:[total_layer_count]'
In the Prusa Slicer or SuperSlicer Initial G-Code. Note the ReplaceM73New.py is a modification of the previous ReplaceM73.py script to be compatible with the 2.4 release of PrusaSlicer.
Replace the M204 Pxxx instruction for External contour, in order to use a specific Acceleration value for external contour. Perimeter_acceleration (Perimeter accelerations) must be define in the print profile ( Speed - Acceleration controle)
Detect in the G-Code
;TYPE:External perimeter
and then change the value set in the python code by :
M204_code = "M204 P600\n"
Re-start the Gcode from the first M600 position founded in the Gcode. Need to define manualy the Change Color or filament position in PrusaSlicer
An other sample script