DangerKlippers/danger-klipper

Feature Request: mesh best fit tilt

lukeslaboratory opened this issue · 1 comments

I like big prints, I cannot lie

When doing a tilt, the 3 points that are chosen form a plane, but they may not be the most representative of the total print area (make this dynamic for bonus points???)

My request is with the rapid adoption of beacon3d and its imitators, that klipper support a "quick mesh" option, generate a best fit plane off of that mesh, and then tilt the bed to fit that best fit mesh until variance from the baseline meets criteria. This allows the average deviation of the bed to be used instead of 3 ideally (but not always) representative points that may reduce z travel over very large prints with very large printers.

Thanks!

Luke

First draft for a process for this I think is like this:

  1. Rough z tilt
  2. Perform bed mesh, calculate best fit plane from mesh (giga brain math? resulting plane with largest area under specified max z deviation)
  3. Specify new z tilt positions based on the corners of the new best fit plane
  4. Adjust Z steppers to converge on one z position
  5. Verify we are within tolerance and if not, repeat step 2 onwards.

I think we should have a minimum plane area parameter, and max deviation within the plane parameter? I am sure there is a lot missing/wrong here, because this math is way over my head but someone can build on it or something. I'm not sure if we'd actually have to recalculate the best fit plane multiple times. I think its breaking my brain trying to think of what happens if we don't?