From: daid Date: Mon, 28 Oct 2013 13:16:43 +0000 (+0100) Subject: Change how the fan is handled on lower layers. X-Git-Tag: 13.11.2~37 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c534266ea4f8bc37358d14b6c45f42c7cbc629b1;p=cura.git Change how the fan is handled on lower layers. --- diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index 9fa0c7ba..6e1a8f47 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -345,12 +345,13 @@ class MachineSelectPage(InfoPage): profile.putMachineSetting('machine_center_is_zero', 'False') profile.putMachineSetting('has_heated_bed', 'True') profile.putMachineSetting('gcode_flavor', 'UltiGCode') - profile.putProfileSetting('nozzle_size', '0.4') profile.putMachineSetting('extruder_head_size_min_x', '40.0') profile.putMachineSetting('extruder_head_size_min_y', '10.0') profile.putMachineSetting('extruder_head_size_max_x', '60.0') profile.putMachineSetting('extruder_head_size_max_y', '30.0') profile.putMachineSetting('extruder_head_size_height', '60.0') + profile.putProfileSetting('nozzle_size', '0.4') + profile.putProfileSetting('fan_full_height', '5.0') elif self.UltimakerRadio.GetValue(): profile.putMachineSetting('machine_width', '205') profile.putMachineSetting('machine_depth', '205') diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 34aad5a8..4acff657 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -96,7 +96,6 @@ class simpleModePanel(wx.Panel): put('bottom_layer_speed', '25') put('cool_min_layer_time', '5') put('fan_enabled', 'True') - put('fan_layer', '1') put('fan_speed', '100') put('extra_base_wall_thickness', '0.0') put('sequence', 'Loops > Perimeter > Infill') @@ -156,7 +155,6 @@ class simpleModePanel(wx.Panel): put('filament_density', '0.85') put('enable_raft', 'True') put('skirt_line_count', '0') - put('fan_layer', '1') put('bottom_thickness', '0.0') put('print_temperature', '245') put('plugin_config', '') diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 58075d88..c802b8ee 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -191,7 +191,7 @@ setting('skirt_gap', 3.0, float, 'expert', 'Skirt').setRange(0). setting('skirt_minimal_length', 150.0, float, 'expert', 'Skirt').setRange(0).setLabel(_("Minimal length (mm)"), _("The minimal length of the skirt, if this minimal length is not reached it will add more skirt lines to reach this minimal lenght.\nNote: If the line count is set to 0 this is ignored.")) #setting('max_z_speed', 3.0, float, 'expert', _('Speed')).setRange(0.1).setLabel(_("Max Z speed (mm/s)"), _("Speed at which Z moves are done. When you Z axis is properly lubricated you can increase this for less Z blob.")) #setting('retract_on_jumps_only', True, bool, 'expert', _('Retraction')).setLabel(_('Retract on jumps only'), _('Only retract when we are making a move that is over a hole in the model, else retract on every move. This effects print quality in different ways.')) -setting('fan_layer', 1, int, 'expert', _('Cool')).setRange(0).setLabel(_("Fan on layer number"), _("The layer at which the fan is turned on. The first layer is layer 0. The first layer can stick better if you turn on the fan on, on the 2nd layer.")) +setting('fan_full_height', 0.5, float, 'expert', _('Cool')).setRange(0).setLabel(_("Fan full on at height"), _("The height at which the fan is turned on completely. For the layers below this the fan speed is scaled linear with the fan off at layer 0.")) setting('fan_speed', 100, int, 'expert', _('Cool')).setRange(0,100).setLabel(_("Fan speed min (%)"), _("When the fan is turned on, it is enabled at this speed setting. If cool slows down the layer, the fan is adjusted between the min and max speed. Minimal fan speed is used if the layer is not slowed down due to cooling.")) setting('fan_speed_max', 100, int, 'expert', _('Cool')).setRange(0,100).setLabel(_("Fan speed max (%)"), _("When the fan is turned on, it is enabled at this speed setting. If cool slows down the layer, the fan is adjusted between the min and max speed. Maximal fan speed is used if the layer is slowed down due to cooling by more than 200%.")) setting('cool_min_feedrate', 10, float, 'expert', _('Cool')).setRange(0).setLabel(_("Minimum speed (mm/s)"), _("The minimal layer time can cause the print to slow down so much it starts to ooze. The minimal feedrate protects against this. Even if a print gets slown down it will never be slower than this minimal speed.")) diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 84dbb0f1..e4532f3c 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -251,7 +251,6 @@ class Slicer(object): 'printSpeed': int(profile.getProfileSettingFloat('print_speed')), 'infillSpeed': int(profile.getProfileSettingFloat('infill_speed')) if int(profile.getProfileSettingFloat('infill_speed')) > 0 else int(profile.getProfileSettingFloat('print_speed')), 'moveSpeed': int(profile.getProfileSettingFloat('travel_speed')), - 'fanOnLayerNr': int(profile.getProfileSettingFloat('fan_layer')), 'fanSpeedMin': int(profile.getProfileSettingFloat('fan_speed')) if profile.getProfileSetting('fan_enabled') == 'True' else 0, 'fanSpeedMax': int(profile.getProfileSettingFloat('fan_speed_max')) if profile.getProfileSetting('fan_enabled') == 'True' else 0, 'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(60), @@ -282,6 +281,11 @@ class Slicer(object): 'extruderOffset[3].Y': int(profile.getMachineSettingFloat('extruder_offset_y3') * 1000), 'fixHorrible': 0, } + fanFullHeight = int(profile.getProfileSettingFloat('fan_full_height') * 1000) + settings['fanFullOnLayerNr'] = (fanFullHeight - settings['initialLayerThickness']) / settings['layerThickness'] + 1 + if settings['fanFullOnLayerNr'] < 0: + settings['fanFullOnLayerNr'] = 0 + if profile.getProfileSettingFloat('fill_density') == 0: settings['sparseInfillLineDistance'] = -1 elif profile.getProfileSettingFloat('fill_density') == 100: