aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index d6b36cc9..bf6ff76a 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -60,10 +60,15 @@ class Move:
junction_cos_theta = max(junction_cos_theta, -0.999999)
sin_theta_d2 = math.sqrt(0.5*(1.0-junction_cos_theta))
R = self.toolhead.junction_deviation * sin_theta_d2 / (1. - sin_theta_d2)
+ tan_theta_d2 = sin_theta_d2 / math.sqrt(0.5*(1.0+junction_cos_theta))
+ move_centripetal_v2 = .5 * self.move_d * tan_theta_d2 * self.accel
+ prev_move_centripetal_v2 = (.5 * prev_move.move_d * tan_theta_d2
+ * prev_move.accel)
self.max_start_v2 = min(
- R * self.accel, R * prev_move.accel, extruder_v2
- , self.max_cruise_v2, prev_move.max_cruise_v2
- , prev_move.max_start_v2 + prev_move.delta_v2)
+ R * self.accel, R * prev_move.accel,
+ move_centripetal_v2, prev_move_centripetal_v2,
+ extruder_v2, self.max_cruise_v2, prev_move.max_cruise_v2,
+ prev_move.max_start_v2 + prev_move.delta_v2)
self.max_smoothed_v2 = min(
self.max_start_v2
, prev_move.max_smoothed_v2 + prev_move.smooth_delta_v2)