#169 - Set the temperature for the next object when using the project planner. Also updated the next-object code so it matches the new start/end GCode.
This commit is contained in:
parent
901eae59da
commit
e4c6f0cb22
2 changed files with 16 additions and 4 deletions
|
@ -604,6 +604,7 @@ class projectPlanner(wx.Frame):
|
||||||
action.sliceCmd = sliceRun.getSliceCommand(item.filename)
|
action.sliceCmd = sliceRun.getSliceCommand(item.filename)
|
||||||
action.centerX = item.centerX
|
action.centerX = item.centerX
|
||||||
action.centerY = item.centerY
|
action.centerY = item.centerY
|
||||||
|
action.temperature = profile.getProfileSettingFloat('print_temperature')
|
||||||
action.extruder = item.extruder
|
action.extruder = item.extruder
|
||||||
action.filename = item.filename
|
action.filename = item.filename
|
||||||
clearZ = max(clearZ, item.getMaximum().z * item.scale + 5.0)
|
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.sliceCmd = sliceRun.getSliceCommand(resultFilename + "_temp_.stl")
|
||||||
action.centerX = profile.getProfileSettingFloat('machine_center_x')
|
action.centerX = profile.getProfileSettingFloat('machine_center_x')
|
||||||
action.centerY = profile.getProfileSettingFloat('machine_center_y')
|
action.centerY = profile.getProfileSettingFloat('machine_center_y')
|
||||||
|
action.temperature = profile.getProfileSettingFloat('print_temperature')
|
||||||
action.extruder = 0
|
action.extruder = 0
|
||||||
action.filename = resultFilename + "_temp_.stl"
|
action.filename = resultFilename + "_temp_.stl"
|
||||||
action.clearZ = 0
|
action.clearZ = 0
|
||||||
|
@ -961,15 +963,20 @@ class ProjectSliceProgressWindow(wx.Frame):
|
||||||
put('machine_center_y', action.centerY - self.extruderOffset[action.extruder].y)
|
put('machine_center_y', action.centerY - self.extruderOffset[action.extruder].y)
|
||||||
put('clear_z', action.clearZ)
|
put('clear_z', action.clearZ)
|
||||||
put('extruder', action.extruder)
|
put('extruder', action.extruder)
|
||||||
|
put('print_temperature', action.temperature)
|
||||||
|
|
||||||
if action == self.actionList[0]:
|
if action == self.actionList[0]:
|
||||||
resultFile.write(';TYPE:CUSTOM\n')
|
resultFile.write(';TYPE:CUSTOM\n')
|
||||||
resultFile.write('T%d\n' % (action.extruder))
|
resultFile.write('T%d\n' % (action.extruder))
|
||||||
currentExtruder = action.extruder
|
currentExtruder = action.extruder
|
||||||
|
prevTemp = action.temperature
|
||||||
resultFile.write(profile.getAlterationFileContents('start.gcode'))
|
resultFile.write(profile.getAlterationFileContents('start.gcode'))
|
||||||
else:
|
else:
|
||||||
#reset the extrusion length, and move to the next object center.
|
#reset the extrusion length, and move to the next object center.
|
||||||
resultFile.write(';TYPE:CUSTOM\n')
|
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(profile.getAlterationFileContents('nextobject.gcode'))
|
||||||
resultFile.write(';PRINTNR:%d\n' % self.actionList.index(action))
|
resultFile.write(';PRINTNR:%d\n' % self.actionList.index(action))
|
||||||
profile.resetTempOverride()
|
profile.resetTempOverride()
|
||||||
|
|
|
@ -23,7 +23,7 @@ profileDefaultSettings = {
|
||||||
'skirt_line_count': '1',
|
'skirt_line_count': '1',
|
||||||
'skirt_gap': '3.0',
|
'skirt_gap': '3.0',
|
||||||
'print_speed': '50',
|
'print_speed': '50',
|
||||||
'print_temperature': '0',
|
'print_temperature': '230',
|
||||||
'support': 'None',
|
'support': 'None',
|
||||||
'filament_diameter': '2.89',
|
'filament_diameter': '2.89',
|
||||||
'filament_density': '1.00',
|
'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.
|
'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
|
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
|
G92 E0
|
||||||
G1 X{machine_center_x} Y{machine_center_y} F{travel_speed}
|
G1 X{machine_center_x} Y{machine_center_y} F{travel_speed}
|
||||||
G1 F200 E5.2
|
G1 F200 E5
|
||||||
G92 E0
|
G92 E0
|
||||||
G1 Z0 F{max_z_speed}
|
|
||||||
""",
|
""",
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
'switchExtruder.gcode': """;Switch between the current extruder and the next extruder, when printing with multiple extruders.
|
'switchExtruder.gcode': """;Switch between the current extruder and the next extruder, when printing with multiple extruders.
|
||||||
|
|
Loading…
Reference in a new issue