|
@ -204,19 +204,19 @@ void plan_arc( |
|
|
#if ENABLED(SCARA_FEEDRATE_SCALING) |
|
|
#if ENABLED(SCARA_FEEDRATE_SCALING) |
|
|
// For SCARA scale the feed rate from mm/s to degrees/s
|
|
|
// For SCARA scale the feed rate from mm/s to degrees/s
|
|
|
// i.e., Complete the angular vector in the given time.
|
|
|
// i.e., Complete the angular vector in the given time.
|
|
|
if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder)) |
|
|
if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], raw[Z_AXIS], raw[E_AXIS], HYPOT(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT)) |
|
|
break; |
|
|
break; |
|
|
oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; |
|
|
oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; |
|
|
#elif ENABLED(DELTA_FEEDRATE_SCALING) |
|
|
#elif ENABLED(DELTA_FEEDRATE_SCALING) |
|
|
// For DELTA scale the feed rate from Effector mm/s to Carriage mm/s
|
|
|
// For DELTA scale the feed rate from Effector mm/s to Carriage mm/s
|
|
|
// i.e., Complete the linear vector in the given time.
|
|
|
// i.e., Complete the linear vector in the given time.
|
|
|
if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], SQRT(sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC)) * inverse_secs, active_extruder)) |
|
|
if (!planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], raw[E_AXIS], SQRT(sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC)) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT)) |
|
|
break; |
|
|
break; |
|
|
oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; oldC = delta[C_AXIS]; |
|
|
oldA = delta[A_AXIS]; oldB = delta[B_AXIS]; oldC = delta[C_AXIS]; |
|
|
#elif HAS_UBL_AND_CURVES |
|
|
#elif HAS_UBL_AND_CURVES |
|
|
float pos[XYZ] = { raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS] }; |
|
|
float pos[XYZ] = { raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS] }; |
|
|
planner.apply_leveling(pos); |
|
|
planner.apply_leveling(pos); |
|
|
if (!planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], raw[E_AXIS], fr_mm_s, active_extruder)) |
|
|
if (!planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], raw[E_AXIS], fr_mm_s, active_extruder, MM_PER_ARC_SEGMENT)) |
|
|
break; |
|
|
break; |
|
|
#else |
|
|
#else |
|
|
if (!planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder)) |
|
|
if (!planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder)) |
|
@ -233,15 +233,15 @@ void plan_arc( |
|
|
#if ENABLED(SCARA_FEEDRATE_SCALING) |
|
|
#if ENABLED(SCARA_FEEDRATE_SCALING) |
|
|
const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB); |
|
|
const float diff2 = HYPOT2(delta[A_AXIS] - oldA, delta[B_AXIS] - oldB); |
|
|
if (diff2) |
|
|
if (diff2) |
|
|
planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder); |
|
|
planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], cart[Z_AXIS], cart[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT); |
|
|
#elif ENABLED(DELTA_FEEDRATE_SCALING) |
|
|
#elif ENABLED(DELTA_FEEDRATE_SCALING) |
|
|
const float diff2 = sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC); |
|
|
const float diff2 = sq(delta[A_AXIS] - oldA) + sq(delta[B_AXIS] - oldB) + sq(delta[C_AXIS] - oldC); |
|
|
if (diff2) |
|
|
if (diff2) |
|
|
planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], cart[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder); |
|
|
planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], cart[E_AXIS], SQRT(diff2) * inverse_secs, active_extruder, MM_PER_ARC_SEGMENT); |
|
|
#elif HAS_UBL_AND_CURVES |
|
|
#elif HAS_UBL_AND_CURVES |
|
|
float pos[XYZ] = { cart[X_AXIS], cart[Y_AXIS], cart[Z_AXIS] }; |
|
|
float pos[XYZ] = { cart[X_AXIS], cart[Y_AXIS], cart[Z_AXIS] }; |
|
|
planner.apply_leveling(pos); |
|
|
planner.apply_leveling(pos); |
|
|
planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], cart[E_AXIS], fr_mm_s, active_extruder); |
|
|
planner.buffer_segment(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], cart[E_AXIS], fr_mm_s, active_extruder, MM_PER_ARC_SEGMENT); |
|
|
#else |
|
|
#else |
|
|
planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); |
|
|
planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder); |
|
|
#endif |
|
|
#endif |
|
|