Skip to content

Commit

Permalink
ajustes en la ventana de selección de modelo
Browse files Browse the repository at this point in the history
  • Loading branch information
moebyusDev committed Jan 18, 2017
1 parent 535ce96 commit 3b3b844
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Cura/gui/configWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,8 @@ def __init__(self, addNew = False):
#Moebyus mod
self.MoebyusSelectModel = moebyusGui.MoebyusSelectModelPage(self)
self.MoebyusDonePage = moebyusGui.MoebyusDonePage(self)
self.ultimakerSelectModel = UltimakerMachineSelectPage(self)
self.MoebyusFirmwarePage = moebyusGui.moebyusFirmwarePage(self)
self.ultimakerSelectModel = UltimakerMachineSelectPage(self)
wx.wizard.WizardPageSimple.Chain(self.machineSelectPage , self.MoebyusSelectModel)
wx.wizard.WizardPageSimple.Chain(self.MoebyusSelectModel, self.MoebyusDonePage)

Expand Down
78 changes: 71 additions & 7 deletions Cura/gui/moebyusGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,39 @@ def genProfile(machineType = "PrusaI3MM", filamentSize = '3' , nozzleSize = '0.4
print("Gen profile")


class moebyusFirmwarePage(MoebyusInfoPage) :
def __init__(self, parent) :
super(moebyusFirmwarePage, self).__init__(parent, _("Moebyus Firmware"))
self.options = []
self.machines = [
("Prusa I3\t\t\t(200x200x200)" ,"PrusaI3MM"),
("Prusa MM - L\t\t(200x300x200)" ,"PrusaI3MM-L"),
("Steel MM\t\t\t(200x200x200)" ,"SteelMM"),
("Steel MM - L\t\t(300x200x200)" ,"SteelMM-L"),
("Steel MM Marco Sirius\t(300x200x200)" ,"SteelMM-Sirius"),
("Melta Kossel\t\t(160x300)" ,"Melta"),
("[SIRIUS] 1.0\t\t(200x200x200)" ,"Sirius1"),
("[SIRIUS] 1.1\t\t(200x200x200)" ,"Sirius11")]
i = 0;
for machine in self.machines:
if i == 0:
item = self.AddRadioButton(machine[0], style=wx.RB_GROUP)
i+=1;
item.data = machine[1:]
self.options.append(item)
item.Bind(wx.EVT_RADIOBUTTON, self.OnMachineSelect)
else:
item = self.AddRadioButton(machine[0])
item.data = machine[1:]
self.options.append(item)
item.Bind(wx.EVT_RADIOBUTTON, self.OnMachineSelect)

def OnMachineSelect(self, e):
print("selected")


class MoebyusSelectModelPage(MoebyusInfoPage):
def __init__(self, parent):
def __init__(self, parent) :
super(MoebyusSelectModelPage, self).__init__(parent, _("Moebyus Machines"))
self._printer_info = [
# max Size x, y, z,machine type
Expand All @@ -156,6 +187,7 @@ def __init__(self, parent):
("[SIRIUS] 1.0\t\t\t\t(300x200x200)" , "Sirius1" , "sirius1.png" ),
("[SIRIUS] 1.1\t\t\t\t(300x200x250)" , "Sirius11" , "sirius11.png" ),
("Moebyus M3\t\t\t\t(1000x1000x1000)" , "M3" , "m3.png") ]
self.parent = parent
#Seleccion de maquina
self.AddText(_("Select Model:"))
self._printers = []
Expand Down Expand Up @@ -196,17 +228,19 @@ def __init__(self, parent):
text = wx.StaticText(self, -1, 'Options')
self.GetSizer().Add(text, pos=(self.rowNr, 0), span=(1, 1), flag=wx.ALL)
self.rowNr += 1
check = wx.CheckBox(self, -1)
self.checkFirmware = wx.CheckBox(self, -1)
text = wx.StaticText(self, -1, 'Load Firmware')
check.SetValue(0)
self.checkFirmware.SetValue(0)
self.checkFirmware.Disable()
self.GetSizer().Add(text, pos=(self.rowNr, 0), span=(1, 1), flag=wx.LEFT | wx.RIGHT)
self.GetSizer().Add(check, pos=(self.rowNr, 1), span=(1, 1), flag=wx.ALL)
self.GetSizer().Add(self.checkFirmware, pos=(self.rowNr, 1), span=(1, 1), flag=wx.ALL)

check = wx.CheckBox(self, -1)
self.checkLevel = wx.CheckBox(self, -1)
text = wx.StaticText(self, -1, 'Level Bed')
check.SetValue(0)
self.checkLevel.SetValue(0)
self.checkLevel.Disable()
self.GetSizer().Add(text, pos=(self.rowNr, 2), span=(1, 1), flag=wx.LEFT | wx.RIGHT)
self.GetSizer().Add(check, pos=(self.rowNr, 3), span=(1, 1), flag=wx.ALL)
self.GetSizer().Add(self.checkLevel, pos=(self.rowNr, 3), span=(1, 1), flag=wx.ALL)

self.rowNr += 1

Expand All @@ -228,6 +262,36 @@ def OnMachineSelect(self, e):
print(selected.GetLabel())
values = selected.data
self.previewBitmap.SetBitmap(wx.Bitmap(resources.getPathForImage(values[1])))
if values[0] == 'MoebyusOne' :
self.comboNozzles.Disable()
self.comboFilaments.Disable()
self.checkFirmware.Disable()
self.comboNozzles.SetSelection(3)
self.comboFilaments.SetSelection(0)
elif values[0] == 'M3' :
self.comboNozzles.Enable()
self.comboFilaments.Disable()
self.checkFirmware.Disable()
self.comboNozzles.SetSelection(6)
self.comboFilaments.SetSelection(0)
elif values[0] == 'MeltaXL' :
self.comboNozzles.Enable()
self.comboFilaments.Disable()
self.checkFirmware.Disable()
self.comboNozzles.SetSelection(6)
self.comboFilaments.SetSelection(0)
elif values[0] == 'Sirius1' or values[0] == 'Sirius11' or values[0] == 'SteelMM-Sirius' or values[0] == 'Melta' :
self.comboNozzles.Enable()
self.comboFilaments.Enable()
self.checkFirmware.Enable()
self.comboNozzles.SetSelection(3)
self.comboFilaments.SetSelection(0)
else :
self.comboNozzles.Enable()
self.comboFilaments.Enable()
self.checkFirmware.Enable()
self.comboNozzles.SetSelection(3)
self.comboFilaments.SetSelection(1)


class MoebyusDonePage(MoebyusInfoPage):
Expand Down

0 comments on commit 3b3b844

Please sign in to comment.