Python: module fabmetheus_utilities.intercircle

fabmetheus_utilities.intercircle ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/fabmetheus_utilities/intercircle.py

`Intercircle is a collection of utilities for intersecting circles, used to get smooth loops around a collection of points and inset & outset loops.`

Modules

``

__init__ | fabmetheus_utilities.euclidean | math |

Classes

``

BoundingLoop
CenterOutset
CircleIntersection
CircleNode

class BoundingLoop
`` | `A class to hold a bounding loop composed of a minimum complex, a maximum complex and an outset loop. `

Methods defined here:

__eq__(self, other)
  `Determine whether this bounding loop is identical to other one.`

__repr__(self)
  `Get the string representation of this bounding loop.`

getFromLoop(self, loop)
  `Get the bounding loop from a path.`

getOutsetBoundingLoop(self, outsetDistance)
  `Outset the bounding rectangle and loop by a distance.`

isEntirelyInsideAnother(self, anotherBoundingLoop)
  `Determine if this bounding loop is entirely inside another bounding loop.`

isOverlappingAnother(self, anotherBoundingLoop)
  `Determine if this bounding loop is intersecting another bounding loop.`

isOverlappingAnotherInList(self, boundingLoops)
  `Determine if this bounding loop is intersecting another bounding loop in a list.`

isRectangleMissingAnother(self, anotherBoundingLoop)
  `Determine if the rectangle of this bounding loop is missing the rectangle of another bounding loop.`

class CenterOutset
`` | `A class to hold a center and an outset. `

Methods defined here:

__init__(self, center, outset)
  `Set the center and outset.`

__repr__(self)
  `Get the string representation of this CenterOutset.`

class CircleIntersection
`` | `An intersection of two complex circles. `

Methods defined here:

__init__(self, circleNodeAhead, index, circleNodeBehind)

__repr__(self)
  `Get the string representation of this CircleIntersection.`

addToList(self, circleIntersectionPath)
  `Add this to the circle intersection path, setting stepped on to be true.`

getAbsolutePosition(self)
  `Get the absolute position.`

getCircleIntersectionAhead(self)
  `Get the first circle intersection on the circle node ahead.`

isWithinCircles(self, pixelTable)
  `Determine if this circle intersection is within the circle node circles.`

class CircleNode
`` | `A complex node of complex circle intersections. `

Methods defined here:

__init__(self, oneOverRadius, point)

__repr__(self)
  `Get the string representation of this CircleNode.`

getWithinNodes(self, pixelTable)
  `Get the nodes this circle node is within.`

Functions

``

addCircleIntersectionLoop(circleIntersectionLoop, circleIntersections)
  `Add a circle intersection loop.`

addEndCap(begin, end, points, radius)
  `Get circular end cap.`

addHalfPath(path, points, radius, thresholdRatio=0.9)
  `Add the points from every point on a half path and between points.`

addInsetPointFromClockwiseTriple(begin, center, end, loop, radius)
  `Get inset point with possible intersection from clockwise triple, out from widdershins loop.`

addOrbits(distanceFeedRate, loop, orbitalFeedRatePerSecond, temperatureChangeTime, z)
  `Add orbits with the extruder off.`

addOrbitsIfLarge(distanceFeedRate, loop, orbitalFeedRatePerSecond, temperatureChangeTime, z)
  `Add orbits with the extruder off if the orbits are large enough.`

addPointsFromSegment(pointBegin, pointEnd, points, radius, thresholdRatio=0.9)
  `Add point complexes between the endpoints of a segment.`

directLoop(isWiddershins, loop)
  `Direct the loop.`

directLoopLists(isWiddershins, loopLists)
  `Direct the loop lists.`

directLoops(isWiddershins, loops)
  `Direct the loops.`

getAroundsFromLoop(loop, radius, thresholdRatio=0.9)
  `Get the arounds from the loop.`

getAroundsFromLoops(loops, radius, thresholdRatio=0.9)
  `Get the arounds from the loops.`

getAroundsFromPath(path, radius, thresholdRatio=0.9)
  `Get the arounds from the path.`

getAroundsFromPathPoints(points, radius, thresholdRatio=0.9)
  `Get the arounds from the path.`

getAroundsFromPaths(paths, radius, thresholdRatio=0.9)
  `Get the arounds from the path.`

getAroundsFromPoints(points, radius)
  `Get the arounds from the points.`

getCentersFromCircleNodes(circleNodes, radius)
  `Get the complex centers of the circle intersection loops from circle nodes.`

getCentersFromIntersectionLoop(circleIntersectionLoop, radius)
  `Get the centers from the intersection loop.`

getCentersFromIntersectionLoops(circleIntersectionLoops, radius)
  `Get the centers from the intersection loops.`

getCentersFromLoop(loop, radius)
  `Get the centers of the loop.`

getCentersFromLoopDirection(isWiddershins, loop, radius)
  `Get the centers of the loop which go around in the given direction.`

getCentersFromPoints(points, radius)
  `Get the centers from the points.`

getCircleIntersectionLoops(circleIntersections)
  `Get all the loops going through the circle intersections.`

getCircleIntersectionsFromCircleNodes(circleNodes)
  `Get all the circle intersections which exist between all the circle nodes.`

getCircleNodesFromLoop(loop, radius, thresholdRatio=0.9)
  `Get the circle nodes from every point on a loop and between points.`

getCircleNodesFromPoints(points, radius)
  `Get the circle nodes from a path.`

getInsetLoopsFromLoop(loop, radius, thresholdRatio=0.9)
  `Get the inset loops, which might overlap.`

getInsetLoopsFromLoops(loops, radius)
  `Get the inset loops, which might overlap.`

getInsetLoopsFromVector3Loop(loop, radius, thresholdRatio=0.9)
  `Get the inset loops from vector3 loop, which might overlap.`

getInsetSeparateLoopsFromAroundLoops(loops, radius, radiusAround, thresholdRatio=0.9)
  `Get the separate inset loops.`

getInsetSeparateLoopsFromLoops(loops, radius, thresholdRatio=0.9)
  `Get the separate inset loops.`

getIsLarge(loop, radius)
  `Determine if the loop is large enough.`

getLargestCenterOutsetLoopFromLoop(loop, radius, thresholdRatio=0.9)
  `Get the largest circle outset loop from the loop.`

getLargestCenterOutsetLoopFromLoopRegardless(loop, radius)
  `Get the largest circle outset loop from the loop, even if the radius has to be shrunk and even if there is still no outset loop.`

getLargestInsetLoopFromLoop(loop, radius)
  `Get the largest inset loop from the loop.`

getLargestInsetLoopFromLoopRegardless(loop, radius)
  `Get the largest inset loop from the loop, even if the radius has to be shrunk and even if there is still no inset loop.`

getLoopsFromLoopsDirection(isWiddershins, loops)
  `Get the loops going round in a given direction.`

getPointsFromLoop(loop, radius, thresholdRatio=0.9)
  `Get the points from every point on a loop and between points.`

getPointsFromLoops(loops, radius, thresholdRatio=0.9)
  `Get the points from every point on a loop and between points.`

getPointsFromPath(path, radius, thresholdRatio=0.9)
  `Get the points from every point on a path and between points.`

getSimplifiedInsetFromClockwiseLoop(loop, radius)
  `Get loop inset from clockwise loop, out from widdershins loop.`

getWiddershinsByLength(begin, end, length)
  `Get the widdershins by length.`

getWithoutIntersections(loop)
  `Get loop without intersections.`

isLargeSameDirection(inset, loop, radius)
  `Determine if the inset is in the same direction as the loop and it is large enough.`

isLoopIntersectingLoop(anotherLoop, loop)
  `Determine if the a loop is intersecting another loop.`

orbitsAreLarge(loop, temperatureChangeTime)
  `Determine if the orbits are large enough.`

removeIntersection(loop)
  `Get loop without the first intersection.`

Data

``

__author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/21/04 $'
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)
globalDecreasingRadiusMultipliers = [1.0, 0.55, 0.35, 0.2]
globalIntercircleMultiplier = 1.04

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)