From d87c7a70cbf5ead35a26b5320be01729925303ca Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Aug 2021 17:12:09 +0200 Subject: [PATCH] Switch return order for Repetier pauseAtHeight While testing I noticed that the movement after the pause will first move the head down and then move to the position before the pause. This could result in noticeable artifacts or accidentally push thin towers from the bed.) See the code below. ```gcode ;TYPE:CUSTOM ;added code by post processing ;script: PauseAtHeight.py ;current z: 5 ;current height: 5.0 M83 ; switch to relative E values for any needed retraction G1 F300 Z6 ; move up a millimeter to get out of the way G1 F9000 X190 Y190 G1 F300 Z20.0 M84 E0 @pause now change filament and press ; Do the actual pause G1 F300 Z5 G1 F9000 X30.759 Y30.759 G1 F1800 ; restore extrusion feedrate ``` I have switched the lines in the script such that it will first move to the correct X, Y and then move down ```python prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" ``` As shown in the code below ```gcode ;TYPE:CUSTOM ;added code by post processing ;script: PauseAtHeight.py ;current z: 5 ;current height: 5.0 M83 ; switch to relative E values for any needed retraction G1 F300 Z6 ; move up a millimeter to get out of the way G1 F9000 X190 Y190 G1 F300 Z20.0 M84 E0 @pause now change filament and press ; Do the actual pause G1 F9000 X30.759 Y30.759 G1 F300 Z5 G1 F1800 ; restore extrusion feedrate ``` --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index e6ca36730a..f034a7b53d 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -456,8 +456,8 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = 6000) + "\n" #Move the head back - prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" + prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" if retraction_amount != 0: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = 6000) + "\n"