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