diff --git a/SkeinPyPy_NewUI/newui/configBase.py b/SkeinPyPy_NewUI/newui/configBase.py index 0f939de3..f1a66421 100644 --- a/SkeinPyPy_NewUI/newui/configBase.py +++ b/SkeinPyPy_NewUI/newui/configBase.py @@ -1,7 +1,7 @@ from __future__ import absolute_import import __init__ -import wx, os, platform, types +import wx, os, sys, platform, types from fabmetheus_utilities import settings @@ -18,7 +18,7 @@ class configWindowBase(wx.Frame): super(configWindowBase, self).__init__(None, title=title) self.settingControlList = [] - + #Create the popup window self.popup = wx.PopupWindow(self, wx.BORDER_SIMPLE) self.popup.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INFOBK)) @@ -27,7 +27,10 @@ class configWindowBase(wx.Frame): self.popup.sizer = wx.BoxSizer() self.popup.sizer.Add(self.popup.text, flag=wx.EXPAND|wx.ALL, border=1) self.popup.SetSizer(self.popup.sizer) - + + self.popup.Bind(wx.EVT_MOTION, self.OnPopupHide) + self.popup.text.Bind(wx.EVT_MOTION, self.OnPopupHide) + def CreateConfigTab(self, nb, name): leftConfigPanel, rightConfigPanel, configPanel = self.CreateConfigPanel(nb) nb.AddPage(configPanel, name) @@ -48,7 +51,7 @@ class configWindowBase(wx.Frame): leftConfigPanel.main = self rightConfigPanel.main = self return leftConfigPanel, rightConfigPanel, configPanel - + def OnPopupDisplay(self, setting): self.popup.setting = setting self.UpdatePopup(setting) @@ -125,6 +128,12 @@ class SettingRow(): self.ctrl.Bind(wx.EVT_ENTER_WINDOW, lambda e: panel.main.OnPopupDisplay(self)) self.ctrl.Bind(wx.EVT_LEAVE_WINDOW, panel.main.OnPopupHide) + #MacOS X doesn't get EVT_ENTER/LEAVE_WINDOW for controls. So we use the motion event then. This results in slightly less good popups, but it works. + if sys.platform == 'darwin': + self.ctrl.Bind(wx.EVT_MOTION, lambda e: panel.main.OnPopupDisplay(self)) + + self.defaultBGColour = self.ctrl.GetBackgroundColour() + panel.main.settingControlList.append(self) sizer.Add(self.label, (x,y), flag=wx.ALIGN_CENTER_VERTICAL) @@ -151,7 +160,7 @@ class SettingRow(): elif result == validators.WARNING: self.ctrl.SetBackgroundColour('Yellow') else: - self.ctrl.SetBackgroundColour(wx.NullColour) + self.ctrl.SetBackgroundColour(self.defaultBGColour) self.ctrl.Refresh() self.validationMsg = '\n'.join(msgs) diff --git a/SkeinPyPy_NewUI/newui/mainWindow.py b/SkeinPyPy_NewUI/newui/mainWindow.py index e1cc265b..960a0ff6 100644 --- a/SkeinPyPy_NewUI/newui/mainWindow.py +++ b/SkeinPyPy_NewUI/newui/mainWindow.py @@ -110,6 +110,7 @@ class mainWindow(configBase.configWindowBase): configBase.TitleRow(right, "Filament") c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter', '2.89', 'Diameter of your filament, as accurately as possible.\nIf you cannot measure this value you will have to callibrate it, a higher number means less extrusion, a smaller number generates more extrusion.') validators.validFloat(c, 1.0) + validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") c = configBase.SettingRow(right, "Packing Density", 'filament_density', '1.00', 'Packing density of your filament. This should be 1.00 for PLA and 0.85 for ABS') validators.validFloat(c, 0.5, 1.5) @@ -239,6 +240,7 @@ class mainWindow(configBase.configWindowBase): def OnFirstRunWizard(self, e): configWizard.configWizard() + self.updateProfileToControls() def OnLoadSTL(self, e): dlg=wx.FileDialog(self, "Open file to print", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) diff --git a/SkeinPyPy_NewUI/newui/preview3d.py b/SkeinPyPy_NewUI/newui/preview3d.py index f3f3ade8..537ba329 100644 --- a/SkeinPyPy_NewUI/newui/preview3d.py +++ b/SkeinPyPy_NewUI/newui/preview3d.py @@ -113,6 +113,7 @@ class previewPanel(wx.Panel): triangleMesh.origonalVertexes = list(triangleMesh.vertexes) for i in xrange(0, len(triangleMesh.origonalVertexes)): triangleMesh.origonalVertexes[i] = triangleMesh.origonalVertexes[i].copy() + triangleMesh.getMinimumZ() self.triangleMesh = triangleMesh self.gcode = None self.updateModelTransform() diff --git a/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode b/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode index 563b42f5..7db5699c 100644 --- a/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode +++ b/SkeinPyPy_NewUI/skeinforge_application/alterations/start.gcode @@ -9,7 +9,6 @@ G28 Z0 ;move Z to min endstops ; height of the nozzle in mm. This can take some messing around ; with to get just right... G92 X0 Y0 Z0 E0 ;reset software position to front/left/z=0.0 -G21 G1 Z15.0 F400 ;move the platform down 15mm G92 E0 ;zero the extruded length diff --git a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py index 42c6856c..cd6ba5bf 100644 --- a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py +++ b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py @@ -134,7 +134,6 @@ class JorisSkein: if len(splitLine) < 1: return firstWord = splitLine[0] - print 'joris:' + firstWord if firstWord == 'G1': self.feedRateMinute = gcodec.getFeedRateMinute(self.feedRateMinute, splitLine) location = gcodec.getLocationFromSplitLine(self.oldLocation, splitLine)