chiark / gitweb /
Change how the fan is handled on lower layers.
authordaid <daid303@gmail.com>
Mon, 28 Oct 2013 13:16:43 +0000 (14:16 +0100)
committerdaid <daid303@gmail.com>
Mon, 28 Oct 2013 13:16:43 +0000 (14:16 +0100)
Cura/gui/configWizard.py
Cura/gui/simpleMode.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index 9fa0c7ba91bdbe57747381dbcf871d78d76228a0..6e1a8f47981945f2a2333d7b37b6551c21753a12 100644 (file)
@@ -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')
index 34aad5a85deeaa0139a3e03411ae192e64517f20..4acff65793a605fd90a307d8a27c3c45062ed3d7 100644 (file)
@@ -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', '')
index 58075d888d088c50d108a95e8e75a70a0d37f9c6..c802b8ee5940ca668ce6a8f09b178bbdf45ce02a 100644 (file)
@@ -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."))
index 84dbb0f1f3536e9282d4be105b50e6e13ea9ccfb..e4532f3c44f0528a3d7c5de542b1e8fe6a81854f 100644 (file)
@@ -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: