From 351bb29ade66bed0b3b147cd790293d206127c95 Mon Sep 17 00:00:00 2001 From: Daid Date: Sun, 11 Mar 2012 11:56:50 +0100 Subject: [PATCH] Fixed flip options, added show log when slicing fails, fixed bug in comb module --- SkeinPyPy_NewUI/newui/sliceProgessPanel.py | 10 +++++----- .../skeinforge_plugins/craft_plugins/carve.py | 6 +++--- .../skeinforge_plugins/craft_plugins/comb.py | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/SkeinPyPy_NewUI/newui/sliceProgessPanel.py b/SkeinPyPy_NewUI/newui/sliceProgessPanel.py index 9506e152..1dd2dc06 100644 --- a/SkeinPyPy_NewUI/newui/sliceProgessPanel.py +++ b/SkeinPyPy_NewUI/newui/sliceProgessPanel.py @@ -74,18 +74,18 @@ class sliceProgessPanel(wx.Panel): def OnSliceDone(self, result): self.progressGauge.Destroy() self.progressLog = result.progressLog + self.sizer.Remove(self.abortButton) + self.logButton = wx.Button(self, -1, "Show Log") + self.Bind(wx.EVT_BUTTON, self.OnShowLog, self.logButton) + self.sizer.Add(self.logButton, 0) if result.returnCode == 0: self.statusText.SetLabel("Ready.") - self.logButton = wx.Button(self, -1, "Show Log") - self.Bind(wx.EVT_BUTTON, self.OnShowLog, self.logButton) self.showButton = wx.Button(self, -1, "Show GCode") self.Bind(wx.EVT_BUTTON, self.OnShowGCode, self.showButton) - self.sizer.Remove(self.abortButton) - self.sizer.Add(self.logButton, 0) self.sizer.Add(self.showButton, 0) - self.sizer.Add(self.abortButton, 0) else: self.statusText.SetLabel("Something went wrong during slicing!") + self.sizer.Add(self.abortButton, 0) self.sizer.Layout() self.Layout() self.abort = True diff --git a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py index cb2a5ec3..5a01edeb 100644 --- a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py +++ b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py @@ -204,11 +204,11 @@ class CarveSkein: scaleX = scale scaleY = scale scaleZ = scale - if repository.flipX.value == 'True': + if repository.flipX.value == True: scaleX = -scaleX - if repository.flipY.value == 'True': + if repository.flipY.value == True: scaleY = -scaleY - if repository.flipZ.value == 'True': + if repository.flipZ.value == True: scaleZ = -scaleZ mat00 = math.cos(rotate) * scaleX mat01 =-math.sin(rotate) * scaleY diff --git a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py index 8ca5e2d2..a817f52b 100644 --- a/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py +++ b/SkeinPyPy_NewUI/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py @@ -141,12 +141,11 @@ class BoundarySegment: def getSegment(self, boundarySegmentIndex, boundarySegments, edgeWidth, runningJumpSpace): 'Get both paths along the loop from the point closest to the begin to the point closest to the end.' - negativeEdgeWidth = -edgeWidth nextBoundarySegment = boundarySegments[boundarySegmentIndex + 1] nextBegin = nextBoundarySegment.segment[0] end = getJumpPointIfInside(self.boundary, nextBegin, edgeWidth, runningJumpSpace) if end == None: - end = self.boundary.segment[1] + end = self.segment[1] nextBegin = getJumpPointIfInside(nextBoundarySegment.boundary, end, edgeWidth, runningJumpSpace) if nextBegin != None: nextBoundarySegment.segment[0] = nextBegin -- 2.30.2