'Get loops from a carve of a correct mesh.'
remainingEdgeTable = getRemainingEdgeTable(edges, vertexes, z)
remainingValues = remainingEdgeTable.values()
+ error = False
for edge in remainingValues:
if len( edge.faceIndexes ) < 2:
- print('This should never happen, there is a hole in the triangle mesh, each edge should have two faces.')
- print(edge)
- print('Something will still be printed, but there is no guarantee that it will be the correct shape.' )
- print('Once the gcode is saved, you should check over the layer with a z of:')
- print(z)
- return []
+ if not hasattr(edge, 'errorReported'):
+ print('Model error(hole): ' + str(vertexes[edge.vertexIndexes[0]]) + ' ' + str(vertexes[edge.vertexIndexes[1]]))
+ edge.errorReported = True
+ error = True
+ if error:
+ return []
loops = []
while isPathAdded( edges, faces, loops, remainingEdgeTable, vertexes, z ):
pass
line = p.stdout.readline()
self.returnCode = p.wait()
self.gcodeFilename = self.filename[: self.filename.rfind('.')] + "_export.gcode"
+ logfile = open(self.filename[: self.filename.rfind('.')] + "_export.log", "w")
+ for logLine in self.progressLog:
+ logfile.write(logLine)
+ logfile.write('\n')
+ logfile.close()
wx.CallAfter(self.notifyWindow.OnSliceDone, self)
class LogWindow(wx.Frame):