j7126 / OctoPrint-Dashboard

A dashboard for Octoprint
GNU Affero General Public License v3.0
288 stars 39 forks source link

[Bug]: Calculated height is to big due to end code #370

Closed derlangemarkus closed 1 year ago

derlangemarkus commented 1 year ago

The problem

The total height of the object to print is calculated wrong. It is much too high. In my situation I found out that the reason could be my Cura end code. After printing the printer moves 8 cm in z direction. The result is that the object is calculated 8cm higher than it actually is.

I guess the plugin is looking for the highest z axis value in gcode.

Maybe there could be several solutions: 1) only consider z axis moves if there is any extrusion afterwards 2) the user can configure an offset (in my case 8cm) that will reduces the calculated total height 3) a comment in the end code can be used to show that the following lines are not for printing anymore. The calculation ignores every following gcode.

Version of OctoPrint

1.8.6

Platform

Raspberry Pi 3b+

Operating system running OctoPrint

OctoPi

Dashboard version

1.19.9

Python version

3.7.3

Printer model & used firmware incl. version

Anycubic vyper

Browser and version of browser, operating system running browser

No response

Logs and other files needed for analysis

File uploads & additional information

AV_Tube_holder_D32_mm_M6.gcode.zip

Unfortunately I cannot upload the Systeminfo Bundle because its size of 129MB is bigger than the allowed 25MB.

derlangemarkus commented 1 year ago

Sorry, I was wrong. There was a (negative) extraction in the endcode. After printing the head moves up and do a retract. I changed it to one line for the retract and then a line for the movement. Now the calculated size is correct.