Cura 5.0.0 generating slightly different gcode with identical settings
Hi,
while looking at gcode with Notepad++ I noticed something I can't explain: Gcode from the identical .stl file using the same profile will generate very slightly different gcode.
What I did:
-
Added the "XYZ 20mm Calibration Cube" (https://www.thingiverse.com/thing:1278865)
-
Set the profile to my preferred one.
-
Sliced, saved the gcode
-
Switched to another profile
-
Switched back to my preferred profile
-
Sliced, saved the gcode
-
Opened both gcode files in Notepad++
On the first try it differed even at line #3, one file reads:
";Filament used: 1.09403m"
the second one:
";Filament used: 1.09402m"
Using the "Compare" plugin for Notepad++ it is very obvious the some lines don't exist in one file but in the other they are present, and vice versa.
Other lines differ ever so slightly in the coordinates, example: file 1:
G1 X114.804 Y102.484 E259.76798
file 2:
G1 X114.887 Y102.425 E259.77129
My PC (Windows 10) is running fine, I even checked if there is a something wrong with the CPU or RAM by stress testing with Prime95, no problems detected.
Cura 4.8 does not create different gcode using identical steps.
It is not a problem for using it, the gcode prints fine in all cases.
Edit: It also happens with other .stl files, even ones I created myself using blender.
Posted Jun 1, 2022, 3:30 PM UTC · edited
The developers have noticed this as well. There is some indeterminate behaviour where sometimes it doesn't delete a vertex between two collinear line segments. It's extremely annoying for us testing stuff. For the print itself it rarely matters since it only happens halfway exactly straight lines, but it does add extra CPU load for the printer in theory.
We intend to fix this for Cura 5.1. I've been working on this myself the past 2 weeks, and it's almost ready.
Thank you for this quick and detailed explanation :-)