extruder: Don't use max_extrude_cross_section in max_extrude_only defaults

Some users increase max_extrude_cross_section to avoid issues with
some slicers.  However, increasing that value also increases the
defaults for the max_extrude_only parameters which is not obvious.
Base the max_extrude_only defaults only on the configured nozzle
diameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-10-25 18:59:01 -04:00
parent ed13c5733d
commit 97590b8e0b
2 changed files with 6 additions and 5 deletions

View File

@ -120,7 +120,7 @@ filament_diameter: 3.500
# extruder motor for retractions and extrude-only moves. These # extruder motor for retractions and extrude-only moves. These
# settings do not place any limit on normal printing moves. If not # settings do not place any limit on normal printing moves. If not
# specified then they are calculated to match the limit an XY # specified then they are calculated to match the limit an XY
# printing move with a max_extrude_cross_section extrusion would # printing move with a cross section of 4.0*nozzle_diameter^2 would
# have. # have.
#pressure_advance: 0.0 #pressure_advance: 0.0
# The amount of raw filament to push into the extruder during # The amount of raw filament to push into the extruder during

View File

@ -23,18 +23,19 @@ class PrinterExtruder:
filament_diameter = config.getfloat( filament_diameter = config.getfloat(
'filament_diameter', minval=self.nozzle_diameter) 'filament_diameter', minval=self.nozzle_diameter)
self.filament_area = math.pi * (filament_diameter * .5)**2 self.filament_area = math.pi * (filament_diameter * .5)**2
def_max_cross_section = 4. * self.nozzle_diameter**2
def_max_extrude_ratio = def_max_cross_section / self.filament_area
max_cross_section = config.getfloat( max_cross_section = config.getfloat(
'max_extrude_cross_section', 4. * self.nozzle_diameter**2 'max_extrude_cross_section', def_max_cross_section, above=0.)
, above=0.)
self.max_extrude_ratio = max_cross_section / self.filament_area self.max_extrude_ratio = max_cross_section / self.filament_area
logging.info("Extruder max_extrude_ratio=%.6f", self.max_extrude_ratio) logging.info("Extruder max_extrude_ratio=%.6f", self.max_extrude_ratio)
toolhead = self.printer.lookup_object('toolhead') toolhead = self.printer.lookup_object('toolhead')
max_velocity, max_accel = toolhead.get_max_velocity() max_velocity, max_accel = toolhead.get_max_velocity()
self.max_e_velocity = config.getfloat( self.max_e_velocity = config.getfloat(
'max_extrude_only_velocity', max_velocity * self.max_extrude_ratio 'max_extrude_only_velocity', max_velocity * def_max_extrude_ratio
, above=0.) , above=0.)
self.max_e_accel = config.getfloat( self.max_e_accel = config.getfloat(
'max_extrude_only_accel', max_accel * self.max_extrude_ratio 'max_extrude_only_accel', max_accel * def_max_extrude_ratio
, above=0.) , above=0.)
self.stepper.set_max_jerk(9999999.9, 9999999.9) self.stepper.set_max_jerk(9999999.9, 9999999.9)
self.max_e_dist = config.getfloat( self.max_e_dist = config.getfloat(