chiark / gitweb /
Add min/max fan speed. Fix engine crash when wall thickness of zero.
authordaid303 <daid303@gmail.com>
Mon, 13 May 2013 12:37:39 +0000 (14:37 +0200)
committerdaid303 <daid303@gmail.com>
Mon, 13 May 2013 12:37:39 +0000 (14:37 +0200)
Cura/util/profile.py
Cura/util/sliceEngine.py

index f0d14eee33eb0a13ff1d5f607544e9941148a5e1..653ae5c20748d468df133ae4675dfdb8b08f9ced 100644 (file)
@@ -148,8 +148,8 @@ setting('cool_min_layer_time',         5, float, 'advanced', 'Cool').setRange(0)
 #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_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('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.')
 setting('cool_head_lift',           True, bool,  'expert',   'Cool').setLabel('Cool head lift', 'Lift the head if the minimal speed is hit because of cool slowdown, and wait the extra time so the minimal layer time is always hit.')
 #setting('extra_base_wall_thickness', 0.0, float, 'expert',   'Accuracy').setRange(0).setLabel('Extra Wall thickness for bottom/top (mm)', 'Additional wall thickness of the bottom and top layers.')
@@ -550,7 +550,9 @@ def resetTempOverride():
 def calculateEdgeWidth():
        wallThickness = getProfileSettingFloat('wall_thickness')
        nozzleSize = getProfileSettingFloat('nozzle_size')
-       
+
+       if wallThickness < 0.01:
+               return nozzleSize
        if wallThickness < nozzleSize:
                return wallThickness
 
index ee4c3de7480bcd593ca99b294faa6be0f4d76c55..7d2509289e2188d4b9a5d3a99b94429358631afd 100644 (file)
@@ -203,6 +203,8 @@ class Slicer(object):
                        'printSpeed': int(profile.getProfileSettingFloat('print_speed')),
                        'moveSpeed': int(profile.getProfileSettingFloat('travel_speed')),
                        'fanOnLayerNr': int(profile.getProfileSettingFloat('fan_layer')),
+                       'fanSpeedMin': int(profile.getProfileSettingFloat('fan_speed')),
+                       'fanSpeedMax': int(profile.getProfileSettingFloat('fan_speed_max')),
                        'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(60),
                        'supportEverywhere': int(1) if profile.getProfileSetting('support') == 'Everywhere' else int(0),
                        'retractionAmount': int(profile.getProfileSettingFloat('retraction_amount') * 1000),
@@ -235,7 +237,7 @@ class Slicer(object):
                else:
                        settings['skirtDistance'] = int(profile.getProfileSettingFloat('skirt_gap') * 1000)
                        settings['skirtLineCount'] = int(profile.getProfileSettingFloat('skirt_line_count'))
-               if settings['layerThickness'] <= 0.0:
+               if settings['layerThickness'] <= 0:
                        settings['layerThickness'] = 1000
                return settings