Skip to content

Add support for automatic mesh boundary calculations#482

Draft
Luro02 wants to merge 7 commits intoCartographer3D:mainfrom
Luro02:main
Draft

Add support for automatic mesh boundary calculations#482
Luro02 wants to merge 7 commits intoCartographer3D:mainfrom
Luro02:main

Conversation

@Luro02
Copy link
Copy Markdown

@Luro02 Luro02 commented May 4, 2026

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 toolhead object. This class is loaded after all extras/sections, and the printer_info depends 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

  • Set a sensible default value for min_edge_distance. 0 is not good
  • Make sure the code crashes if min_edge_distance is not set, and mesh_min/mesh_max are not set either

Copy link
Copy Markdown
Collaborator

@Jomik Jomik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/install.sh
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