chiark / gitweb /
Fix mangrove creation
[cura.git] / Cura / gui / configWizard.py
index ba705692d895d8195a11268cc792e69515e00838..4d230336d2fc7c2fe776801af64fe1f47f0c69d4 100644 (file)
@@ -1112,10 +1112,16 @@ class LulzbotMachineSelectPage(InfoPage):
                self.LulzbotMini = self.AddImageButton(self.panel, 0, 0, _("LulzBot Mini"),
                                                                                           'Lulzbot_mini.jpg', image_size, style=ImageButton.IB_GROUP)
                self.LulzbotMini.OnSelected(self.OnLulzbotMiniSelected)
-               self.LulzbotTaz = self.AddImageButton(self.panel, 0, 1, _("LulzBot TAZ 4 or 5"),
+               
+               self.LulzbotTaz6 = self.AddImageButton(self.panel, 0, 1, _("LulzBot TAZ 6"),
+                                                                                          'Lulzbot_TAZ6.jpg', image_size)
+               self.LulzbotTaz6.OnSelected(self.OnLulzbotTaz6Selected)
+               
+               self.LulzbotTaz = self.AddImageButton(self.panel, 1, 0, _("LulzBot TAZ 4 or 5"),
                                                                                           'Lulzbot_TAZ5.jpg', image_size)
                self.LulzbotTaz.OnSelected(self.OnLulzbotTazSelected)
-               self.OtherPrinters = self.AddImageButton(self.panel, 1, 0, _("Other Printers"),
+               
+               self.OtherPrinters = self.AddImageButton(self.panel, 1, 1, _("Other Printers"),
                                                                                                 'Generic-3D-Printer.png', image_size)
                self.OtherPrinters.OnSelected(self.OnOthersSelected)
                self.LulzbotMini.SetValue(True)
@@ -1131,6 +1137,9 @@ class LulzbotMachineSelectPage(InfoPage):
                wx.wizard.WizardPageSimple.Chain(self.GetParent().lulzbotMiniToolheadPage,
                                                                                 self.GetParent().lulzbotReadyPage)
 
+       def OnLulzbotTaz6Selected(self):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().lulzbotTaz6SelectPage)
+
        def OnLulzbotTazSelected(self):
                wx.wizard.WizardPageSimple.Chain(self, self.GetParent().lulzbotTazSelectPage)
 
@@ -1141,7 +1150,7 @@ class LulzbotMachineSelectPage(InfoPage):
                return False
 
        def StoreData(self):
-               if self.LulzbotTaz.GetValue() or self.LulzbotMini.GetValue():
+               if self.LulzbotTaz.GetValue() or self.LulzbotMini.GetValue() or self.LulzbotTaz6.GetValue():
                        if self.LulzbotTaz.GetValue():
                                profile.putMachineSetting('machine_width', '290')
                                profile.putMachineSetting('machine_depth', '275')
@@ -1152,6 +1161,16 @@ class LulzbotMachineSelectPage(InfoPage):
                                profile.putMachineSetting('extruder_head_size_min_y', '0.0')
                                profile.putMachineSetting('extruder_head_size_max_y', '0.0')
                                profile.putMachineSetting('extruder_head_size_height', '0.0')
+                       elif self.LulzbotTaz6.GetValue():
+                               profile.putMachineSetting('machine_width', '280')
+                               profile.putMachineSetting('machine_depth', '280')
+                               profile.putMachineSetting('machine_height', '250')
+                               profile.putMachineSetting('serial_baud', '250000')
+                               profile.putMachineSetting('extruder_head_size_min_x', '0.0')
+                               profile.putMachineSetting('extruder_head_size_max_x', '0.0')
+                               profile.putMachineSetting('extruder_head_size_min_y', '0.0')
+                               profile.putMachineSetting('extruder_head_size_max_y', '0.0')
+                               profile.putMachineSetting('extruder_head_size_height', '0.0')
                        else:
                                # Nozzle diameter and machine type will be set in the toolhead selection page
                                profile.putMachineSetting('machine_name', 'LulzBot Mini')
@@ -1213,18 +1232,43 @@ class LulzbotMiniToolheadSelectPage(InfoPage):
                        profile.putMachineSetting('toolhead_shortname', 'Flexystruder')
                        profile.putMachineSetting('machine_type', 'lulzbot_mini_flexystruder')
 
+class LulzbotTaz6ToolheadSelectPage(InfoPage):
+       def __init__(self, parent, allowBack = True):
+               super(LulzbotTaz6ToolheadSelectPage, self).__init__(parent, _("LulzBot TAZ 6 Tool Head Selection"))
+
+               self.panel = self.AddPanel()
+               image_size=(LulzbotMachineSelectPage.IMAGE_WIDTH, LulzbotMachineSelectPage.IMAGE_HEIGHT)
+               self.taz6 = self.AddImageButton(self.panel, 0, 0, _('Tilapia'),
+                                                                               'Lulzbot_Toolhead_TAZ_Tilapia.jpg', image_size,
+                                                                               style=ImageButton.IB_GROUP)
+               self.taz6.OnSelected(self.OnTilapiaSelected)
+               self.taz6.SetValue(True)
+
+       def OnPageShown(self):
+               self.taz6.TriggerGroupCallbacks()
+
+       def OnTilapiaSelected(self):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().lulzbotReadyPage)
+
+       def StoreData(self):
+               profile.putProfileSetting('nozzle_size',  '0.5')
+               profile.putMachineSetting('extruder_amount', '1')
+               profile.putMachineSetting('toolhead', 'Single Extruder Tilapia')
+               profile.putMachineSetting('toolhead_shortname', 'Tilapia')
+               profile.putMachineSetting('machine_type', 'lulzbot_TAZ_6_Single_Tilapia')
+               profile.putMachineSetting('machine_name', 'LulzBot TAZ 6')
 
 class LulzbotTazSelectPage(InfoPage):
        def __init__(self, parent):
-               super(LulzbotTazSelectPage, self).__init__(parent, _("LulzBot TAZ Selection"))
+               super(LulzbotTazSelectPage, self).__init__(parent, _("LulzBot TAZ 4-5 Selection"))
 
                self.panel = self.AddPanel()
                image_size=(LulzbotMachineSelectPage.IMAGE_WIDTH, LulzbotMachineSelectPage.IMAGE_HEIGHT)
-               self.taz5 = self.AddImageButton(self.panel, 0, 0, _('Stock TAZ 5 (PEI and v2)'),
+               self.taz5 = self.AddImageButton(self.panel, 0, 0, _('Stock TAZ 5 (PEI && v2)'),
                                                                                'Lulzbot_TAZ_5_Hex_and_PEI.jpg', image_size,
                                                                                style=ImageButton.IB_GROUP)
                self.taz5.OnSelected(self.OnTaz5Selected)
-               self.taz4 = self.AddImageButton(self.panel, 0, 1, _('Stock TAZ 4 (PET and v1)'),
+               self.taz4 = self.AddImageButton(self.panel, 0, 1, _('Stock TAZ 4 (PET && v1)'),
                                                                                'Lulzbot_TAZ_4_Buda_and_PET.jpg', image_size)
                self.taz4.OnSelected(self.OnTaz4Selected)
                self.modified = self.AddImageButton(self.panel, 1, 0, _('Modified LulzBot TAZ 4 or 5'),
@@ -1285,7 +1329,6 @@ class LulzbotTazBedSelectPage(InfoPage):
                        profile.putMachineSetting('machine_type', 'lulzbot_TAZ_4')
                        profile.putMachineSetting('machine_name', 'LulzBot TAZ 4')
 
-
 class LulzbotTazToolheadSelectPage(InfoPage):
        def __init__(self, parent):
                super(LulzbotTazToolheadSelectPage, self).__init__(parent, _("LulzBot TAZ Tool Head Selection"))
@@ -1375,7 +1418,6 @@ class LulzbotTazToolheadSelectPage(InfoPage):
                        profile.putMachineSetting('toolhead_shortname', 'FlexyDually v%d' % self.version)
                        profile.putMachineSetting('machine_type', 'lulzbot_TAZ_%d_FlexyDuallyV%d' % version)
 
-
 class LulzbotHotendSelectPage(InfoPage):
        def __init__(self, parent, allowBack = True):
                super(LulzbotHotendSelectPage, self).__init__(parent, _("LulzBot Tool Head Hot end Selection"))
@@ -1490,18 +1532,22 @@ class LulzbotChangeToolheadWizard(wx.wizard.Wizard):
                self.lulzbotFirmwarePage = LulzbotFirmwareUpdatePage(self)
                self.lulzbotMiniToolheadPage = LulzbotMiniToolheadSelectPage(self, False)
                self.lulzbotTazToolheadPage = LulzbotTazToolheadSelectPage(self)
+               self.lulzbotTaz6ToolheadPage = LulzbotTaz6ToolheadSelectPage(self, False)
                self.lulzbotTazHotendPage = LulzbotHotendSelectPage(self, False)
                self.lulzbotTaz5NozzleSelectPage = LulzbotTaz5NozzleSelectPage(self)
                self.lulzbotTazBedSelectPage = LulzbotTazBedSelectPage(self)
                self.lulzbotTazSelectPage = LulzbotTazSelectPage(self)
+               self.lulzbotTaz6SelectPage = LulzbotTaz6SelectPage(self)
 
                wx.wizard.WizardPageSimple.Chain(self.lulzbotMiniToolheadPage, self.lulzbotReadyPage)
                wx.wizard.WizardPageSimple.Chain(self.lulzbotTazHotendPage, self.lulzbotTazToolheadPage)
 
                if profile.getMachineSetting('machine_type').startswith('lulzbot_mini'):
                        self.RunWizard(self.lulzbotMiniToolheadPage)
-               else:
+               elif profile.getMachineSetting('machine_type').startswith('lulzbot_TAZ_5'):
                        self.RunWizard(self.lulzbotTazHotendPage)
+               elif profile.getMachineSetting('machine_type').startswith('lulzbot_TAZ_6'):
+                       self.RunWizard(self.lulzbotTaz6ToolheadPage)
                self.Destroy()
 
        def OnPageChanging(self, e):
@@ -1560,6 +1606,8 @@ class ConfigWizard(wx.wizard.Wizard):
                self.lulzbotMachineSelectPage = LulzbotMachineSelectPage(self)
                self.lulzbotTazBedSelectPage = LulzbotTazBedSelectPage(self)
                self.lulzbotTazSelectPage = LulzbotTazSelectPage(self)
+               self.lulzbotTaz6SelectPage = LulzbotTaz6SelectPage(self)
+               self.lulzbotTaz6ToolheadPage = LulzbotTaz6ToolheadSelectPage(self)
 
                wx.wizard.WizardPageSimple.Chain(self.lulzbotMachineSelectPage, self.lulzbotMiniToolheadPage)
                wx.wizard.WizardPageSimple.Chain(self.lulzbotMiniToolheadPage, self.lulzbotReadyPage)