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
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
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