chiark / gitweb /
Add proper head sizes for the Ultimaker2.
authordaid <daid303@gmail.com>
Thu, 26 Sep 2013 10:08:52 +0000 (12:08 +0200)
committerdaid <daid303@gmail.com>
Thu, 26 Sep 2013 10:08:52 +0000 (12:08 +0200)
Cura/gui/configWizard.py
Cura/gui/mainWindow.py
Cura/gui/preferencesDialog.py
Cura/gui/printWindow.py

index 5a082355b9d7542ea17392bc1f66a26eb59797be..2884d6925c21758e1022a1810ccf0495d97e36af 100644 (file)
@@ -304,12 +304,13 @@ class MachineSelectPage(InfoPage):
                        profile.putMachineSetting('machine_height', '205')
                        profile.putMachineSetting('machine_type', 'ultimaker2')
                        profile.putMachineSetting('machine_center_is_zero', 'False')
+                       profile.putMachineSetting('has_heated_bed', 'True')
                        profile.putMachineSetting('gcode_flavor', 'UltiGCode')
                        profile.putProfileSetting('nozzle_size', '0.4')
-                       profile.putMachineSetting('extruder_head_size_min_x', '75.0')
-                       profile.putMachineSetting('extruder_head_size_min_y', '18.0')
-                       profile.putMachineSetting('extruder_head_size_max_x', '18.0')
-                       profile.putMachineSetting('extruder_head_size_max_y', '35.0')
+                       profile.putMachineSetting('extruder_head_size_min_x', '40.0')
+                       profile.putMachineSetting('extruder_head_size_min_y', '10.0')
+                       profile.putMachineSetting('extruder_head_size_max_x', '60.0')
+                       profile.putMachineSetting('extruder_head_size_max_y', '30.0')
                        profile.putMachineSetting('extruder_head_size_height', '60.0')
                elif self.UltimakerRadio.GetValue():
                        profile.putMachineSetting('machine_width', '205')
index 88efb389253c71d1a1ccf4e90093a0c68b6ec886..4e01d4051003e0b65e3fddf52963dd92ae0c246a 100644 (file)
@@ -378,23 +378,22 @@ class mainWindow(wx.Frame):
 
                #Add a menu item for each machine configuration.
                for n in xrange(0, profile.getMachineCount()):
-                       i = self.machineMenu.Append(n, profile.getMachineSetting('machine_name', n), kind=wx.ITEM_RADIO)
+                       i = self.machineMenu.Append(n, profile.getMachineSetting('machine_name', n).title(), kind=wx.ITEM_RADIO)
                        if n == int(profile.getPreferenceFloat('active_machine')):
                                i.Check(True)
                        self.Bind(wx.EVT_MENU, lambda e: self.OnSelectMachine(e.GetId()), i)
 
+               self.machineMenu.AppendSeparator()
+               i = self.machineMenu.Append(-1, _("Add new machine..."))
+               self.Bind(wx.EVT_MENU, self.OnAddNewMachine, i)
+
                #Add tools for machines.
                self.machineMenu.AppendSeparator()
                i = self.machineMenu.Append(-1, _("Install custom firmware"))
                self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i)
-
                i = self.machineMenu.Append(-1, _("Install default Marlin firmware"))
                self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i)
 
-               self.machineMenu.AppendSeparator()
-               i = self.machineMenu.Append(-1, _("Add new machine..."))
-               self.Bind(wx.EVT_MENU, self.OnAddNewMachine, i)
-
        def OnLoadProfile(self, e):
                dlg=wx.FileDialog(self, _("Select profile file to load"), os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
                dlg.SetWildcard("ini files (*.ini)|*.ini")
index 8f28fe6610f30487479412fb58cc8c6a9f011dcb..6eb312dfa99ada6858987f64fa1d97430b1e4889 100644 (file)
@@ -94,7 +94,7 @@ class machineSettingsDialog(wx.Dialog):
                        configBase.SettingRow(right, 'serial_port', ['AUTO'] + machineCom.serialList(), index=idx)
                        configBase.SettingRow(right, 'serial_baud', ['AUTO'] + map(str, machineCom.baudrateList()), index=idx)
 
-                       self.nb.AddPage(main, profile.getMachineSetting('machine_name', idx))
+                       self.nb.AddPage(main, profile.getMachineSetting('machine_name', idx).title())
 
                self.nb.SetSelection(int(profile.getPreferenceFloat('active_machine')))
 
index 21f96b33b9d33cade154b45720e62f8c3ca56911..d851067b588d4a5ba9d5625b54bc5776aa6707b3 100644 (file)
@@ -19,6 +19,7 @@ from Cura.gui.util import taskbar
 from Cura.util import machineCom
 from Cura.util import gcodeInterpreter
 from Cura.util import resources
+from Cura.util import profile
 
 #The printProcessMonitor is used from the main GUI python process. This monitors the printing python process.
 # This class also handles starting of the 2nd process for printing and all communications with it.
@@ -200,7 +201,7 @@ class printWindow(wx.Frame):
 
                self.temperatureSelect = wx.SpinCtrl(self.temperaturePanel, -1, '0', size=(21 * 3, 21), style=wx.SP_ARROW_KEYS)
                self.temperatureSelect.SetRange(0, 400)
-               self.temperatureHeatUpPLA = wx.Button(self.temperaturePanel, -1, '210C')
+               self.temperatureHeatUp = wx.Button(self.temperaturePanel, -1, int(profile.getProfileSettingFloat('print_temperature')) + 'C')
                self.bedTemperatureLabel = wx.StaticText(self.temperaturePanel, -1, _("BedTemp:"))
                self.bedTemperatureSelect = wx.SpinCtrl(self.temperaturePanel, -1, '0', size=(21 * 3, 21), style=wx.SP_ARROW_KEYS)
                self.bedTemperatureSelect.SetRange(0, 400)
@@ -347,7 +348,7 @@ class printWindow(wx.Frame):
                self.cancelButton.Bind(wx.EVT_BUTTON, self.OnCancel)
                self.machineLogButton.Bind(wx.EVT_BUTTON, self.OnMachineLog)
 
-               self.Bind(wx.EVT_BUTTON, lambda e: (self.temperatureSelect.SetValue(210), self.machineCom.sendCommand("M104 S210")), self.temperatureHeatUpPLA)
+               self.Bind(wx.EVT_BUTTON, lambda e: (self.temperatureSelect.SetValue(int(profile.getProfileSettingFloat('print_temperature'))), self.machineCom.sendCommand("M104 S%d" % (int(profile.getProfileSettingFloat('print_temperature'))))), self.temperatureHeatUpPLA)
                self.Bind(wx.EVT_SPINCTRL, self.OnTempChange, self.temperatureSelect)
                self.Bind(wx.EVT_SPINCTRL, self.OnBedTempChange, self.bedTemperatureSelect)
 
@@ -408,7 +409,7 @@ class printWindow(wx.Frame):
                #self.loadButton.Enable(self.machineCom == None or not (self.machineCom.isPrinting() or self.machineCom.isPaused()))
                self.printButton.Enable(self.machineCom is not None and self.machineCom.isOperational() and not (
                self.machineCom.isPrinting() or self.machineCom.isPaused()))
-               self.temperatureHeatUpPLA.Enable(self.machineCom is not None and self.machineCom.isOperational() and not (
+               self.temperatureHeatUp.Enable(self.machineCom is not None and self.machineCom.isOperational() and not (
                self.machineCom.isPrinting() or self.machineCom.isPaused()))
                self.pauseButton.Enable(
                        self.machineCom is not None and (self.machineCom.isPrinting() or self.machineCom.isPaused()))