def addTailoredLoopPath(self, line): "Add a clipped loop path." if self.clipLength > 0.0: removeTable = {} euclidean.addLoopToPixelTable(self.loopPath.path, removeTable, self.layerPixelWidth) euclidean.removePixelTableFromPixelTable(removeTable, self.layerPixelTable) self.loopPath.path = euclidean.getClippedSimplifiedLoopPath( self.clipLength, self.loopPath.path, self.edgeWidth) euclidean.addLoopToPixelTable(self.loopPath.path, self.layerPixelTable, self.layerPixelWidth) if self.oldWiddershins == None: self.addGcodeFromThreadZ(self.loopPath.path, self.loopPath.z) else: if self.oldWiddershins != euclidean.isWiddershins( self.loopPath.path): self.loopPath.path.reverse() for point in self.loopPath.path: self.distanceFeedRate.addGcodeMovementZWithFeedRate( self.feedRateMinute, point, self.loopPath.z) if self.getNextThreadIsACloseLoop(self.loopPath.path): self.oldConnectionPoint = self.loopPath.path[-1] self.oldWiddershins = euclidean.isWiddershins(self.loopPath.path) else: self.oldConnectionPoint = None self.oldWiddershins = None self.distanceFeedRate.addLine(line) self.loopPath = None
def addTailoredLoopPath(self, line): "Add a clipped loop path." if self.clipLength > 0.0: removeTable = {} euclidean.addLoopToPixelTable(self.loopPath.path, removeTable, self.layerPixelWidth) euclidean.removePixelTableFromPixelTable(removeTable, self.layerPixelTable) self.loopPath.path = euclidean.getClippedSimplifiedLoopPath( self.clipLength, self.loopPath.path, self.perimeterWidth ) euclidean.addLoopToPixelTable(self.loopPath.path, self.layerPixelTable, self.layerPixelWidth) if self.oldWiddershins is None: self.addGcodeFromThreadZ(self.loopPath.path, self.loopPath.z) else: if self.oldWiddershins != euclidean.isWiddershins(self.loopPath.path): self.loopPath.path.reverse() for point in self.loopPath.path: self.distanceFeedRate.addGcodeMovementZWithFeedRate(self.feedRateMinute, point, self.loopPath.z) if self.getNextThreadIsACloseLoop(self.loopPath.path): self.oldConnectionPoint = self.loopPath.path[-1] self.oldWiddershins = euclidean.isWiddershins(self.loopPath.path) else: self.oldConnectionPoint = None self.oldWiddershins = None self.distanceFeedRate.addLine(line) self.loopPath = None
def getClippedSimplifiedLoopPathByLoop(self, loop): 'Get clipped and simplified loop path from a loop.' if len(loop) == 0: return [] loopPath = loop + [loop[0]] return euclidean.getClippedSimplifiedLoopPath(self.clipLength, loopPath, self.halfEdgeWidth)
def getClippedSimplifiedLoopPathByLoop(self, loop): 'Get clipped and simplified loop path from a loop.' if len(loop) == 0: return [] loopPath = loop + [loop[0]] return euclidean.getClippedSimplifiedLoopPath(self.clipLength, loopPath, self.halfPerimeterWidth)
def getClippedSimplifiedLoopPathByLoop(self, loop): 'Get clipped and simplified loop path from a loop.' loopPath = loop + [loop[0]] return euclidean.getClippedSimplifiedLoopPath(self.clipLength, loopPath, self.halfPerimeterWidth)