Ascertaining X Y Z Settings in a Prior Print reading the gcode

Hi All,

I used Cura and in there you can press an Icon which displays Scale and then in the next window displays the default XYZ.

The default settings were: X 141.106 Y: 176.374 Z: 180.868 which would have taken 8 hours to print in the gcode (estimator).

So I typed in some number like 92mm in X and the it scaled Y and Z that automatically chnageds all the numbers on Y and Z.

I pressed Slice the gcode button in Cura and it saved the gcode on the SD card which I then inserted that SD card into the Lulatboz Taz 6 printer and it printed in about 4 hours very well.

That was for the left bookend. Now I’m trying to print the right bookend the exact same size.

Can’t Cura or Notepad++ or some software tell me what I changed the XYZ to on the 1st print to?

Like when you open MS Word or Libre Writer to ascertain which margins and spacing you used on a prior document?

Thank you!

You didn’t mention which version of Cura you are using but the easiest dimension to ascertain from the gcode would be Z.

For all versions of Cura, open the gcode file in your favorite editor and go to the end of the file. Now search backward for “LAYER” and then backwards (or forwards*) for “Z”. This should give you the maximum value for Z which you should be able to use to scale your next part.

For the latest versions of CuraLE (4.13.4) or Ultimaker Cura (5.6), the slicer outputs some summary data at the beginning of the gcode file. You can use MAXZ to scale your next part. MINX, MINY and MAXX, MAXY probably won’t be useful because of things like brims, skirts, etc.

*Note: I only tested versions of Cura which I had installed. Which way to search from the last “LAYER” may vary depending on the version used.

For future projects, you might want to use a percentage instead of an absolute value because it’s easier for the “human” to remember :grinning:.

1 Like

Thank you so much for sharing your insights.

I can open the gcode cut in Notepad++ but there’s a ton of data in there. I’m not sure how to glean what I need to replicate the XYZ so I can set them the same for the other Thingiverse .stl.?

Can I attach or post what I see in Notepad++ here?

It’s lots-of pages.

I’m using Cura LE 3.6.37. I’ve used CURA LE for a while. I’ve got Cura Ultimaker 5.3.1 installed but only used it once and the print came out badly from that gcode.

Thank you again.

Yes, there is tons of data… In Notepad++ open the .gcode file, enter ctrl-END to go to the end of the file. Click Find, enter “LAYER”, and click the ^ to search backwards. Now look for the command near this point (within 5-10 lines before or after the “LAYER” with a “Z” value. In the example below the value is 47.925.

image

Load your next piece into CuraLE and scale the object by replacing the Z value by the value from the above search. Note that this may be a off by a layer height or so but should be good enough that the final print will match the previous one.

For this example, I sliced a 3DBenchy in CuraLE 3.6.40 with the standard profile (0.25 layer height, .425 initial layer height). The model is 60.0 x 31.0 x 48.0 and the result from searching the gcode file is 47.925.