+ if comment.startswith('LAYER:'):
+ currentPath = gcodePath(moveType, pathType, layerThickness, currentPath['points'][-1])
+ currentPath['extruder'] = currentExtruder
+ for path in currentLayer:
+ path['points'] = numpy.array(path['points'], numpy.float32)
+ path['extrusion'] = numpy.array(path['extrusion'], numpy.float32)
+ self.layerList.append(currentLayer)
+ if self.progressCallback is not None:
+ if self.progressCallback(float(gcodeFile.tell()) / float(self._fileSize)):
+ #Abort the loading, we can safely return as the results here will be discarded
+ gcodeFile.close()
+ return
+ currentLayer = [currentPath]