From: daid Date: Mon, 2 Apr 2012 14:09:56 +0000 (+0200) Subject: Added extra fan control. Advanced setting to enabled/disable fan. And expert setting... X-Git-Tag: RC1~10^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7ec27fec920646020ff26f37fe0c9f2b6df75db3;p=cura.git Added extra fan control. Advanced setting to enabled/disable fan. And expert setting to set the fan start layer and fan speed. --- diff --git a/Cura/alterations/start.gcode b/Cura/alterations/start.gcode index 4f1222a5..7db5699c 100644 --- a/Cura/alterations/start.gcode +++ b/Cura/alterations/start.gcode @@ -4,8 +4,6 @@ G90 ;absolute positioning G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops -M106 ;turn on fan - ; if your prints start too high, try changing the Z0.0 below ; to Z1.0 - the number after the Z is the actual, physical ; height of the nozzle in mm. This can take some messing around diff --git a/Cura/cura_sf/fabmetheus_utilities/settings.py b/Cura/cura_sf/fabmetheus_utilities/settings.py index f89fa870..aeb64c15 100644 --- a/Cura/cura_sf/fabmetheus_utilities/settings.py +++ b/Cura/cura_sf/fabmetheus_utilities/settings.py @@ -265,9 +265,11 @@ def getProfileInformation(): 'Name_of_Cool_End_File': DEFSET, 'Name_of_Cool_Start_File': DEFSET, 'Orbital_Outset_millimeters': DEFSET, - 'Turn_Fan_On_at_Beginning': "False", + 'Turn_Fan_On_at_Beginning': storedSetting("fan_enabled"), 'Turn_Fan_Off_at_Ending': "False", 'Minimum_feed_rate_mm/s': storedSetting("cool_min_feedrate"), + 'Fan_on_at_layer': storedSetting('fan_layer'), + 'Fan_speed_%': storedSetting('fan_speed'), },'hop': { 'Activate_Hop': "False", 'Hop_Over_Layer_Thickness_ratio': DEFSET, diff --git a/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py index d78f194c..5a4f5491 100644 --- a/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py +++ b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py @@ -163,6 +163,8 @@ class CoolRepository: self.executeTitle = 'Cool' self.minimumFeedRate = settings.FloatSpin().getFromValue(0.0, 'Minimum feed rate (mm/s):', self, 10.0, 5.0) + self.fanTurnOnLayerNr = settings.IntSpin().getFromValue(0, 'Fan on at layer:', self, 100, 0) + self.fanSpeed = settings.IntSpin().getFromValue(0, 'Fan speed (%):', self, 100, 100) def execute(self): 'Cool button has been clicked.' @@ -333,8 +335,6 @@ class CoolSkein: self.oldFlowRate = float(splitLine[1][1 :]) elif firstWord == '(': self.edgeWidth = float(splitLine[1]) - if self.repository.turnFanOnAtBeginning.value: - self.distanceFeedRate.addLine('M106') elif firstWord == '()': self.distanceFeedRate.addTagBracketedProcedure('cool') return @@ -371,6 +371,8 @@ class CoolSkein: elif firstWord == '(': self.layerCount.printProgressIncrement('cool') self.distanceFeedRate.addLine(line) + if self.repository.turnFanOnAtBeginning.value and self.repository.fanTurnOnLayerNr.value == self.layerCount.layerIndex: + self.distanceFeedRate.addLine('M106 S%d' % (self.repository.fanSpeed.value * 255 / 100)) self.distanceFeedRate.addLinesSetAbsoluteDistanceMode(self.coolStartLines) layerTime = self.getLayerTime() remainingOrbitTime = max(self.repository.minimumLayerTime.value - layerTime, 0.0) diff --git a/Cura/gui/advancedConfig.py b/Cura/gui/advancedConfig.py index 4f9a0c9b..99c841f8 100644 --- a/Cura/gui/advancedConfig.py +++ b/Cura/gui/advancedConfig.py @@ -23,16 +23,13 @@ class advancedConfigWindow(configBase.configWindowBase): c = configBase.SettingRow(left, "Extra Wall thickness for bottom/top (mm)", 'extra_base_wall_thickness', '0.0', 'Additional wall thickness of the bottom and top layers.') validators.validFloat(c, 0.0) - configBase.TitleRow(left, "Sequence") - c = configBase.SettingRow(left, "Print order sequence", 'sequence', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'Sequence of printing. The perimeter is the outer print edge, the loops are the insides of the walls, and the infill is the insides.'); - c = configBase.SettingRow(left, "Force first layer sequence", 'force_first_layer_sequence', True, 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'') - configBase.TitleRow(left, "Cool") c = configBase.SettingRow(left, "Minimum feedrate (mm/s)", 'cool_min_feedrate', '5', '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 then this minimal feedrate.') validators.validFloat(c, 0.0) - - configBase.TitleRow(left, "Joris") - c = configBase.SettingRow(left, "Joris the outer edge", 'joris', False, '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.') + c = configBase.SettingRow(left, "Fan on layer number", 'fan_layer', '0', 'The layer at which the fan is turned on. The first layer is layer 0.') + validators.validInt(c, 0) + c = configBase.SettingRow(left, "Fan speed (%)", 'fan_speed', '100', 'When the fan is turned on, it is enabled at this speed setting.') + validators.validInt(c, 0, 100) configBase.TitleRow(left, "Raft (if enabled)") c = configBase.SettingRow(left, "Raft extra margin (mm)", 'raft_margin', '3.0', 'If the raft is enabled, this is the extra raft area around the object which is also rafted. Increasing this margin will create a stronger raft.') @@ -42,24 +39,31 @@ class advancedConfigWindow(configBase.configWindowBase): c = configBase.SettingRow(left, "Raft interface material amount (%)", 'raft_interface_material_amount', '100', 'The interface layer is a weak thin layer between the base layer and the printed object. It is designed to has little material to make it easy to break the base off the printed object. This setting adjusts the amount of material used for the interface layer.') validators.validFloat(c, 0.0) + configBase.TitleRow(left, "Support") + c = configBase.SettingRow(left, "Support material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.') + validators.validFloat(c, 0.0) + c = configBase.SettingRow(left, "Support distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object.') + validators.validFloat(c, 0.0) + configBase.TitleRow(right, "Infill") c = configBase.SettingRow(right, "Infill pattern", 'infill_type', ['Line', 'Grid Circular', 'Grid Hexagonal', 'Grid Rectangular'], 'Pattern of the none-solid infill. Line is default, but grids can provide a strong print.') c = configBase.SettingRow(right, "Solid infill top", 'solid_top', True, 'Create a solid top surface, if set to false the top is filled with the fill percentage. Useful for cups/vases.') c = configBase.SettingRow(right, "Infill overlap (%)", 'fill_overlap', '15', 'Amount of overlap between the infill and the walls. There is a slight overlap with the walls and the infill so the walls connect firmly to the infill.') validators.validFloat(c, 0.0) - configBase.TitleRow(right, "Support") - c = configBase.SettingRow(right, "Support material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.') - validators.validFloat(c, 0.0) - c = configBase.SettingRow(right, "Support distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object.') - validators.validFloat(c, 0.0) - configBase.TitleRow(right, "Bridge") c = configBase.SettingRow(right, "Bridge speed (%)", 'bridge_speed', '100', 'Speed at which bridges are printed, compared to normal printing speed.') validators.validFloat(c, 0.0) c = configBase.SettingRow(right, "Bridge material (%)", 'bridge_material_amount', '100', 'Amount of material used for bridges, increase go extrude more material when printing a bridge.') validators.validFloat(c, 0.0) + configBase.TitleRow(right, "Sequence") + c = configBase.SettingRow(right, "Print order sequence", 'sequence', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'Sequence of printing. The perimeter is the outer print edge, the loops are the insides of the walls, and the infill is the insides.'); + c = configBase.SettingRow(right, "Force first layer sequence", 'force_first_layer_sequence', True, 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'') + + configBase.TitleRow(right, "Joris") + c = configBase.SettingRow(right, "Joris the outer edge", 'joris', False, '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.') + main.Fit() self.Fit() diff --git a/Cura/gui/alterationPanel.py b/Cura/gui/alterationPanel.py index c47b7c8a..2692b7fa 100644 --- a/Cura/gui/alterationPanel.py +++ b/Cura/gui/alterationPanel.py @@ -7,7 +7,7 @@ class alterationPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent,-1) - self.alterationFileList = ['start.gcode', 'end.gcode', 'cool_start.gcode', 'cool_end.gcode', 'replace.csv'] + self.alterationFileList = ['start.gcode', 'end.gcode', 'support_start.gcode', 'support_end.gcode', 'replace.csv'] self.currentFile = None self.textArea = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_DONTWRAP|wx.TE_PROCESS_TAB) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 89947627..20a00324 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -35,6 +35,7 @@ class mainWindow(configBase.configWindowBase): def __init__(self): super(mainWindow, self).__init__(title='Cura') + wx.EVT_CLOSE(self, self.OnClose) self.SetIcon(icon.getMainIcon()) menubar = wx.MenuBar() @@ -168,6 +169,7 @@ class mainWindow(configBase.configWindowBase): configBase.TitleRow(right, "Cool") c = configBase.SettingRow(right, "Minimal layer time (sec)", 'cool_min_layer_time', '10', 'Minimum time spend in a layer, gives the layer time to cool down before the next layer is put on top. If the layer will be placed down too fast the printer will slow down to make sure it has spend atleast this amount of seconds printing this layer.') validators.validFloat(c, 0.0) + c = configBase.SettingRow(right, "Enable cooling fan", 'fan_enabled', True, 'Enable the cooling fan during the print. The extra cooling from the cooling fan is essensial during faster prints.') nb.AddPage(alterationPanel.alterationPanel(nb), "Start/End-GCode") @@ -310,3 +312,4 @@ class mainWindow(configBase.configWindowBase): def OnClose(self, e): profile.saveGlobalProfile(profile.getDefaultProfilePath()) self.Destroy() + diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 40a3d0ea..13954fd1 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -189,6 +189,9 @@ class simpleModeWindow(configBase.configWindowBase): put('max_z_speed', '1.0') put('bottom_layer_speed', '25') put('cool_min_layer_time', '10') + put('fan_enabled', 'True') + put('fan_layer', '0') + put('fan_speed', '100') #put('model_scale', '1.0') #put('flip_x', 'False') #put('flip_y', 'False') @@ -251,6 +254,7 @@ class simpleModeWindow(configBase.configWindowBase): put('filament_density', '0.85') put('enable_raft', 'True') put('skirt_line_count', '0') + put('fan_layer', '1') #Create a progress panel and add it to the window. The progress panel will start the Skein operation. spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filename) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 8ab00bd3..2548ec81 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -35,6 +35,9 @@ profileDefaultSettings = { 'max_z_speed': '1.0', 'bottom_layer_speed': '25', 'cool_min_layer_time': '10', + 'fan_enabled': 'True', + 'fan_layer': '0', + 'fan_speed': '100', 'model_scale': '1.0', 'flip_x': 'False', 'flip_y': 'False',