Ellis' Print Tuning Guide provides a great process for tuning Extrusion Multipler (EM), but I recently moved back to PrusaSlicer (RIP SuperSlicer) and I didn't want to print the objects one at a time (as suggested in the guide).
This script simplifies the process by automatically adjusting EM according to each file/object name.
PrusaSlicer's Verbose G-Code
feature adds comments to the gcode file indicating the start/stop of each object. This script finds those comments and inserts a subsequent M221 command so that each object is printed with the correct EM.
For example, EM_Cube-1.000.stl
prints at 100% EM, EM_Cube-0.995.stl
prints at 99.5% EM (and so on...)
- Install Python 3.x (tested with 3.11)
- Download
set_em_rates.py
to a folder of your choosing
- Configure your slicer settings according to Ellis' guide
- Enable the Output options -> Verbose G-code option
- Add the the script to Output options -> Post-processing scripts:
- Syntax:
"[PATH_TO_PYTHON_EXE]" "[PATH_TO_SCRIPT]";
- Example:
"C:\Python311\python.exe" "C:\path\to\set_em_rates.py";
- Syntax:
- Add desired STLs from Ellis' labeld EM cubes
- NOTE: Do not change the file/object names, otherwise the script will not work.
- Slice and print as usual.
Tested with:
- Windows 11
- Python 3.11
- PrusaSlicer 2.7.1
Should also be compatiblie with different OS and versions of Python/PrusaSlicer, but I have not tested yet. Please leave a comment if it works for you.
- Customizable file prefix (instead of
EM_Cube-
) - Option to customize other tuning options (temperature, retraction, pressure advance etc.)