chiark / gitweb /
Add raft airgap setting. Add new machine menu option to machine menu.
authordaid <daid303@gmail.com>
Thu, 6 Nov 2014 09:12:26 +0000 (10:12 +0100)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Wed, 14 Jan 2015 17:17:02 +0000 (12:17 -0500)
Cura/gui/firmwareInstall.py
Cura/gui/mainWindow.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index 64e08fa2d63995290b1e265b34203f9e065ce8a4..d2f55dae1c743b96a116fbaa0295b301fe19022f 100644 (file)
@@ -241,7 +241,10 @@ class AutoUpdateFirmware(wx.Dialog):
                                        self._serial = None
                                time.sleep(0.5)
                                self.OnInstall()
-                               self._serial = serial.Serial(self.port, 250000)
+                               try:
+                                       self._serial = serial.Serial(self.port, 250000)
+                               except:
+                                       pass
                        time.sleep(0.5)
 
        def OnSerialRead(self):
@@ -249,8 +252,11 @@ class AutoUpdateFirmware(wx.Dialog):
                        if self._serial is None:
                                time.sleep(0.5)
                        else:
-                               line = self._serial.readline()
-                               wx.CallAfter(self._addTermLog, line)
+                               try:
+                                       line = self._serial.readline()
+                                       wx.CallAfter(self._addTermLog, line)
+                               except:
+                                       pass
 
        def OnInstall(self):
                wx.CallAfter(self.okButton.Disable)
index f987ecf0fada52283ad72bb1e088e3498826b42e..90fab932c4431d729e54d692bef4b65cb8a29c5e 100644 (file)
@@ -173,8 +173,6 @@ class mainWindow(wx.Frame):
                self.normalModeOnlyItems.append(i)
                self.Bind(wx.EVT_MENU, self.OnExpertOpen, i)
                expertMenu.AppendSeparator()
-               #i = expertMenu.Append(-1, _("Run first run wizard..."))
-               #self.Bind(wx.EVT_MENU, self.OnFirstRunWizard, i)
                self.bedLevelWizardMenuItem = expertMenu.Append(-1, _("Run bed leveling wizard..."))
                self.Bind(wx.EVT_MENU, self.OnBedLevelWizard, self.bedLevelWizardMenuItem)
                self.headOffsetWizardMenuItem = expertMenu.Append(-1, _("Run head offset wizard..."))
@@ -466,7 +464,8 @@ class mainWindow(wx.Frame):
                        self.Bind(wx.EVT_MENU, lambda e: self.OnSelectMachine(e.GetId() - 0x1000), i)
 
                self.machineMenu.AppendSeparator()
-
+               i = self.machineMenu.Append(-1, _("Add new machine..."))
+               self.Bind(wx.EVT_MENU, self.OnAddNewMachine, i)
                i = self.machineMenu.Append(-1, _("Machine settings..."))
                self.Bind(wx.EVT_MENU, self.OnMachineSettings, i)
 
@@ -552,11 +551,13 @@ class mainWindow(wx.Frame):
                        #For some reason my Ubuntu 10.10 crashes here.
                        firmwareInstall.InstallFirmware(self, filename)
 
-       def OnFirstRunWizard(self, e):
+       def OnAddNewMachine(self, e):
                self.Hide()
-               configWizard.configWizard()
+               profile.setActiveMachine(profile.getMachineCount())
+               configWizard.configWizard(True)
                self.Show()
                self.reloadSettingPanels()
+               self.updateMachineMenu()
 
        def OnSelectMachine(self, index):
                profile.setActiveMachine(index)
index 4ffa7f45e8bf2b7454ff29d8d518560be48647e5..c32d3d74e07bd39345611e106304d7b373a948ca 100644 (file)
@@ -236,7 +236,8 @@ setting('raft_base_thickness', 0.3, float, 'expert', _('Raft')).setRange(0).setL
 setting('raft_base_linewidth', 1.0, float, 'expert', _('Raft')).setRange(0).setLabel(_("Base line width (mm)"), _("When you are using the raft this is the width of the base layer lines which are put down."))
 setting('raft_interface_thickness', 0.27, float, 'expert', _('Raft')).setRange(0).setLabel(_("Interface thickness (mm)"), _("When you are using the raft this is the thickness of the interface layer which is put down."))
 setting('raft_interface_linewidth', 0.4, float, 'expert', _('Raft')).setRange(0).setLabel(_("Interface line width (mm)"), _("When you are using the raft this is the width of the interface layer lines which are put down."))
-setting('raft_airgap', 0.22, float, 'expert', _('Raft')).setRange(0).setLabel(_("Airgap"), _("Gap between the last layer of the raft and the first printing layer. A small gap of 0.2mm works wonders on PLA and makes the raft easy to remove."))
+setting('raft_airgap_all', 0.0, float, 'expert', _('Raft')).setRange(0).setLabel(_("Airgap"), _("Gap between the last layer of the raft the whole print."))
+setting('raft_airgap', 0.22, float, 'expert', _('Raft')).setRange(0).setLabel(_("First Layer Airgap"), _("Gap between the last layer of the raft and the first printing layer. A small gap of 0.2mm works wonders on PLA and makes the raft easy to remove. This value is added on top of the 'Airgap' setting."))
 setting('raft_surface_layers', 2, int, 'expert', _('Raft')).setRange(0).setLabel(_("Surface layers"), _("Amount of surface layers put on top of the raft, these are fully filled layers on which the model is printed."))
 setting('fix_horrible_union_all_type_a', True,  bool, 'expert', _('Fix horrible')).setLabel(_("Combine everything (Type-A)"), _("This expert option adds all parts of the model together. The result is usually that internal cavities disappear. Depending on the model this can be intended or not. Enabling this option is at your own risk. Type-A is dependent on the model normals and tries to keep some internal holes intact. Type-B ignores all internal holes and only keeps the outside shape per layer."))
 setting('fix_horrible_union_all_type_b', False, bool, 'expert', _('Fix horrible')).setLabel(_("Combine everything (Type-B)"), _("This expert option adds all parts of the model together. The result is usually that internal cavities disappear. Depending on the model this can be intended or not. Enabling this option is at your own risk. Type-A is dependent on the model normals and tries to keep some internal holes intact. Type-B ignores all internal holes and only keeps the outside shape per layer."))
index ccfd56e471cbfcf24c9bd1aee5bcadb0310237af..a357c3ab384b518cae93ac5e98e5ca3d49f57430 100644 (file)
@@ -523,7 +523,8 @@ class Engine(object):
                        settings['raftInterfaceThickness'] = int(profile.getProfileSettingFloat('raft_interface_thickness') * 1000)
                        settings['raftInterfaceLinewidth'] = int(profile.getProfileSettingFloat('raft_interface_linewidth') * 1000)
                        settings['raftInterfaceLineSpacing'] = int(profile.getProfileSettingFloat('raft_interface_linewidth') * 1000 * 2.0)
-                       settings['raftAirGapLayer0'] = int(profile.getProfileSettingFloat('raft_airgap') * 1000)
+                       settings['raftAirGapLayer0'] = int(profile.getProfileSettingFloat('raft_airgap') * 1000 + profile.getProfileSettingFloat('raft_airgap_all') * 1000)
+                       settings['raftAirGap'] = int(profile.getProfileSettingFloat('raft_airgap_all') * 1000)
                        settings['raftBaseSpeed'] = int(profile.getProfileSettingFloat('bottom_layer_speed'))
                        settings['raftFanSpeed'] = 100
                        settings['raftSurfaceThickness'] = settings['raftInterfaceThickness']