def getHorizontalSegmentListsFromLoopLists(alreadyFilledArounds, front, numberOfLines, rotatedFillLoops, width):
 xIntersectionIndexLists = []
 yList = []
 frontOverWidth = getFrontOverWidthAddXListYList(front, alreadyFilledArounds, numberOfLines, xIntersectionIndexLists, width, yList)
 addXIntersectionIndexesFromLoops(frontOverWidth, rotatedFillLoops, (-1), xIntersectionIndexLists, width, yList)
 horizontalSegmentLists = []
 for xIntersectionIndexListIndex in xrange(len(xIntersectionIndexLists)):
  xIntersectionIndexList = xIntersectionIndexLists[xIntersectionIndexListIndex]
  lineSegments = getSegmentsFromXIntersectionIndexes(xIntersectionIndexList, yList[xIntersectionIndexListIndex])
  horizontalSegmentLists.append(lineSegments)
 return horizontalSegmentLists

def getHorizontalSegmentListsFromLoopLists ( alreadyFilledArounds , front , numberOfLines , rotatedFillLoops , width ) : xIntersectionIndexLists = [ ] yList = [ ] frontOverWidth = getFrontOverWidthAddXListYList ( front , alreadyFilledArounds , numberOfLines , xIntersectionIndexLists , width , yList ) addXIntersectionIndexesFromLoops ( frontOverWidth , rotatedFillLoops , ( - 1 ) , xIntersectionIndexLists , width , yList ) horizontalSegmentLists = [ ] for xIntersectionIndexListIndex in xrange ( len ( xIntersectionIndexLists ) ) : xIntersectionIndexList = xIntersectionIndexLists [ xIntersectionIndexListIndex ] lineSegments = getSegmentsFromXIntersectionIndexes ( xIntersectionIndexList , yList [ xIntersectionIndexListIndex ] ) horizontalSegmentLists . append ( lineSegments ) return horizontalSegmentLists
get horizontal segment lists inside loops .