diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 921a334500..490a063ff2 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -86,7 +86,8 @@ void plan_arc( if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis]) angular_travel = RADIANS(360); - const float mm_of_travel = HYPOT(angular_travel * radius, FABS(linear_travel)); + const float flat_mm = radius * angular_travel, + mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : flat_mm; if (mm_of_travel < 0.001) return; uint16_t segments = FLOOR(mm_of_travel / (MM_PER_ARC_SEGMENT)); diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 2d0e4ce389..cb2915382e 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -373,7 +373,7 @@ void Planner::recalculate_trapezoids() { } } -/* +/** * Recalculate the motion plan according to the following algorithm: * * 1. Go over every block in reverse order... @@ -403,7 +403,6 @@ void Planner::recalculate() { recalculate_trapezoids(); } - #if ENABLED(AUTOTEMP) void Planner::getHighESpeed() {