Exemple #1
0
 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
Exemple #2
0
 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
Exemple #3
0
 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)
Exemple #4
0
	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)
Exemple #5
0
	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)