def getBridgeDirection(belowLoops, layerLoops, radius):
 if (len(belowLoops) < 1):
  return None
 belowOutsetLoops = intercircle.getInsetLoopsFromLoops(belowLoops, (- radius))
 bridgeRotation = complex()
 for loop in layerLoops:
  for (pointIndex, point) in enumerate(loop):
   previousIndex = (((pointIndex + len(loop)) - 1) % len(loop))
   bridgeRotation += getOverhangDirection(belowOutsetLoops, loop[previousIndex], point)
 if (abs(bridgeRotation) < (0.75 * radius)):
  return None
 else:
  return cmath.sqrt((bridgeRotation / abs(bridgeRotation)))

def getBridgeDirection ( belowLoops , layerLoops , radius ) : if ( len ( belowLoops ) < 1 ) : return None belowOutsetLoops = intercircle . getInsetLoopsFromLoops ( belowLoops , ( - radius ) ) bridgeRotation = complex ( ) for loop in layerLoops : for ( pointIndex , point ) in enumerate ( loop ) : previousIndex = ( ( ( pointIndex + len ( loop ) ) - 1 ) % len ( loop ) ) bridgeRotation += getOverhangDirection ( belowOutsetLoops , loop [ previousIndex ] , point ) if ( abs ( bridgeRotation ) < ( 0.75 * radius ) ) : return None else : return cmath . sqrt ( ( bridgeRotation / abs ( bridgeRotation ) ) )
get span direction for the majority of the overhanging extrusion perimeter .