chiark / gitweb /
Added extra fan control. Advanced setting to enabled/disable fan. And expert setting...
authordaid <daid303@gmail.com>
Mon, 2 Apr 2012 14:09:56 +0000 (16:09 +0200)
committerdaid <daid303@gmail.com>
Mon, 2 Apr 2012 14:09:56 +0000 (16:09 +0200)
Cura/alterations/start.gcode
Cura/cura_sf/fabmetheus_utilities/settings.py
Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py
Cura/gui/advancedConfig.py
Cura/gui/alterationPanel.py
Cura/gui/mainWindow.py
Cura/gui/simpleMode.py
Cura/util/profile.py

index 4f1222a50c8fb82de3e2551583b6bc71631b8f80..7db5699cfdabe3341ad31ef5dde264282040e869 100644 (file)
@@ -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
index f89fa870c3e927ca599e52812f587a4253c66a71..aeb64c154cf876821be8dc0e1db2314c29dabd03 100644 (file)
@@ -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,
index d78f194c06dfc563719e5a0e695fadfc492af712..5a4f54916e4f3ee4f565cea450c6b103752c6d01 100644 (file)
@@ -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 == '(<edgeWidth>':
                                self.edgeWidth = float(splitLine[1])
-                               if self.repository.turnFanOnAtBeginning.value:
-                                       self.distanceFeedRate.addLine('M106')
                        elif firstWord == '(</extruderInitialization>)':
                                self.distanceFeedRate.addTagBracketedProcedure('cool')
                                return
@@ -371,6 +371,8 @@ class CoolSkein:
                elif firstWord == '(<layer>':
                        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)
index 4f9a0c9b82bc9b7486c3e5897c9d43c29bddec7a..99c841f81543c9c5b58bda170d65c2765ab0ac64 100644 (file)
@@ -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()
 
index c47b7c8a275f0b80dd2df79fc1c009819a2b03e9..2692b7fad390b810c475c67f3ea2febf6fb89558 100644 (file)
@@ -7,7 +7,7 @@ class alterationPanel(wx.Panel):
        def __init__(self, parent):\r
                wx.Panel.__init__(self, parent,-1)\r
 \r
-               self.alterationFileList = ['start.gcode', 'end.gcode', 'cool_start.gcode', 'cool_end.gcode', 'replace.csv']\r
+               self.alterationFileList = ['start.gcode', 'end.gcode', 'support_start.gcode', 'support_end.gcode', 'replace.csv']\r
                self.currentFile = None\r
 \r
                self.textArea = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_DONTWRAP|wx.TE_PROCESS_TAB)\r
index 89947627428cdbd2ac8a5fae85c450af0bda7226..20a00324ea212687caeec965fbd2037ab00a5dbb 100644 (file)
@@ -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()
+
index 40a3d0ead98c82ef496d69ca6ded7bb5ce4934ac..13954fd10b1841e9387c7fff58458f981f01d8a8 100644 (file)
@@ -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)
index 8ab00bd32ca21b22ca68543396f66af4586ecfbb..2548ec8141614d7628e196f89dda0cf0060b7d6f 100644 (file)
@@ -35,6 +35,9 @@ profileDefaultSettings = {
        'max_z_speed': '1.0',\r
        'bottom_layer_speed': '25',\r
        'cool_min_layer_time': '10',\r
+       'fan_enabled': 'True',\r
+       'fan_layer': '0',\r
+       'fan_speed': '100',\r
        'model_scale': '1.0',\r
        'flip_x': 'False',\r
        'flip_y': 'False',\r