diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-01-08 12:23:44 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-01-08 14:39:19 -0500 |
commit | f6f174ab36745224b17a7e0f306eb03a0e1cadb7 (patch) | |
tree | be610745068d77847e7f09c01a1ce9d67947424a /klippy/extruder.py | |
parent | 0cf06ee69adbcaff4a0c4e3b0e64b7c5d8d14ca4 (diff) | |
download | kutter-f6f174ab36745224b17a7e0f306eb03a0e1cadb7.tar.gz kutter-f6f174ab36745224b17a7e0f306eb03a0e1cadb7.tar.xz kutter-f6f174ab36745224b17a7e0f306eb03a0e1cadb7.zip |
extruder: Fix pressure advance on tiny moves with over extrusions
The extruder check_move() code will permit moves with huge extrusion
ratios if the amount extruded is tiny. (Some slicers emit these silly
moves - they are allowed because they are harmless.) Unfortunately,
the pressure advance code did not handle the huge extrusion ratios -
it would result in a massive, near instantaneous, extruder move in an
attempt to build pressure in the extruder. Catch this case and limit
the impact to the pressure advance code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extruder.py')
-rw-r--r-- | klippy/extruder.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/klippy/extruder.py b/klippy/extruder.py index 9403ec4f..2555d788 100644 --- a/klippy/extruder.py +++ b/klippy/extruder.py @@ -70,8 +70,11 @@ class PrinterExtruder: inv_extrude_r = 1. / abs(move.extrude_r) move.limit_speed(self.max_e_velocity * inv_extrude_r , self.max_e_accel * inv_extrude_r) - elif (move.extrude_r > self.max_extrude_ratio - and move.axes_d[3] > self.nozzle_diameter*self.max_extrude_ratio): + elif move.extrude_r > self.max_extrude_ratio: + if move.axes_d[3] <= self.nozzle_diameter * self.max_extrude_ratio: + # Permit extrusion if amount extruded is tiny + move.extrude_r = self.max_extrude_ratio + return area = move.axes_d[3] * self.filament_area / move.move_d logging.debug("Overextrude: %s vs %s (area=%.3f dist=%.3f)", move.extrude_r, self.max_extrude_ratio, |