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>
This commit is contained in:
parent
0cf06ee69a
commit
f6f174ab36
|
@ -70,8 +70,11 @@ class PrinterExtruder:
|
||||||
inv_extrude_r = 1. / abs(move.extrude_r)
|
inv_extrude_r = 1. / abs(move.extrude_r)
|
||||||
move.limit_speed(self.max_e_velocity * inv_extrude_r
|
move.limit_speed(self.max_e_velocity * inv_extrude_r
|
||||||
, self.max_e_accel * inv_extrude_r)
|
, self.max_e_accel * inv_extrude_r)
|
||||||
elif (move.extrude_r > self.max_extrude_ratio
|
elif move.extrude_r > self.max_extrude_ratio:
|
||||||
and move.axes_d[3] > self.nozzle_diameter*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
|
area = move.axes_d[3] * self.filament_area / move.move_d
|
||||||
logging.debug("Overextrude: %s vs %s (area=%.3f dist=%.3f)",
|
logging.debug("Overextrude: %s vs %s (area=%.3f dist=%.3f)",
|
||||||
move.extrude_r, self.max_extrude_ratio,
|
move.extrude_r, self.max_extrude_ratio,
|
||||||
|
|
Loading…
Reference in New Issue