def getLargestCenterOutsetLoopFromLoop(loop, radius, thresholdRatio=0.9):
 if (radius == 0.0):
  return loop
 radius = abs(radius)
 points = getPointsFromLoop(loop, radius, thresholdRatio)
 centers = getCentersFromPoints(points, (globalIntercircleMultiplier * radius))
 largestCenterOutset = None
 largestOutsetArea = (-987654321.0)
 for center in centers:
  outset = getSimplifiedInsetFromClockwiseLoop(center, radius)
  if isLargeSameDirection(outset, center, radius):
   if (euclidean.isPathInsideLoop(loop, outset) != euclidean.isWiddershins(loop)):
    centerOutset = CenterOutset(center, outset)
    outsetArea = abs(euclidean.getAreaLoop(outset))
    if (outsetArea > largestOutsetArea):
     largestOutsetArea = outsetArea
     largestCenterOutset = centerOutset
 if (largestCenterOutset == None):
  return None
 largestCenterOutset.center = euclidean.getSimplifiedLoop(largestCenterOutset.center, radius)
 return largestCenterOutset

def getLargestCenterOutsetLoopFromLoop ( loop , radius , thresholdRatio = 0.9 ) : if ( radius == 0.0 ) : return loop radius = abs ( radius ) points = getPointsFromLoop ( loop , radius , thresholdRatio ) centers = getCentersFromPoints ( points , ( globalIntercircleMultiplier * radius ) ) largestCenterOutset = None largestOutsetArea = ( - 987654321.0 ) for center in centers : outset = getSimplifiedInsetFromClockwiseLoop ( center , radius ) if isLargeSameDirection ( outset , center , radius ) : if ( euclidean . isPathInsideLoop ( loop , outset ) != euclidean . isWiddershins ( loop ) ) : centerOutset = CenterOutset ( center , outset ) outsetArea = abs ( euclidean . getAreaLoop ( outset ) ) if ( outsetArea > largestOutsetArea ) : largestOutsetArea = outsetArea largestCenterOutset = centerOutset if ( largestCenterOutset == None ) : return None largestCenterOutset . center = euclidean . getSimplifiedLoop ( largestCenterOutset . center , radius ) return largestCenterOutset
get the largest circle outset loop from the loop .