March 14, 2025
Description
With my Ender 5 i had the problem, that retracting a lot on one spot of the filament, led to grinding down the filament or rolling it flat, which results in a failed print, because the extruder can't extrude filament anymore. If you have a low retraction distance you might not have this problem, since the spot where the extruder is rolling on over and over again is smaller. I need to use 4.5mm as my retraction distance to prevent stringing. Using the script leeds to stringing, where the retraction has been removed, but this is way better than a failed print or reducing the retraction distance which leeds to stringing everywhere. I personally use 22 maximum retractions at one spot (n_retract_max in the script). Cura slicer has this feature implemented, but Prusa slicer doesn't. The script runs automatically when you save the gcode.
The difference between the two pictures doesn't look big, but on the right picture which used the post prcessing script there are 1073 less retractions than on the left. As an example i used this model https://www.printables.com/de/model/318894-japanese-garden-lantern-lamp/files to demonstrate the working principle of the script.
You can find the script here: https://github.com/WatchingWatches/Post_processing_gcode
When you are interested in the working priciple, read the comments in the script.
Follow the instruction to get it working. If you have any questions, just write a comment.
I also created a group to share and discuss postprocessing scripts here: https://www.printables.com/de/group/post-processing-scripts-y5NPwqZ
License:
Creative Commons — Attribution
7