Add support for heated bed temperature setting.

master
daid 2012-08-03 11:10:28 +02:00
parent 13ef963e46
commit 3b1ed65d81
3 changed files with 15 additions and 0 deletions

View File

@ -144,6 +144,9 @@ class mainWindow(configBase.configWindowBase):
c = configBase.SettingRow(right, "Printing temperature", 'print_temperature', '0', 'Temperature used for printing. Set at 0 to pre-heat yourself')
validators.validFloat(c, 0.0, 340.0)
validators.warningAbove(c, 260.0, "Temperatures above 260C could damage your machine, be careful!")
if profile.getPreference('has_heated_bed') == 'True':
c = configBase.SettingRow(right, "Bed temperature", 'print_bed_temperature', '0', 'Temperature used for the heated printer bed. Set at 0 to pre-heat yourself')
validators.validFloat(c, 0.0, 340.0)
configBase.TitleRow(right, "Support")
c = configBase.SettingRow(right, "Support type", 'support', ['None', 'Exterior Only', 'Everywhere', 'Empty Layers Only'], 'Type of support structure build.\n"Exterior only" is the most commonly used support setting.\n\nNone does not do any support.\nExterior only only creates support on the outside.\nEverywhere creates support even on the insides of the model.\nOnly on empty layers is for stacked objects.')

View File

@ -29,6 +29,7 @@ class preferencesDialog(configBase.configWindowBase):
c = configBase.SettingRow(left, 'Machine height (mm)', 'machine_height', '200', 'Size of the machine in mm', type = 'preference')
validators.validFloat(c, 10.0)
c = configBase.SettingRow(left, 'Extruder count', 'extruder_amount', ['1', '2', '3', '4'], 'Amount of extruders in your machine.', type = 'preference')
c = configBase.SettingRow(left, 'Heated bed', 'has_heated_bed', False, 'If you have an heated bed, this enabled heated bed settings', type = 'preference')
for i in xrange(1, self.oldExtruderAmount):
configBase.TitleRow(left, 'Extruder %d' % (i+1))

View File

@ -24,6 +24,7 @@ profileDefaultSettings = {
'skirt_gap': '3.0',
'print_speed': '50',
'print_temperature': '230',
'print_bed_temperature': '70',
'support': 'None',
'filament_diameter': '2.89',
'filament_density': '1.00',
@ -155,6 +156,7 @@ preferencesDefaultSettings = {
'machine_depth': '205',
'machine_height': '200',
'machine_type': 'unknown',
'has_heated_bed': 'False',
'extruder_amount': '1',
'extruder_offset_x1': '-22.0',
'extruder_offset_y1': '0.0',
@ -486,8 +488,17 @@ def getAlterationFileContents(filename):
if eSteps > 0:
prefix += 'M92 E%f\n' % (eSteps)
temp = getProfileSettingFloat('print_temperature')
bedTemp = 0
if getPreference('has_heated_bed') == 'True':
bedTemp = getProfileSettingFloat('print_bed_temperature')
if bedTemp > 0 and not '{print_bed_temperature}' in alterationContents:
prefix += 'M140 S%f\n' % (bedTemp)
if temp > 0 and not '{print_temperature}' in alterationContents:
prefix += 'M109 S%f\n' % (temp)
if bedTemp > 0 and not '{print_bed_temperature}' in alterationContents:
prefix += 'M190 S%f\n' % (bedTemp)
elif filename == 'end.gcode':
#Append the profile string to the end of the GCode, so we can load it from the GCode file later.
postfix = ';CURA_PROFILE_STRING:%s\n' % (getGlobalProfileString())