Added recovery to PauseAtHeightOrLayer plugin

I had a largish multi-color project and faced a number of difficulties and bugs in the existing plugin, like
multiple instances not working, the print not continuing, temperature resuming incorrectly, ‘redo last layers’ not working etc… as part of figuring out GCode and what was happening (mostly I was moving the steppers while changing the filament) I ended up rewriting a decent portion of the plugin adding some new recovery features (re-home xy after pause, generate only post-pause code) which others might find useful.

This file goes into (on my win7): C:\Program Files (x86)\cura-lulzbot 3.2\plugins\PostProcessingPlugin\scripts
Please try it out and let me know of any bugs, here is the full changelist from inside the script.

–Added ‘only_post_pause’ option that allows generating GCode with all prior layers

deleted, allowing the user to resume failed or unsuccessfully unpaused prints

which are still on the bed. This can be used to get around “Home XY First”

issue often encountered when changing filament and moving the steppers

–Added ‘home_xy’ option to optionally re-home the X & Y axes after pausing as a

preventative measure against running into “Home XY First” failure

–Added ‘change_filament’ option to unwind 60mm on pause for much easier filament removal

–Added ‘beep’ option to signal the user when intervention is required

–Added ‘stop_fan’ option to turn off the fan during the pause

–Added tracking bed temperature, fan speed, extruder flow and backlash compensation so

that they can properly be resumed with the recovery options

–Added a first pause at which the plugin turns off nozzle/estepper/fan and sleeps

waiting for the user to come back. At continuing, the nozzle is heated back

up while the user replaces filament or places electronics inside the print.

–Added better interactive prompts

–Bug: fixed multiple concurrent invocations of this plugin often not working

–Bug: script resumed to initial-layer temperature as Cura put the real temperature

inside the first layer which was skipped, fixed.

–Bug: ‘redo layers’ did not properly keep track of absolute e-value or location, did

not play nice with multiple invocations or keep track of layers which can be

safely re-printed

–Numerous other minor bugfixes, ease of use improvements and expanded clarifying text

I submitted this to Lulzbot’s bug tracking system, but no comments there so far about including this with Cura.
PauseAtHeightorLayer2.zip (6.32 KB)

Thank you! I had a pause at height issue where when it resumed, it smashed into my felt pad/wiping frame, melting a good portion, luckily it didn’t gouge my glass bed!