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

Model height wrong #253

Closed
Jack77777777 opened this issue May 11, 2021 · 8 comments · Fixed by #254
Closed

Model height wrong #253

Jack77777777 opened this issue May 11, 2021 · 8 comments · Fixed by #254
Assignees

Comments

@Jack77777777
Copy link

Describe the bug
If PrintTimeGenius is activated the height is wrong in web Ui and .metadata.json. If i deactivate PrintTimeGenius .metadata.json and Web Ui has the right data.

To Reproduce
Steps to reproduce the behavior:

  1. Delete .octoprint/uploads/.metadata.json

  2. Activate PrintTimeGenius

  3. Upload Gcode

  4. Result:
    image
    image

  5. Delete .octoprint/uploads/.metadata.json and Gcode

  6. Deactivate PrintTimeGenius

  7. Upload same Gcode

  8. Result:
    image
    image

Expected behavior
8.

OctoPrint Version:
1.6.1

PrintTimeGenius Version (if you know):
2.2.7

Nut.gcode.txt
plugin_PrintTimeGenius_engine.log

@eyal0
Copy link
Owner

eyal0 commented May 11, 2021

I am confused. Please write:

What is the height that is displayed by OctoPrint?

What is the height that you expected?

In the bug report you wrote that the expected behavior was "8.".

@eyal0
Copy link
Owner

eyal0 commented May 11, 2021

I see that PTG reports the "height" as "maxZ" minus "minZ", which is indeed 9.8mm. Is it better to report 10mm? I suppose so because that min height of 0.2mm is just the thickness of the layer. I guess that for height I could just always report maxZ?

I'm also not accounting for nozzle thickness, I guess technically we should also be reporting X and Y to be enlarged by the thickness of the nozzle. Ah well, no big deal.

@Jack77777777
Copy link
Author

Jack77777777 commented May 11, 2021

I see that PTG reports the "height" as "maxZ" minus "minZ", which is indeed 9.8mm. Is it better to report 10mm? I suppose so because that min height of 0.2mm is just the thickness of the layer. I guess that for height I could just always report maxZ?

I'm also not accounting for nozzle thickness, I guess technically we should also be reporting X and Y to be enlarged by the thickness of the nozzle. Ah well, no big deal.

The right value´s are the ones from pictures in 8. 23.28x23.28x10. With PTG enabled it shows 23.28x23.28x9.8. X and Y is correct but Z is wrong. I am here for testing ;)

@eyal0 eyal0 self-assigned this May 11, 2021
@eyal0
Copy link
Owner

eyal0 commented May 11, 2021

Here's where things went wrong: OctoPrint/OctoPrint@4c4570e

Maybe the heights reported by PTG and OctoPrint's built-in analyzer used to match before this change. I can make the same change.

@Jack77777777
Copy link
Author

Yes, that's it. This is the reason why i referenced this issue there. I opened both issues. As OP is fixed now you have to match your code 😁.

eyal0 added a commit that referenced this issue May 11, 2021
@eyal0
Copy link
Owner

eyal0 commented May 11, 2021

If you'd like to look at the PR, be my guest. If you want to download it, install this at a plugin:

https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/refs/heads/bedZ.zip

You will need to re-analyze files for it to take effect.

@Jack77777777
Copy link
Author

Jack77777777 commented May 11, 2021

I will test tomorrow due to an ongoing print.

@Jack77777777
Copy link
Author

Tested and confirm it is working.

Thanks a lot

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

Successfully merging a pull request may close this issue.

2 participants