From f836c8f86254aa7bfda195aebe1ebd1a524e5332 Mon Sep 17 00:00:00 2001 From: daid Date: Thu, 26 Sep 2013 12:08:52 +0200 Subject: [PATCH] Add proper head sizes for the Ultimaker2. --- Cura/gui/configWizard.py | 9 +++++---- Cura/gui/mainWindow.py | 11 +++++------ Cura/gui/preferencesDialog.py | 2 +- Cura/gui/printWindow.py | 7 ++++--- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index 5a082355..2884d692 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -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') diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 88efb389..4e01d405 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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") diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py index 8f28fe66..6eb312df 100644 --- a/Cura/gui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -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'))) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 21f96b33..d851067b 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -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())) -- 2.30.2