|
@@ -294,11 +294,12 @@ void plan_arc(
|
294
|
294
|
// An arc can always complete within limits from a speed which...
|
295
|
295
|
// a) is <= any configured maximum speed,
|
296
|
296
|
// b) does not require centripetal force greater than any configured maximum acceleration,
|
297
|
|
- // c) allows the print head to stop in the remining length of the curve within all configured maximum accelerations.
|
|
297
|
+ // c) is <= nominal speed,
|
|
298
|
+ // d) allows the print head to stop in the remining length of the curve within all configured maximum accelerations.
|
298
|
299
|
// The last has to be calculated every time through the loop.
|
299
|
300
|
const float limiting_accel = _MIN(planner.settings.max_acceleration_mm_per_s2[axis_p], planner.settings.max_acceleration_mm_per_s2[axis_q]),
|
300
|
301
|
limiting_speed = _MIN(planner.settings.max_feedrate_mm_s[axis_p], planner.settings.max_acceleration_mm_per_s2[axis_q]),
|
301
|
|
- limiting_speed_sqr = _MIN(sq(limiting_speed), limiting_accel * radius);
|
|
302
|
+ limiting_speed_sqr = _MIN(sq(limiting_speed), limiting_accel * radius, sq(scaled_fr_mm_s));
|
302
|
303
|
float arc_mm_remaining = flat_mm;
|
303
|
304
|
|
304
|
305
|
for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times
|
|
@@ -357,12 +358,12 @@ void plan_arc(
|
357
|
358
|
|
358
|
359
|
// calculate safe speed for stopping by the end of the arc
|
359
|
360
|
arc_mm_remaining -= segment_mm;
|
360
|
|
-
|
361
|
|
- hints.curve_radius = i > 1 ? radius : 0;
|
362
|
361
|
hints.safe_exit_speed_sqr = _MIN(limiting_speed_sqr, 2 * limiting_accel * arc_mm_remaining);
|
363
|
362
|
|
364
|
363
|
if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, hints))
|
365
|
364
|
break;
|
|
365
|
+
|
|
366
|
+ hints.curve_radius = radius;
|
366
|
367
|
}
|
367
|
368
|
}
|
368
|
369
|
|
|
@@ -383,6 +384,7 @@ void plan_arc(
|
383
|
384
|
#endif
|
384
|
385
|
|
385
|
386
|
hints.curve_radius = 0;
|
|
387
|
+ hints.safe_exit_speed_sqr = 0.0f;
|
386
|
388
|
planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, hints);
|
387
|
389
|
|
388
|
390
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|