Rework PauseAtHeight.py#21327
Conversation
A re-write of the classic Pause script.
|
HellAholic, I changed the name of this one to try to avoid confusion but there would be the question of what to do with the original "PauseAtHeight". |
|
This one I would go with replacement since it's extending the |
|
Crap. |
|
I appears to just have needed a couple of variables renamed so they match from old to new. |
Changed the file name from PauseAtLayerOrHeight to match the existing PauseAtHeight. Additional debugging to insure that this version is backward compatible with the previous version.
|
I've performed some testing on this as I use pausing for filament swaps quite frequently. So far everything seems to work as it should, however I have a couple of implementation queries, which I was wondering if you could help me with for my understanding The first is that I think there is a piece of obsolete code as I don't think the condition could ever be achieved The second query surrounds the switching between Relative/Absolute Extrusion, where I was wondering if there was a reason why the script switches to Relative Extrusion even if Relative Extrusion is already being used then back to Relative Extrusion at the end of the pause. Then only switch to Relative Extrusion & back to Absolute Extrusion at the end if Absolute Extrusion was in use before the pause This would enable this code snipets to be simplified so that the append lines, which use extrusion_mode_numeric would contain an explicit M82 command, which is only appended if Absolute Extrusion was in use before the pause |
|
Removed an uneeded IF statement. changed 2 App.getinstance..." to self.global_stack.
|
Thanks for clearing that up. I only have the one flavour of printer to test this on so never no if there are other printer configurations where the extrusion switching or lack of could cause problems but what you've done is good defensive programming in case something throws a curveball in the future |
A re-write of the classic Pause script.
Description
Changes and additions:
Added more 'Pause Command' options for alternate firmware flavors.
Added 'Unload' option (prior to pause) and 'Reload' and 'Purge' options (after the pause).
Added 'Reason for Pause' options.
a. If 'Reason_for_pause' == 'Filament Change' then Unload, Reload, and Purge become available.
b. If 'Reason for Pause' == 'All Others' then the filament change options are hidden as they are not required for insertions or other pause events.
Added 'Multiple Pause Layers' option.
a. This works well when all pauses will have the same settings. Delimit the layer numbers with commas.- If pauses require different settings then add another instance of the script.
b. Multiple messages can be added (also delimited by commas). Each message will be assigned to the equivalent pause layer.
c. Example: For pause layers 15,23,48 the messages could be: White,Red,Blue
Added support for "Firmware Retraction"
Added support for 'One at a Time' print sequence.
a. Pauses can be at different layers in different parts.
b. All pause layers must be listed (use the Cura Preview layer numbers).
c. A pause at 'Layer:5' will only result in a pause at the first layer:5 encountered whereas pauses at '15,23,67' might be in different models.
d. Models can be skipped, or have pauses at different layers than other models, and some models could be different colors or a different material.
Added 'Flow Rate' option for 'Redo Layer'.
a. (Note that "Redo Layer" is disabled when in One-at-a-Time mode.)
Multi-extruder printers now use the Cura settings of the tool that is active when the pause occurs (retraction distance, retract and prime speeds, etc.)
The 'Stepper Timeout' has been de-confused (hopefully).
Obsolete:
The "Retraction option" is removed. Retractions are now handled in the script.
This fixes... OR This improves... -->
Type of change
How Has This Been Tested?
I have been using it for about 2 years now.
Test Configuration:
Checklist:
NOTE: This version has some overlap with the current "PauseAtHeight". That one could be made obsolete as we did with 'DisplayInfoOnLCD'. The original remains but it just shows a message informing the user that they should use the new one.