From: daid303 Date: Mon, 13 May 2013 12:37:39 +0000 (+0200) Subject: Add min/max fan speed. Fix engine crash when wall thickness of zero. X-Git-Tag: 13.05~17 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8a4ea1c431099f920746c72e4295aaffac77c09f;p=cura.git Add min/max fan speed. Fix engine crash when wall thickness of zero. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index f0d14eee..653ae5c2 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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 diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index ee4c3de7..7d250928 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -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