MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.24k stars 19.22k forks source link

Arc moves (G2/G3) and bezier curves (G5) don't apply leveling correction with non-delta UBL #10638

Closed ManuelMcLure closed 5 years ago

ManuelMcLure commented 6 years ago

Description

Arc moves (G2/G3) and bezier curves (G5) don't appear to apply leveling correction with UBL on anything but a delta.

Found through code inspection.

It looks like plan_arc() is calling planner.buffer_line_kinematic() directly and planner.buffer_line_kinematic() does not apply any leveling unless PLANNER_LEVELING is set. PLANNER_LEVELING is defined as

#define UBL_SEGMENTED  (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA)))
#define ABL_PLANAR     (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
#define ABL_GRID       (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
#define OLDSCHOOL_ABL  (ABL_PLANAR || ABL_GRID)
...
#define PLANNER_LEVELING      (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION))

so PLANNER_LEVELING is not set if using UBL on anything but a delta and therefore it looks like leveling is not applied to arc moves.

The same applies to cubic_b_spline() and bezier curves.

thinkyhead commented 6 years ago

Patches submitted, and will be merged after review.

boelle commented 5 years ago

@ManuelMcLure is this still an issue using bugfix 2.0?

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.