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

feat: add bed aspect ratio to heightmap graph #1420

Merged
merged 2 commits into from
Jun 18, 2023

Conversation

EmJay276
Copy link
Contributor

@EmJay276 EmJay276 commented Jun 17, 2023

Description

This PR adds the bed aspect ratio to the heightmap graph.
This is espacially usefull for highly non square print beads (mine is 600 x 300), see Screenshots below.

Related Tickets & Documents

None

Mobile & Desktop Screenshots/Recordings

Desktop

Mobile

[optional] Are there any post-deployment tasks we need to perform?

No

Signed-off-by: Michael Jäger michael@mjaeger.eu

@meteyou meteyou merged commit 2b4b881 into mainsail-crew:develop Jun 18, 2023
8 checks passed
@meteyou
Copy link
Member

meteyou commented Jun 18, 2023

Thx for your PR!

@EmJay276
Copy link
Contributor Author

EmJay276 commented Jun 18, 2023

Thanks for reviewing it that fast 👍

If min(XYRange) is 0 (this can only be the case if one direction has only 1 bed mesh point), isn't there a problem with a 0 wide/depth graph? Even if we are not dividing by 0?

0/1 = 0

I will check later and open a PR if needed.

@meteyou
Copy link
Member

meteyou commented Jun 18, 2023

Thx for your hint! I had not thought about this case at all. It is very unusual, but we should merge a fix if it could happen.

@EmJay276
Copy link
Contributor Author

EmJay276 commented Jun 18, 2023

I tried to create a bed mesh with a X/Y distance of 0, but klipper won't allow this kind of settings (see below).
I think we don't need to check this case, if the bed width is 0, we have other problems than a heightmap graph not showing up.

Only 1 point along an axis is invalid: Option 'probe_count' in section bed_mesh must have a minimum of 3
Setting min/max points to the same value is also invalid: bed_mesh: invalid min/max points

I also noticed, having the mesh only on a part of the bed, the graph will still ajust to the size of the bed (which was it doing the same way before but without axis scaling).
Which is perfectly fine I think.

Mesh with 290 x 290, bed 300 x 600

@EmJay276 EmJay276 deleted the heightmap_aspect branch June 18, 2023 16:47
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 this pull request may close these issues.

2 participants