mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-02 16:54:23 +08:00

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 ```