def getCircleNodesFromPoints(points, radius): 'Get the circle nodes from a path.' circleNodes = [] oneOverRadius = 1.000001 / radius # to avoid problem of accidentally integral radius points = euclidean.getAwayPoints(points, radius) for point in points: circleNodes.append(CircleNode(oneOverRadius, point)) return circleNodes
def getCircleNodesFromPoints(points, radius): "Get the circle nodes from a path." circleNodes = [] oneOverRadius = 1.0 / radius points = euclidean.getAwayPoints(points, 0.001 * radius) for point in points: circleNodes.append(CircleNode(point * oneOverRadius, len(circleNodes))) return circleNodes
def getCircleNodesFromPoints( points, radius ): "Get the circle nodes from a path." circleNodes = [] oneOverRadius = 1.0 / radius points = euclidean.getAwayPoints( points, 0.001 * radius ) for point in points: circleNodes.append( CircleNode( point * oneOverRadius, len( circleNodes ) ) ) return circleNodes
def getCircleNodesFromPoints(points, radius): 'Get the circle nodes from a path.' if radius == 0.0: print('Warning, radius is 0 in getCircleNodesFromPoints in intercircle.') print(points) return [] circleNodes = [] oneOverRadius = 1.000001 / radius # to avoid problem of accidentally integral radius points = euclidean.getAwayPoints(points, radius) for point in points: circleNodes.append(CircleNode(oneOverRadius, point)) return circleNodes
def addTailoredLoopPath( self ): "Add a clipped and jittered loop path." loop = self.loopPath.path[ : - 1 ] if self.beforeLoopLocation != None: if self.oldLoopLocationComplex != None: self.beforeLoopLocation = self.oldLoopLocationComplex perimeterHalfWidth = 0.5 * self.perimeterWidth loop = euclidean.getLoopStartingNearest( perimeterHalfWidth, self.beforeLoopLocation, loop ) if self.layerJitter != 0.0 and self.oldLoopLocationComplex == None: loop = getJitteredLoop( self.layerJitter, loop ) loop = euclidean.getAwayPoints( loop, 0.2 * self.perimeterWidth ) self.loopPath.path = loop + [ loop[ 0 ] ] self.addGcodeFromThreadZ( self.loopPath.path, self.loopPath.z ) self.oldLoopLocationComplex = loop[ 0 ] self.loopPath = None
def addTailoredLoopPath(self): "Add a clipped and jittered loop path." loop = self.loopPath.path[:-1] if self.beforeLoopLocation != None: if self.oldLoopLocationComplex != None: self.beforeLoopLocation = self.oldLoopLocationComplex perimeterHalfWidth = 0.5 * self.perimeterWidth loop = euclidean.getLoopStartingNearest(perimeterHalfWidth, self.beforeLoopLocation, loop) if self.layerJitter != 0.0 and self.oldLoopLocationComplex == None: loop = getJitteredLoop(self.layerJitter, loop) loop = euclidean.getAwayPoints(loop, 0.2 * self.perimeterWidth) self.loopPath.path = loop + [loop[0]] self.addGcodeFromThreadZ(self.loopPath.path, self.loopPath.z) self.oldLoopLocationComplex = loop[0] self.loopPath = None
def addTailoredLoopPath(self): 'Add a clipped and jittered loop path.' loop = getJitteredLoop(self.layerJitter, self.loopPath.path[: -1]) loop = euclidean.getAwayPoints(loop, 0.2 * self.edgeWidth) self.addGcodeFromThreadZ(loop + [loop[0]], self.loopPath.z) self.loopPath = None
def addTailoredLoopPath(self): 'Add a clipped and jittered loop path.' loop = getJitteredLoop(self.layerJitter, self.loopPath.path[:-1]) loop = euclidean.getAwayPoints(loop, 0.2 * self.perimeterWidth) self.addGcodeFromThreadZ(loop + [loop[0]], self.loopPath.z) self.loopPath = None