From afd1058af6e80642412d1aadc18f82b099b5ab07 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 11 Oct 2021 11:53:00 -0400 Subject: [PATCH] delta: Don't limit XY+Z moves to max_z_velocity Scale the max_z_velocity limit by the amount of movement in the Z. This should improve bed_mesh and vase mode prints on delta printers. Reported by @hywelmartin and @dalegaard. Signed-off-by: Kevin O'Connor --- klippy/kinematics/delta.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py index d5860669..57d3db1f 100644 --- a/klippy/kinematics/delta.py +++ b/klippy/kinematics/delta.py @@ -129,7 +129,8 @@ class DeltaKinematics: raise move.move_error() limit_xy2 = -1. if move.axes_d[2]: - move.limit_speed(self.max_z_velocity, move.accel) + z_ratio = move.move_d / abs(move.axes_d[2]) + move.limit_speed(self.max_z_velocity * z_ratio, move.accel) limit_xy2 = -1. # Limit the speed/accel of this move if is is at the extreme # end of the build envelope @@ -138,10 +139,7 @@ class DeltaKinematics: r = 0.5 if extreme_xy2 > self.very_slow_xy2: r = 0.25 - max_velocity = self.max_velocity - if move.axes_d[2]: - max_velocity = self.max_z_velocity - move.limit_speed(max_velocity * r, self.max_accel * r) + move.limit_speed(self.max_velocity * r, self.max_accel * r) limit_xy2 = -1. self.limit_xy2 = min(limit_xy2, self.slow_xy2) def get_status(self, eventtime):