def getLoopsBySegmentsDictionary(segmentsDictionary, width):
 points = []
 for endpoint in getVerticalEndpoints(segmentsDictionary, width, (0.1 * width), width):
  points.append(endpoint.point)
 for endpoint in euclidean.getEndpointsFromSegmentTable(segmentsDictionary):
  points.append(endpoint.point)
 return triangle_mesh.getDescendingAreaOrientedLoops(points, points, (width + width))

def getLoopsBySegmentsDictionary ( segmentsDictionary , width ) : points = [ ] for endpoint in getVerticalEndpoints ( segmentsDictionary , width , ( 0.1 * width ) , width ) : points . append ( endpoint . point ) for endpoint in euclidean . getEndpointsFromSegmentTable ( segmentsDictionary ) : points . append ( endpoint . point ) return triangle_mesh . getDescendingAreaOrientedLoops ( points , points , ( width + width ) )
get loops from a horizontal segments dictionary .