diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index cc133355de..d7c6ccc0d9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -751,7 +751,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis); #endif #if ENABLED(BEZIER_CURVE_SUPPORT) - void plan_cubic_move(const float (&offset)[4]); + void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]); #endif void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false); @@ -3520,7 +3520,7 @@ inline void gcode_G4() { parser.linearval('Q') }; - plan_cubic_move(offset); + plan_cubic_move(destination, offset); } } @@ -13693,23 +13693,16 @@ void prepare_move_to_destination() { planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); #endif - // As far as the parser is concerned, the position is now == target. In reality the - // motion control system might still be processing the action and the real tool position - // in any intermediate location. - set_current_from_destination(); + COPY(current_position, cart); } // plan_arc #endif // ARC_SUPPORT #if ENABLED(BEZIER_CURVE_SUPPORT) - void plan_cubic_move(const float (&offset)[4]) { - cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder); - - // As far as the parser is concerned, the position is now == destination. In reality the - // motion control system might still be processing the action and the real tool position - // in any intermediate location. - set_current_from_destination(); + void plan_cubic_move(const float (&cart)[XYZE], const float (&offset)[4]) { + cubic_b_spline(current_position, cart, offset, MMS_SCALED(feedrate_mm_s), active_extruder); + COPY(current_position, cart); } #endif // BEZIER_CURVE_SUPPORT