|
@@ -711,8 +711,7 @@ inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[
|
711
|
711
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
712
|
712
|
if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position_kinematic", current_position);
|
713
|
713
|
#endif
|
714
|
|
- inverse_kinematics(current_position);
|
715
|
|
- planner.set_position_mm(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], current_position[E_AXIS]);
|
|
714
|
+ planner.set_position_mm_kinematic(current_position);
|
716
|
715
|
}
|
717
|
716
|
#define SYNC_PLAN_POSITION_KINEMATIC() sync_plan_position_kinematic()
|
718
|
717
|
|
|
@@ -1541,8 +1540,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1541
|
1540
|
) return;
|
1542
|
1541
|
|
1543
|
1542
|
refresh_cmd_timeout();
|
1544
|
|
- inverse_kinematics(destination);
|
1545
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], destination[E_AXIS], MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
|
|
1543
|
+ planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
|
1546
|
1544
|
set_current_to_destination();
|
1547
|
1545
|
}
|
1548
|
1546
|
#endif // IS_KINEMATIC
|
|
@@ -6779,8 +6777,7 @@ inline void gcode_M503() {
|
6779
|
6777
|
|
6780
|
6778
|
// Define runplan for move axes
|
6781
|
6779
|
#if IS_KINEMATIC
|
6782
|
|
- #define RUNPLAN(RATE_MM_S) inverse_kinematics(destination); \
|
6783
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], destination[E_AXIS], RATE_MM_S, active_extruder);
|
|
6780
|
+ #define RUNPLAN(RATE_MM_S) planner.buffer_line_kinematic(destination, RATE_MM_S, active_extruder);
|
6784
|
6781
|
#else
|
6785
|
6782
|
#define RUNPLAN(RATE_MM_S) line_to_destination(RATE_MM_S);
|
6786
|
6783
|
#endif
|
|
@@ -6900,12 +6897,10 @@ inline void gcode_M503() {
|
6900
|
6897
|
planner.set_e_position_mm(current_position[E_AXIS]);
|
6901
|
6898
|
|
6902
|
6899
|
#if IS_KINEMATIC
|
6903
|
|
- // Move XYZ to starting position, then E
|
6904
|
|
- inverse_kinematics(lastpos);
|
6905
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], destination[E_AXIS], FILAMENT_CHANGE_XY_FEEDRATE, active_extruder);
|
6906
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], lastpos[E_AXIS], FILAMENT_CHANGE_XY_FEEDRATE, active_extruder);
|
|
6900
|
+ // Move XYZ to starting position
|
|
6901
|
+ planner.buffer_line_kinematic(lastpos, FILAMENT_CHANGE_XY_FEEDRATE, active_extruder);
|
6907
|
6902
|
#else
|
6908
|
|
- // Move XY to starting position, then Z, then E
|
|
6903
|
+ // Move XY to starting position, then Z
|
6909
|
6904
|
destination[X_AXIS] = lastpos[X_AXIS];
|
6910
|
6905
|
destination[Y_AXIS] = lastpos[Y_AXIS];
|
6911
|
6906
|
RUNPLAN(FILAMENT_CHANGE_XY_FEEDRATE);
|
|
@@ -8671,8 +8666,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
8671
|
8666
|
|
8672
|
8667
|
// If the move is only in Z/E don't split up the move
|
8673
|
8668
|
if (ltarget[X_AXIS] == current_position[X_AXIS] && ltarget[Y_AXIS] == current_position[Y_AXIS]) {
|
8674
|
|
- inverse_kinematics(ltarget);
|
8675
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], _feedrate_mm_s, active_extruder);
|
|
8669
|
+ planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
|
8676
|
8670
|
return true;
|
8677
|
8671
|
}
|
8678
|
8672
|
|
|
@@ -8815,16 +8809,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
8815
|
8809
|
// For non-interpolated delta calculate every segment
|
8816
|
8810
|
for (uint16_t s = segments + 1; --s;) {
|
8817
|
8811
|
DELTA_NEXT(segment_distance[i]);
|
8818
|
|
- DELTA_IK();
|
8819
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], DELTA_VAR[E_AXIS], _feedrate_mm_s, active_extruder);
|
|
8812
|
+ planner.buffer_line_kinematic(DELTA_VAR, _feedrate_mm_s, active_extruder);
|
8820
|
8813
|
}
|
8821
|
8814
|
|
8822
|
8815
|
#endif
|
8823
|
8816
|
|
8824
|
8817
|
// Since segment_distance is only approximate,
|
8825
|
8818
|
// the final move must be to the exact destination.
|
8826
|
|
- inverse_kinematics(ltarget);
|
8827
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], _feedrate_mm_s, active_extruder);
|
|
8819
|
+ planner.buffer_line_kinematic(ltarget, _feedrate_mm_s, active_extruder);
|
8828
|
8820
|
return true;
|
8829
|
8821
|
}
|
8830
|
8822
|
|
|
@@ -9064,21 +9056,11 @@ void prepare_move_to_destination() {
|
9064
|
9056
|
|
9065
|
9057
|
clamp_to_software_endstops(arc_target);
|
9066
|
9058
|
|
9067
|
|
- #if IS_KINEMATIC
|
9068
|
|
- inverse_kinematics(arc_target);
|
9069
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder);
|
9070
|
|
- #else
|
9071
|
|
- planner.buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder);
|
9072
|
|
- #endif
|
|
9059
|
+ planner.buffer_line_kinematic(arc_target, fr_mm_s, active_extruder);
|
9073
|
9060
|
}
|
9074
|
9061
|
|
9075
|
9062
|
// Ensure last segment arrives at target location.
|
9076
|
|
- #if IS_KINEMATIC
|
9077
|
|
- inverse_kinematics(logical);
|
9078
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], logical[E_AXIS], fr_mm_s, active_extruder);
|
9079
|
|
- #else
|
9080
|
|
- planner.buffer_line(logical[X_AXIS], logical[Y_AXIS], logical[Z_AXIS], logical[E_AXIS], fr_mm_s, active_extruder);
|
9081
|
|
- #endif
|
|
9063
|
+ planner.buffer_line_kinematic(logical, fr_mm_s, active_extruder);
|
9082
|
9064
|
|
9083
|
9065
|
// As far as the parser is concerned, the position is now == target. In reality the
|
9084
|
9066
|
// motion control system might still be processing the action and the real tool position
|