Add support for automatic mesh boundary calculations#482
Draft
Luro02 wants to merge 7 commits intoCartographer3D:mainfrom
Draft
Add support for automatic mesh boundary calculations#482Luro02 wants to merge 7 commits intoCartographer3D:mainfrom
Luro02 wants to merge 7 commits intoCartographer3D:mainfrom
Conversation
Jomik
requested changes
May 4, 2026
Collaborator
There was a problem hiding this comment.
I am not too fond of adding this mesh_bounds and pushing the _config property on the classes that need it - we also cannot guarantee that it will be evaluated at start up then.
As mentioned in Discord, I think you should just resolve it in the parser. _parse_mesh_min and _parse_mesh_max could read the "printer_info" object.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My PR KalicoCrew/kalico#879 needs support in cartographer, because the meshing and config parsing does not delegate to the bed_mesh implementation in kalico. The axis twist code should work out-of-the-box, because that one should delegate to the kalico implementation. Technically it does not at the moment, I will have to update my Kalico PR...
This PR is a work-in-progress, for now I will test it with my kalico fork on my printer and update this PR based on the results.
After the Kalico PR is merged, I will update this PR.
Why the implementation is the way it is?
For correctly calculating the mesh bounds, one must know where the printer can move to. This is defined in the
toolheadobject. This class is loaded after all extras/sections, and theprinter_infodepends on it, so it can only be accessed after for example a connect.The current cartographer code parses everything on load and assumes mesh_min/mesh_max are available too. To resolve this issue, I updated the configuration class, which now has a method for resolving the bounds. The other classes have been updated to call this function, and everything has been adjusted to ensure that these properties are only accessed when they can be resolved (hopefully).
Todo