chiark / gitweb /
Change how the engine is interfaced from the python code. Put the GCode viewer in...
[cura.git] / Cura / gui / configWizard.py
index 214d76ece4aaf88edb5faa9531bdb885a197c56f..d0273bc474637844f65c5310dc29405dea286129 100644 (file)
@@ -1,6 +1,7 @@
 from __future__ import absolute_import
 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
 
+import os
 import webbrowser
 import threading
 import time
@@ -14,7 +15,8 @@ from Cura.gui import printWindow
 from Cura.util import machineCom
 from Cura.util import profile
 from Cura.util import gcodeGenerator
-from Cura.util.resources import getPathForImage
+from Cura.util import resources
+
 
 class InfoBox(wx.Panel):
        def __init__(self, parent):
@@ -24,14 +26,14 @@ class InfoBox(wx.Panel):
                self.sizer = wx.GridBagSizer(5, 5)
                self.SetSizer(self.sizer)
 
-               self.attentionBitmap = wx.Bitmap(getPathForImage('attention.png'))
-               self.errorBitmap = wx.Bitmap(getPathForImage('error.png'))
-               self.readyBitmap = wx.Bitmap(getPathForImage('ready.png'))
+               self.attentionBitmap = wx.Bitmap(resources.getPathForImage('attention.png'))
+               self.errorBitmap = wx.Bitmap(resources.getPathForImage('error.png'))
+               self.readyBitmap = wx.Bitmap(resources.getPathForImage('ready.png'))
                self.busyBitmap = [
-                       wx.Bitmap(getPathForImage('busy-0.png')),
-                       wx.Bitmap(getPathForImage('busy-1.png')),
-                       wx.Bitmap(getPathForImage('busy-2.png')),
-                       wx.Bitmap(getPathForImage('busy-3.png'))
+                       wx.Bitmap(resources.getPathForImage('busy-0.png')),
+                       wx.Bitmap(resources.getPathForImage('busy-1.png')),
+                       wx.Bitmap(resources.getPathForImage('busy-2.png')),
+                       wx.Bitmap(resources.getPathForImage('busy-3.png'))
                ]
 
                self.bitmap = wx.StaticBitmap(self, -1, wx.EmptyBitmapRGBA(24, 24, red=255, green=255, blue=255, alpha=1))
@@ -214,60 +216,104 @@ class InfoPage(wx.wizard.WizardPageSimple):
 
 
 class FirstInfoPage(InfoPage):
-       def __init__(self, parent):
-               super(FirstInfoPage, self).__init__(parent, _("First time run wizard"))
-               self.AddText(_("Welcome, and thanks for trying Cura!"))
-               self.AddSeperator()
-               self.AddText(_("This wizard will help you with the following steps:"))
-               self.AddText(_("* Configure Cura for your machine"))
-               self.AddText(_("* Upgrade your firmware"))
-               self.AddText(_("* Check if your machine is working safely"))
-               self.AddText(_("* Level your printer bed"))
+       def __init__(self, parent, addNew):
+               if addNew:
+                       super(FirstInfoPage, self).__init__(parent, _("Add new machine wizard"))
+               else:
+                       super(FirstInfoPage, self).__init__(parent, _("First time run wizard"))
+                       self.AddText(_("Welcome, and thanks for trying Cura!"))
+                       self.AddSeperator()
+               self.AddText(_("This wizard will help you in setting up Cura for your machine."))
+               # self.AddText(_("This wizard will help you with the following steps:"))
+               # self.AddText(_("* Configure Cura for your machine"))
+               # self.AddText(_("* Optionally upgrade your firmware"))
+               # self.AddText(_("* Optionally check if your machine is working safely"))
+               # self.AddText(_("* Optionally level your printer bed"))
 
                #self.AddText('* Calibrate your machine')
                #self.AddText('* Do your first print')
 
 
-class RepRapInfoPage(InfoPage):
+class OtherMachineSelectPage(InfoPage):
        def __init__(self, parent):
-               super(RepRapInfoPage, self).__init__(parent, "RepRap information")
-               self.AddText(
-                       _("RepRap machines are vastly different, and there is no\ndefault configuration in Cura for any of them."))
+               super(OtherMachineSelectPage, self).__init__(parent, "Other machine information")
+               self.AddText(_("The following pre-defined machine profiles are available"))
+               self.AddText(_("Note that these profiles are not guaranteed to give good results,\nor work at all. Extra tweaks might be required.\nIf you find issues with the predefined profiles,\nor want an extra profile.\nPlease report it at the github issue tracker."))
+               self.options = []
+               machines = resources.getDefaultMachineProfiles()
+               machines.sort()
+               for filename in machines:
+                       name = os.path.splitext(os.path.basename(filename))[0]
+                       item = self.AddRadioButton(name)
+                       item.filename = filename
+                       item.Bind(wx.EVT_RADIOBUTTON, self.OnProfileSelect)
+                       self.options.append(item)
+               self.AddSeperator()
+               item = self.AddRadioButton('Custom...')
+               item.SetValue(True)
+               item.Bind(wx.EVT_RADIOBUTTON, self.OnOtherSelect)
+
+       def OnProfileSelect(self, e):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().otherMachineInfoPage)
+
+       def OnOtherSelect(self, e):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().customRepRapInfoPage)
+
+       def StoreData(self):
+               for option in self.options:
+                       if option.GetValue():
+                               profile.loadProfile(option.filename)
+                               profile.loadMachineSettings(option.filename)
+
+class OtherMachineInfoPage(InfoPage):
+       def __init__(self, parent):
+               super(OtherMachineInfoPage, self).__init__(parent, "Cura Ready!")
+               self.AddText(_("Cura is now ready to be used!"))
+
+class CustomRepRapInfoPage(InfoPage):
+       def __init__(self, parent):
+               super(CustomRepRapInfoPage, self).__init__(parent, "Custom RepRap information")
+               self.AddText(_("RepRap machines can be vastly different, so here you can set your own settings."))
+               self.AddText(_("Be sure to review the default profile before running it on your machine."))
                self.AddText(_("If you like a default profile for your machine added,\nthen make an issue on github."))
                self.AddSeperator()
                self.AddText(_("You will have to manually install Marlin or Sprinter firmware."))
                self.AddSeperator()
+               self.machineName = self.AddLabelTextCtrl(_("Machine name"), "RepRap")
                self.machineWidth = self.AddLabelTextCtrl(_("Machine width (mm)"), "80")
                self.machineDepth = self.AddLabelTextCtrl(_("Machine depth (mm)"), "80")
-               self.machineHeight = self.AddLabelTextCtrl(_("Machine height (mm)"), "60")
+               self.machineHeight = self.AddLabelTextCtrl(_("Machine height (mm)"), "55")
                self.nozzleSize = self.AddLabelTextCtrl(_("Nozzle size (mm)"), "0.5")
                self.heatedBed = self.AddCheckbox(_("Heated bed"))
                self.HomeAtCenter = self.AddCheckbox(_("Bed center is 0,0,0 (RoStock)"))
 
        def StoreData(self):
-               profile.putPreference('machine_width', self.machineWidth.GetValue())
-               profile.putPreference('machine_depth', self.machineDepth.GetValue())
-               profile.putPreference('machine_height', self.machineHeight.GetValue())
+               profile.putMachineSetting('machine_name', self.machineName.GetValue())
+               profile.putMachineSetting('machine_width', self.machineWidth.GetValue())
+               profile.putMachineSetting('machine_depth', self.machineDepth.GetValue())
+               profile.putMachineSetting('machine_height', self.machineHeight.GetValue())
                profile.putProfileSetting('nozzle_size', self.nozzleSize.GetValue())
                profile.putProfileSetting('wall_thickness', float(profile.getProfileSettingFloat('nozzle_size')) * 2)
-               profile.putPreference('has_heated_bed', str(self.heatedBed.GetValue()))
-               profile.putPreference('machine_center_is_zero', str(self.HomeAtCenter.GetValue()))
-               profile.putPreference('extruder_head_size_min_x', '0')
-               profile.putPreference('extruder_head_size_min_y', '0')
-               profile.putPreference('extruder_head_size_max_x', '0')
-               profile.putPreference('extruder_head_size_max_y', '0')
-               profile.putPreference('extruder_head_size_height', '0')
-
+               profile.putMachineSetting('has_heated_bed', str(self.heatedBed.GetValue()))
+               profile.putMachineSetting('machine_center_is_zero', str(self.HomeAtCenter.GetValue()))
+               profile.putMachineSetting('extruder_head_size_min_x', '0')
+               profile.putMachineSetting('extruder_head_size_min_y', '0')
+               profile.putMachineSetting('extruder_head_size_max_x', '0')
+               profile.putMachineSetting('extruder_head_size_max_y', '0')
+               profile.putMachineSetting('extruder_head_size_height', '0')
+               profile.checkAndUpdateMachineName()
 
 class MachineSelectPage(InfoPage):
        def __init__(self, parent):
                super(MachineSelectPage, self).__init__(parent, _("Select your machine"))
                self.AddText(_("What kind of machine do you have:"))
 
-               self.UltimakerRadio = self.AddRadioButton("Ultimaker", style=wx.RB_GROUP)
-               self.UltimakerRadio.SetValue(True)
+               self.Ultimaker2Radio = self.AddRadioButton("Ultimaker2", style=wx.RB_GROUP)
+               self.Ultimaker2Radio.SetValue(True)
+               self.Ultimaker2Radio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimaker2Select)
+               self.UltimakerRadio = self.AddRadioButton("Ultimaker Original")
                self.UltimakerRadio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimakerSelect)
-               self.OtherRadio = self.AddRadioButton(_("Other (Ex: RepRap)"))
+               self.OtherRadio = self.AddRadioButton(_("Other (Ex: RepRap, MakerBot)"))
                self.OtherRadio.Bind(wx.EVT_RADIOBUTTON, self.OnOtherSelect)
                self.AddSeperator()
                self.AddText(_("The collection of anonymous usage information helps with the continued improvement of Cura."))
@@ -276,38 +322,70 @@ class MachineSelectPage(InfoPage):
                self.AddText(_("For full details see: http://wiki.ultimaker.com/Cura:stats"))
                self.SubmitUserStats.SetValue(True)
 
+       def OnUltimaker2Select(self, e):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimaker2ReadyPage)
+
        def OnUltimakerSelect(self, e):
-               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimakerFirmwareUpgradePage)
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimakerSelectParts)
 
        def OnOtherSelect(self, e):
-               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().repRapInfoPage)
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().otherMachineSelectPage)
+
+       def AllowNext(self):
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimaker2ReadyPage)
+               return True
 
        def StoreData(self):
-               if self.UltimakerRadio.GetValue():
-                       profile.putPreference('machine_width', '205')
-                       profile.putPreference('machine_depth', '205')
-                       profile.putPreference('machine_height', '200')
-                       profile.putPreference('machine_type', 'ultimaker')
-                       profile.putPreference('machine_center_is_zero', 'False')
+               profile.putProfileSetting('retraction_enable', 'True')
+               if self.Ultimaker2Radio.GetValue():
+                       profile.putMachineSetting('machine_width', '230')
+                       profile.putMachineSetting('machine_depth', '225')
+                       profile.putMachineSetting('machine_height', '205')
+                       profile.putMachineSetting('machine_name', 'ultimaker2')
+                       profile.putMachineSetting('machine_type', 'ultimaker2')
+                       profile.putMachineSetting('machine_center_is_zero', 'False')
+                       profile.putMachineSetting('has_heated_bed', 'True')
+                       profile.putMachineSetting('gcode_flavor', 'UltiGCode')
+                       profile.putMachineSetting('extruder_head_size_min_x', '40.0')
+                       profile.putMachineSetting('extruder_head_size_min_y', '10.0')
+                       profile.putMachineSetting('extruder_head_size_max_x', '60.0')
+                       profile.putMachineSetting('extruder_head_size_max_y', '30.0')
+                       profile.putMachineSetting('extruder_head_size_height', '55.0')
+                       profile.putProfileSetting('nozzle_size', '0.4')
+                       profile.putProfileSetting('fan_full_height', '5.0')
+                       profile.putMachineSetting('extruder_offset_x1', '18.0')
+                       profile.putMachineSetting('extruder_offset_y1', '0.0')
+               elif self.UltimakerRadio.GetValue():
+                       profile.putMachineSetting('machine_width', '205')
+                       profile.putMachineSetting('machine_depth', '205')
+                       profile.putMachineSetting('machine_height', '200')
+                       profile.putMachineSetting('machine_name', 'ultimaker original')
+                       profile.putMachineSetting('machine_type', 'ultimaker')
+                       profile.putMachineSetting('machine_center_is_zero', 'False')
+                       profile.putMachineSetting('gcode_flavor', 'RepRap (Marlin/Sprinter)')
                        profile.putProfileSetting('nozzle_size', '0.4')
-                       profile.putPreference('extruder_head_size_min_x', '75.0')
-                       profile.putPreference('extruder_head_size_min_y', '18.0')
-                       profile.putPreference('extruder_head_size_max_x', '18.0')
-                       profile.putPreference('extruder_head_size_max_y', '35.0')
-                       profile.putPreference('extruder_head_size_height', '60.0')
+                       profile.putMachineSetting('extruder_head_size_min_x', '75.0')
+                       profile.putMachineSetting('extruder_head_size_min_y', '18.0')
+                       profile.putMachineSetting('extruder_head_size_max_x', '18.0')
+                       profile.putMachineSetting('extruder_head_size_max_y', '35.0')
+                       profile.putMachineSetting('extruder_head_size_height', '55.0')
                else:
-                       profile.putPreference('machine_width', '80')
-                       profile.putPreference('machine_depth', '80')
-                       profile.putPreference('machine_height', '60')
-                       profile.putPreference('machine_type', 'reprap')
+                       profile.putMachineSetting('machine_width', '80')
+                       profile.putMachineSetting('machine_depth', '80')
+                       profile.putMachineSetting('machine_height', '60')
+                       profile.putMachineSetting('machine_name', 'reprap')
+                       profile.putMachineSetting('machine_type', 'reprap')
+                       profile.putMachineSetting('gcode_flavor', 'RepRap (Marlin/Sprinter)')
                        profile.putPreference('startMode', 'Normal')
                        profile.putProfileSetting('nozzle_size', '0.5')
+               profile.checkAndUpdateMachineName()
                profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2)
                if self.SubmitUserStats.GetValue():
                        profile.putPreference('submit_slice_information', 'True')
                else:
                        profile.putPreference('submit_slice_information', 'False')
 
+
 class SelectParts(InfoPage):
        def __init__(self, parent):
                super(SelectParts, self).__init__(parent, _("Select upgraded parts you have"))
@@ -322,22 +400,22 @@ class SelectParts(InfoPage):
                self.springExtruder.SetValue(True)
 
        def StoreData(self):
-               profile.putPreference('ultimaker_extruder_upgrade', str(self.springExtruder.GetValue()))
-               profile.putPreference('has_heated_bed', str(self.heatedBed.GetValue()))
+               profile.putMachineSetting('ultimaker_extruder_upgrade', str(self.springExtruder.GetValue()))
+               profile.putMachineSetting('has_heated_bed', str(self.heatedBed.GetValue()))
                if self.dualExtrusion.GetValue():
-                       profile.putPreference('extruder_amount', '2')
-                       profile.putPreference('machine_depth', '195')
+                       profile.putMachineSetting('extruder_amount', '2')
+                       profile.putMachineSetting('machine_depth', '195')
                else:
-                       profile.putPreference('extruder_amount', '1')
-               if profile.getPreference('ultimaker_extruder_upgrade') == 'True':
+                       profile.putMachineSetting('extruder_amount', '1')
+               if profile.getMachineSetting('ultimaker_extruder_upgrade') == 'True':
                        profile.putProfileSetting('retraction_enable', 'True')
                else:
                        profile.putProfileSetting('retraction_enable', 'False')
 
 
-class FirmwareUpgradePage(InfoPage):
+class UltimakerFirmwareUpgradePage(InfoPage):
        def __init__(self, parent):
-               super(FirmwareUpgradePage, self).__init__(parent, "Upgrade Ultimaker Firmware")
+               super(UltimakerFirmwareUpgradePage, self).__init__(parent, _("Upgrade Ultimaker Firmware"))
                self.AddText(_("Firmware is the piece of software running directly on your 3D printer.\nThis firmware controls the step motors, regulates the temperature\nand ultimately makes your printer work."))
                self.AddHiddenSeperator()
                self.AddText(_("The firmware shipping with new Ultimakers works, but upgrades\nhave been made to make better prints, and make calibration easier."))
@@ -348,7 +426,7 @@ class FirmwareUpgradePage(InfoPage):
                skipUpgradeButton.Bind(wx.EVT_BUTTON, self.OnSkipClick)
                self.AddHiddenSeperator()
                self.AddText(_("Do not upgrade to this firmware if:"))
-               self.AddText(_("* You have an older machine based on ATMega1280"))
+               self.AddText(_("* You have an older machine based on ATMega1280 (Rev 1 machine)"))
                self.AddText(_("* Have other changes in the firmware"))
 #              button = self.AddButton('Goto this page for a custom firmware')
 #              button.Bind(wx.EVT_BUTTON, self.OnUrlClick)
@@ -367,21 +445,20 @@ class FirmwareUpgradePage(InfoPage):
        def OnUrlClick(self, e):
                webbrowser.open('http://marlinbuilder.robotfuzz.com/')
 
-
 class UltimakerCheckupPage(InfoPage):
        def __init__(self, parent):
                super(UltimakerCheckupPage, self).__init__(parent, "Ultimaker Checkup")
 
-               self.checkBitmap = wx.Bitmap(getPathForImage('checkmark.png'))
-               self.crossBitmap = wx.Bitmap(getPathForImage('cross.png'))
-               self.unknownBitmap = wx.Bitmap(getPathForImage('question.png'))
-               self.endStopNoneBitmap = wx.Bitmap(getPathForImage('endstop_none.png'))
-               self.endStopXMinBitmap = wx.Bitmap(getPathForImage('endstop_xmin.png'))
-               self.endStopXMaxBitmap = wx.Bitmap(getPathForImage('endstop_xmax.png'))
-               self.endStopYMinBitmap = wx.Bitmap(getPathForImage('endstop_ymin.png'))
-               self.endStopYMaxBitmap = wx.Bitmap(getPathForImage('endstop_ymax.png'))
-               self.endStopZMinBitmap = wx.Bitmap(getPathForImage('endstop_zmin.png'))
-               self.endStopZMaxBitmap = wx.Bitmap(getPathForImage('endstop_zmax.png'))
+               self.checkBitmap = wx.Bitmap(resources.getPathForImage('checkmark.png'))
+               self.crossBitmap = wx.Bitmap(resources.getPathForImage('cross.png'))
+               self.unknownBitmap = wx.Bitmap(resources.getPathForImage('question.png'))
+               self.endStopNoneBitmap = wx.Bitmap(resources.getPathForImage('endstop_none.png'))
+               self.endStopXMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_xmin.png'))
+               self.endStopXMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_xmax.png'))
+               self.endStopYMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_ymin.png'))
+               self.endStopYMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_ymax.png'))
+               self.endStopZMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_zmin.png'))
+               self.endStopZMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_zmax.png'))
 
                self.AddText(
                        _("It is a good idea to do a few sanity checks now on your Ultimaker.\nYou can skip these if you know your machine is functional."))
@@ -472,7 +549,7 @@ class UltimakerCheckupPage(InfoPage):
                        if temp[self.checkExtruderNr] > self.startTemp + 40:
                                self.comm.sendCommand('M104 S0 T%d' % (self.checkExtruderNr))
                                self.comm.sendCommand('M104 S0 T%d' % (self.checkExtruderNr))
-                               if self.checkExtruderNr < int(profile.getPreference('extruder_amount')):
+                               if self.checkExtruderNr < int(profile.getMachineSetting('extruder_amount')):
                                        self.checkExtruderNr = 0
                                        self.checkupState = 3
                                        wx.CallAfter(self.infoBox.SetAttention, _("Please make sure none of the endstops are pressed."))
@@ -619,8 +696,8 @@ class UltimakerCalibrateStepsPerEPage(InfoPage):
        def __init__(self, parent):
                super(UltimakerCalibrateStepsPerEPage, self).__init__(parent, "Ultimaker Calibration")
 
-               #if profile.getPreference('steps_per_e') == '0':
-               #       profile.putPreference('steps_per_e', '865.888')
+               #if profile.getMachineSetting('steps_per_e') == '0':
+               #       profile.putMachineSetting('steps_per_e', '865.888')
 
                self.AddText(_("Calibrating the Steps Per E requires some manual actions."))
                self.AddText(_("First remove any filament from your machine."))
@@ -630,7 +707,7 @@ class UltimakerCalibrateStepsPerEPage(InfoPage):
                self.AddText(_("Now measure the amount of extruded filament:\n(this can be more or less then 100mm)"))
                self.lengthInput, self.saveLengthButton = self.AddTextCtrlButton("100", _("Save"))
                self.AddText(_("This results in the following steps per E:"))
-               self.stepsPerEInput = self.AddTextCtrl(profile.getPreference('steps_per_e'))
+               self.stepsPerEInput = self.AddTextCtrl(profile.getMachineSetting('steps_per_e'))
                self.AddText(_("You can repeat these steps to get better calibration."))
                self.AddSeperator()
                self.AddText(
@@ -649,7 +726,9 @@ class UltimakerCalibrateStepsPerEPage(InfoPage):
                self.lengthInput.SetValue("100")
 
        def OnExtrudeClick(self, e):
-               threading.Thread(target=self.OnExtrudeRun).start()
+               t = threading.Thread(target=self.OnExtrudeRun)
+               t.daemon = True
+               t.start()
 
        def OnExtrudeRun(self):
                self.heatButton.Enable(False)
@@ -682,7 +761,9 @@ class UltimakerCalibrateStepsPerEPage(InfoPage):
                self.heatButton.Enable()
 
        def OnHeatClick(self, e):
-               threading.Thread(target=self.OnHeatRun).start()
+               t = threading.Thread(target=self.OnHeatRun)
+               t.daemon = True
+               t.start()
 
        def OnHeatRun(self):
                self.heatButton.Enable(False)
@@ -728,31 +809,43 @@ class UltimakerCalibrateStepsPerEPage(InfoPage):
        def StoreData(self):
                profile.putPreference('steps_per_e', self.stepsPerEInput.GetValue())
 
+class Ultimaker2ReadyPage(InfoPage):
+       def __init__(self, parent):
+               super(Ultimaker2ReadyPage, self).__init__(parent, "Ultimaker2")
+               self.AddText('Congratulations on your the purchase of your brand new Ultimaker2.')
+               self.AddText('Cura is now ready to be used with your Ultimaker2.')
+               self.AddSeperator()
 
 class configWizard(wx.wizard.Wizard):
-       def __init__(self):
+       def __init__(self, addNew = False):
                super(configWizard, self).__init__(None, -1, "Configuration Wizard")
 
                self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGED, self.OnPageChanged)
                self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.OnPageChanging)
 
-               self.firstInfoPage = FirstInfoPage(self)
+               self.firstInfoPage = FirstInfoPage(self, addNew)
                self.machineSelectPage = MachineSelectPage(self)
                self.ultimakerSelectParts = SelectParts(self)
-               self.ultimakerFirmwareUpgradePage = FirmwareUpgradePage(self)
+               self.ultimakerFirmwareUpgradePage = UltimakerFirmwareUpgradePage(self)
                self.ultimakerCheckupPage = UltimakerCheckupPage(self)
                self.ultimakerCalibrationPage = UltimakerCalibrationPage(self)
                self.ultimakerCalibrateStepsPerEPage = UltimakerCalibrateStepsPerEPage(self)
                self.bedLevelPage = bedLevelWizardMain(self)
                self.headOffsetCalibration = headOffsetCalibrationPage(self)
-               self.repRapInfoPage = RepRapInfoPage(self)
+               self.otherMachineSelectPage = OtherMachineSelectPage(self)
+               self.customRepRapInfoPage = CustomRepRapInfoPage(self)
+               self.otherMachineInfoPage = OtherMachineInfoPage(self)
+
+               self.ultimaker2ReadyPage = Ultimaker2ReadyPage(self)
 
                wx.wizard.WizardPageSimple.Chain(self.firstInfoPage, self.machineSelectPage)
+               #wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimaker2ReadyPage)
                wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimakerSelectParts)
                wx.wizard.WizardPageSimple.Chain(self.ultimakerSelectParts, self.ultimakerFirmwareUpgradePage)
                wx.wizard.WizardPageSimple.Chain(self.ultimakerFirmwareUpgradePage, self.ultimakerCheckupPage)
                wx.wizard.WizardPageSimple.Chain(self.ultimakerCheckupPage, self.bedLevelPage)
                #wx.wizard.WizardPageSimple.Chain(self.ultimakerCalibrationPage, self.ultimakerCalibrateStepsPerEPage)
+               wx.wizard.WizardPageSimple.Chain(self.otherMachineSelectPage, self.customRepRapInfoPage)
 
                self.FitToPage(self.firstInfoPage)
                self.GetPageAreaSizer().Add(self.firstInfoPage)
@@ -805,7 +898,7 @@ class bedLevelWizardMain(InfoPage):
                self._wizardState = 0
 
        def AllowNext(self):
-               if self.GetParent().headOffsetCalibration is not None and int(profile.getPreference('extruder_amount')) > 1:
+               if self.GetParent().headOffsetCalibration is not None and int(profile.getMachineSetting('extruder_amount')) > 1:
                        wx.wizard.WizardPageSimple.Chain(self, self.GetParent().headOffsetCalibration)
                return True
 
@@ -815,21 +908,21 @@ class bedLevelWizardMain(InfoPage):
                if self._wizardState == 2:
                        wx.CallAfter(self.infoBox.SetBusy, 'Moving head to back left corner...')
                        self.comm.sendCommand('G1 Z3 F%d' % (feedZ))
-                       self.comm.sendCommand('G1 X%d Y%d F%d' % (0, profile.getPreferenceFloat('machine_depth'), feedTravel))
+                       self.comm.sendCommand('G1 X%d Y%d F%d' % (0, profile.getMachineSettingFloat('machine_depth'), feedTravel))
                        self.comm.sendCommand('G1 Z0 F%d' % (feedZ))
                        self.comm.sendCommand('M400')
                        self._wizardState = 3
                elif self._wizardState == 4:
                        wx.CallAfter(self.infoBox.SetBusy, 'Moving head to back right corner...')
                        self.comm.sendCommand('G1 Z3 F%d' % (feedZ))
-                       self.comm.sendCommand('G1 X%d Y%d F%d' % (profile.getPreferenceFloat('machine_width') - 5.0, profile.getPreferenceFloat('machine_depth') - 25, feedTravel))
+                       self.comm.sendCommand('G1 X%d Y%d F%d' % (profile.getMachineSettingFloat('machine_width') - 5.0, profile.getMachineSettingFloat('machine_depth') - 25, feedTravel))
                        self.comm.sendCommand('G1 Z0 F%d' % (feedZ))
                        self.comm.sendCommand('M400')
                        self._wizardState = 5
                elif self._wizardState == 6:
                        wx.CallAfter(self.infoBox.SetBusy, 'Moving head to front right corner...')
                        self.comm.sendCommand('G1 Z3 F%d' % (feedZ))
-                       self.comm.sendCommand('G1 X%d Y%d F%d' % (profile.getPreferenceFloat('machine_width') - 5.0, 20, feedTravel))
+                       self.comm.sendCommand('G1 X%d Y%d F%d' % (profile.getMachineSettingFloat('machine_width') - 5.0, 20, feedTravel))
                        self.comm.sendCommand('G1 Z0 F%d' % (feedZ))
                        self.comm.sendCommand('M400')
                        self._wizardState = 7
@@ -845,8 +938,8 @@ class bedLevelWizardMain(InfoPage):
                        feedZ = profile.getProfileSettingFloat('print_speed') * 60
                        feedPrint = profile.getProfileSettingFloat('print_speed') * 60
                        feedTravel = profile.getProfileSettingFloat('travel_speed') * 60
-                       w = profile.getPreferenceFloat('machine_width')
-                       d = profile.getPreferenceFloat('machine_depth')
+                       w = profile.getMachineSettingFloat('machine_width')
+                       d = profile.getMachineSettingFloat('machine_depth')
                        filamentRadius = profile.getProfileSettingFloat('filament_diameter') / 2
                        filamentArea = math.pi * filamentRadius * filamentRadius
                        ePerMM = (profile.calculateEdgeWidth() * 0.3) / filamentArea
@@ -970,8 +1063,8 @@ class headOffsetCalibrationPage(InfoPage):
                        self._wizardState = 3
                        wx.CallAfter(self.infoBox.SetBusy, 'Printing initial calibration cross')
 
-                       w = profile.getPreferenceFloat('machine_width')
-                       d = profile.getPreferenceFloat('machine_depth')
+                       w = profile.getMachineSettingFloat('machine_width')
+                       d = profile.getMachineSettingFloat('machine_depth')
 
                        gcode = gcodeGenerator.gcodeGenerator()
                        gcode.setExtrusionRate(profile.getProfileSettingFloat('nozzle_size') * 1.5, 0.2)
@@ -1031,8 +1124,8 @@ class headOffsetCalibrationPage(InfoPage):
                        self.textEntry.Enable(False)
                        self.resumeButton.Enable(False)
 
-                       x = profile.getPreferenceFloat('extruder_offset_x1')
-                       y = profile.getPreferenceFloat('extruder_offset_y1')
+                       x = profile.getMachineSettingFloat('extruder_offset_x1')
+                       y = profile.getMachineSettingFloat('extruder_offset_y1')
                        gcode = gcodeGenerator.gcodeGenerator()
                        gcode.setExtrusionRate(profile.getProfileSettingFloat('nozzle_size') * 1.5, 0.2)
                        gcode.setPrintSpeed(25)
@@ -1078,7 +1171,7 @@ class headOffsetCalibrationPage(InfoPage):
                                n = int(self.textEntry.GetValue()) - 1
                        except:
                                return
-                       x = profile.getPreferenceFloat('extruder_offset_x1')
+                       x = profile.getMachineSettingFloat('extruder_offset_x1')
                        x += -1.0 + n * 0.1
                        profile.putPreference('extruder_offset_x1', '%0.2f' % (x))
                        self.infoBox.SetAttention('Which horizontal line number lays perfect on top of each other? Front most line is zero.')
@@ -1089,10 +1182,10 @@ class headOffsetCalibrationPage(InfoPage):
                                n = int(self.textEntry.GetValue()) - 1
                        except:
                                return
-                       y = profile.getPreferenceFloat('extruder_offset_y1')
+                       y = profile.getMachineSettingFloat('extruder_offset_y1')
                        y += -1.0 + n * 0.1
                        profile.putPreference('extruder_offset_y1', '%0.2f' % (y))
-                       self.infoBox.SetInfo('Calibration finished. Offsets are: %s %s' % (profile.getPreferenceFloat('extruder_offset_x1'), profile.getPreferenceFloat('extruder_offset_y1')))
+                       self.infoBox.SetInfo('Calibration finished. Offsets are: %s %s' % (profile.getMachineSettingFloat('extruder_offset_x1'), profile.getMachineSettingFloat('extruder_offset_y1')))
                        self.infoBox.SetReadyIndicator()
                        self._wizardState = 8
                        self.comm.close()