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)
committerdaid <daid303@gmail.com>
Thu, 6 Nov 2014 09:12:26 +0000 (10:12 +0100)
Cura/gui/firmwareInstall.py
Cura/gui/mainWindow.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index fb3f3cc7829287d3e9e7c31ec8829a387a13b30b..8c030a79dfc16b632653245771cd75b495f50ca5 100644 (file)
@@ -239,7 +239,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):
@@ -247,8 +250,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 5bed7e9c90cb1561b9aa28492899d9d176c8ac9d..789b65f88be924220d7e28676fb3274abebda564 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..."))
@@ -463,7 +461,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)
 
@@ -549,11 +548,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 c46f98e7ceae74b9d4bf8980a62d90234255dd71..3fb408352744141deee6f6877781037eb600d6a3 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 dcf0fe955a5663a61e307ddfd72248995254b735..9f01374ce307c01d56def6fc5aeaf49e01b0d8a2 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']