Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Dimension when open this file #414

Open
zengfanfan opened this issue Aug 29, 2024 · 4 comments
Open

Wrong Dimension when open this file #414

zengfanfan opened this issue Aug 29, 2024 · 4 comments
Labels

Comments

@zengfanfan
Copy link

zengfanfan commented Aug 29, 2024

Describe the bug
When open a g-code file, the minimal Z value is not right. ( should be 0, but we got 10)

Screenshots
image

the g-code file
bug.gcode.txt

@zengfanfan zengfanfan added the bug label Aug 29, 2024
@svenhb
Copy link
Owner

svenhb commented Aug 29, 2024

Ok will check.
You can also upload files, instead of copying the content....

@stujoult
Copy link

stujoult commented Sep 2, 2024

Reproduced in older version.
It treats z0 as non number.
grblplotter
Moving z0 to new line also fixes [Min X]
grblplotter2

@svenhb
Copy link
Owner

svenhb commented Sep 2, 2024

In your example the difference is G0/G1:
example 1: g0 x-1y0z0
example 2: g1 z0

G0 is a fast movement and therefore not part of a contour of the object = not relevant for the dimension. Only the movements G1, G2 and G3 are used to calculate the dimension.

I don't remember why I did it this way: dimension was only updated for Z, when z-position is not actual grbl z-position:
if (posWasSet && (newLine.actualPos.Z != Grbl.posWork.Z)) { xyzSize.SetDimensionZ(newLine.actualPos.Z); }
Is fixed now, I make a new release after finishing other changes...

@zengfanfan
Copy link
Author

ok. looking forawd to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants