From: daid Date: Thu, 6 Nov 2014 09:12:26 +0000 (+0100) Subject: Add raft airgap setting. Add new machine menu option to machine menu. X-Git-Tag: lulzbot-14.12~33 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f2919d6b7b83b758e4da672fdafe89525a388e07;p=cura.git Add raft airgap setting. Add new machine menu option to machine menu. --- diff --git a/Cura/gui/firmwareInstall.py b/Cura/gui/firmwareInstall.py index 64e08fa2..d2f55dae 100644 --- a/Cura/gui/firmwareInstall.py +++ b/Cura/gui/firmwareInstall.py @@ -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) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index f987ecf0..90fab932 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 4ffa7f45..c32d3d74 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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.")) diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index ccfd56e4..a357c3ab 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -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']