Z hop when retracted moves nozzle to X0 Y0 at start of the print
Cura Version
5.11
Operating System
Windows 11
Printer
Voron Trident 300
Reproduction steps
Before version 5.11 I used Z Hop When Retracted as the standard option for Voron. After update I noticed that my nozzle went to 0,0 at start of the print, which was the problem with adaptive bed mesh (I printed small part, so adaptive mesh was doing only small portion of the bed, as a result edges of the bed were interpolated so much, that they were out of Z limit).
To reproduce I made one gcode with this option, one without. Also double checked that in prior version there was no such behavior. I also tried basic things:
- Remove all plugins
- Remove all postscripts
- Remove all cura settings completely and start from scratch parametrization
- Re-add fresh voron profile
- Create printer based on custom profile instead of voron ones
Actual results
GCODE without Z Hop When Retracted:
GCODE with Z Hop When Retracted:
Expected results
Expected result for me is not to move the nozzle to X0 Y0 at start of the print with Z-hop enabled. As it was in prior cura versions.
Add your .zip and screenshots here ⬇️
Please, let me know if a project file is necessary, but since it behaves the same way on totally fresh install and settings, I don't think this is necessary.
@WojciechBednarski Thanks for the report. @HellAholic this is easy to reproduce. Just toggle "Z-Hop when retracted" on and off. The issue seems to be new with 5.11.0.
(I'm going to guess - "LayerPlan.cpp"???)
Thanks for the report. Added a ticket to the board. CURA-12840
If you need "Z-Hop when Retracted" and wish to remove that travel line you can use the post-processor "Search and Replace" as a workaround. Set it up like this:
Search for = G0 F(\d*|d.) X0.00 Y0.00 Z(\d.) Replace with = ;Travel Removed
The checkboxes look like this:
If you need "Z-Hop when Retracted" and wish to remove that travel line you can use the post-processor "Search and Replace" as a workaround. Set it up like this:
Search for = G0 F(\d*|d.) X0.00 Y0.00 Z(\d.) Replace with = ;Travel Removed
The checkboxes look like this:
![]()
The above regular expression is incorrect. It should be something more like
G0 F\d+(\.\d+)? X0.00 Y0.00 Z\d+(\.\d+)?
EDIT: even that is actually quite bad as it removed the movement rate and the next move will potentially be super slow. I've done this instead:
- search:
G0 F(\d+)(\.\d+)? X0.00 Y0.00 Z(\d+)(\.\d+)? - replace:
G0 F\1\2 Z\3\4
It works. There is always more than one way to skin a cat. I'll give you a point for spotting the removal of the "F" parameter.
The regexp you pasted in your comment actually replaced nothing in my case because it's missing escaping. The one I posted is also technically incorrect as it is actually missing escaping the dots. I noticed now it's different than the one we can see the start from in your screenshot. Maybe the markdown renderer messed it up?
Edit for clarity: That expression didn't work in my case when I copied blindly from your post, and after looking at it I could see quite a few problems with it:
- the second
dnot being escaped in the first capture group after theF - no escaping of
.characters - the last capture group after
Zis only matching one digit followed by any other character, therefore won't match fully something likeZ0.32leaving garbage characters at the end
Now all this technically don't matter for end result as the leftover garbage characters would be at the end of a commented line, AND if your line has F followed by an integer, as a float wouldn't be captured due to incorrect "or" clause in the first capture group.
Hope this helps :-)