chiark / gitweb /
#169 - Set the temperature for the next object when using the project planner. Also...
authordaid <daid303@gmail.com>
Thu, 19 Jul 2012 13:30:06 +0000 (15:30 +0200)
committerdaid <daid303@gmail.com>
Thu, 19 Jul 2012 13:30:06 +0000 (15:30 +0200)
Cura/gui/projectPlanner.py
Cura/util/profile.py

index 0e040d50b08d6a6efc3155abf6bc01aa90c146f7..951037bd5af2810649a6fff2cbb99d674449358c 100644 (file)
@@ -604,6 +604,7 @@ class projectPlanner(wx.Frame):
                                action.sliceCmd = sliceRun.getSliceCommand(item.filename)\r
                                action.centerX = item.centerX\r
                                action.centerY = item.centerY\r
+                               action.temperature = profile.getProfileSettingFloat('print_temperature')\r
                                action.extruder = item.extruder\r
                                action.filename = item.filename\r
                                clearZ = max(clearZ, item.getMaximum().z * item.scale + 5.0)\r
@@ -634,6 +635,7 @@ class projectPlanner(wx.Frame):
                        action.sliceCmd = sliceRun.getSliceCommand(resultFilename + "_temp_.stl")\r
                        action.centerX = profile.getProfileSettingFloat('machine_center_x')\r
                        action.centerY = profile.getProfileSettingFloat('machine_center_y')\r
+                       action.temperature = profile.getProfileSettingFloat('print_temperature')\r
                        action.extruder = 0\r
                        action.filename = resultFilename + "_temp_.stl"\r
                        action.clearZ = 0\r
@@ -961,15 +963,20 @@ class ProjectSliceProgressWindow(wx.Frame):
                        put('machine_center_y', action.centerY - self.extruderOffset[action.extruder].y)\r
                        put('clear_z', action.clearZ)\r
                        put('extruder', action.extruder)\r
+                       put('print_temperature', action.temperature)\r
                        \r
                        if action == self.actionList[0]:\r
                                resultFile.write(';TYPE:CUSTOM\n')\r
                                resultFile.write('T%d\n' % (action.extruder))\r
                                currentExtruder = action.extruder\r
+                               prevTemp = action.temperature\r
                                resultFile.write(profile.getAlterationFileContents('start.gcode'))\r
                        else:\r
                                #reset the extrusion length, and move to the next object center.\r
                                resultFile.write(';TYPE:CUSTOM\n')\r
+                               if prevTemp != action.temperature:\r
+                                       resultFile.write('M104 S%d\n' % (int(action.temperature)))\r
+                                       prevTemp = action.temperature\r
                                resultFile.write(profile.getAlterationFileContents('nextobject.gcode'))\r
                        resultFile.write(';PRINTNR:%d\n' % self.actionList.index(action))\r
                        profile.resetTempOverride()\r
index b93e2e711443f3e367e06949383f922894f24e63..3925bdf0d2e0efb689b2c077fac3c1dc7042f4f2 100644 (file)
@@ -23,7 +23,7 @@ profileDefaultSettings = {
        'skirt_line_count': '1',\r
        'skirt_gap': '3.0',\r
        'print_speed': '50',\r
-       'print_temperature': '0',\r
+       'print_temperature': '230',\r
        'support': 'None',\r
        'filament_diameter': '2.89',\r
        'filament_density': '1.00',\r
@@ -126,12 +126,17 @@ G90                         ;absolute positioning
 #######################################################################################\r
        'nextobject.gcode': """;Move to next object on the platform. clear_z is the minimal z height we need to make sure we do not hit any objects.\r
 G92 E0\r
-G1 Z{clear_z} E-5 F{max_z_speed}\r
+\r
+G91                                    ;relative positioning\r
+G1 E-1 F300                            ;retract the filament a bit before lifting the nozzle, to release some of the pressure\r
+G1 Z+0.5 E-5 F{travel_speed}           ;move Z up a bit and retract filament even more\r
+G90                                    ;absolute positioning\r
+\r
+G1 Z{clear_z} F{max_z_speed}\r
 G92 E0\r
 G1 X{machine_center_x} Y{machine_center_y} F{travel_speed}\r
-G1 F200 E5.2\r
+G1 F200 E5\r
 G92 E0\r
-G1 Z0 F{max_z_speed}\r
 """,\r
 #######################################################################################\r
        'switchExtruder.gcode': """;Switch between the current extruder and the next extruder, when printing with multiple extruders.\r