Cura: Post Processing Plugin | Pause at height | Repetier (@pause) 1mm to hight after continue

Created on 20 Oct 2020  路  3Comments  路  Source: Ultimaker/Cura

Fixed it myself - see in the comments.
Bug:
The Post Processing Plugin "Pause at height" has a bug with the Repetier Method where the Z-height is 1mm to high after continue.

Application version
4.7.1

Platform
Windows 10 | Intel Coree i5-4960k | Geforce 1070

Printer
Anycubic i3 Mega

Reproduction steps

  1. Open a File
  2. Extensions
  3. Post Processing Scripts
  4. Pause at Height
  5. Layer Number (not heigth)
  6. Pause at Layer (any will do)
    7.Method: Repetier

Screenshot(s)
https://i.imgur.com/Z1q1mXJ.png

Actual results
;TIME_ELAPSED:207.767029
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current layer: 3
M83 ; switch to relative E values for any needed retraction
G1 F300 Z1.65 ; move up a millimeter to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15.65
M84 E0
press @pause now and filament change ; Do the actual pause
@pause
G1 F300 Z1.65
G1 F9000 X0 Y0
G1 F2400 ; restore extrusion feedrate
M82
G92 E125.5039
G92 E125.5039
;LAYER:3
M106 S127.5
M204 S1800
M205 X8 Y8
;TYPE:WALL-INNER

Expected results
mycomments:
---- Here i am at 0.65mm
G1 F300 Z1.65 ; move up a millimeter to get out of the way
---- here the script from cura decides to go a mm up to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15.65
----- 14mm up again
M84 E0
press @pause now and filament change ; Do the actual pause
@pause
----- Now im in the Pause
G1 F300 Z1.65
----- Here i am 1 mm to hight now!!!! Here should stay 0.65mmF
G1 F9000 X0 Y0
----- Jetzt bist du wieder bei x0 y0 aber 1mm zu hoch. Hier fehlt die Bewegung auf 0.65mm!!!!
G1 F2400 ; restore extrusion feedrate
M82

Project file
Any Gcode/STL will do - all will have the same result :) Test it yourself

Log file
No need, obvious bug in the Script

Additional information
The Post Processing Plugin "Pause at height" has a bug with the Repetier Method where the Z-height is 1mm to high after continue.

Cura Bug

Most helpful comment

I just noticed that you guys use Pythonscripts.
I work with python for a living and it was a smallfix - so here is my contribution:

Where the Head moves 1mm up (thats correct):
411:# Move the head away
412:prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + " ; move up a millimeter to get out of the way\n"

The wrong line starts here:
458: prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n"
The correct line:
458: prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n"

I changed it for myself now. But maybe you consider to update your script :)

All 3 comments

I just noticed that you guys use Pythonscripts.
I work with python for a living and it was a smallfix - so here is my contribution:

Where the Head moves 1mm up (thats correct):
411:# Move the head away
412:prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + " ; move up a millimeter to get out of the way\n"

The wrong line starts here:
458: prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n"
The correct line:
458: prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n"

I changed it for myself now. But maybe you consider to update your script :)

Feel free to provide us with a PR so that we can review and test it! Also your contribution will be properly credited in our codebase.

I did a PR. Im new to github (started today) so ill hope i did everything right!

If there is something wrong with my first PR please let me know.

Was this page helpful?
0 / 5 - 0 ratings