def getLoopsFromUnprovenMesh(edges, faces, importRadius, vertexes, z):
 edgePairTable = {}
 corners = []
 remainingEdgeTable = getRemainingEdgeTable(edges, vertexes, z)
 remainingEdgeTableKeys = remainingEdgeTable.keys()
 for remainingEdgeIndexKey in remainingEdgeTable:
  edge = remainingEdgeTable[remainingEdgeIndexKey]
  carveIntersection = getCarveIntersectionFromEdge(edge, vertexes, z)
  corners.append(carveIntersection)
  for edgeFaceIndex in edge.faceIndexes:
   face = faces[edgeFaceIndex]
   for edgeIndex in face.edgeIndexes:
    addEdgePair(edgePairTable, edges, edgeIndex, remainingEdgeIndexKey, remainingEdgeTable)
 allPoints = corners[:]
 for edgePairValue in edgePairTable.values():
  addPointsAtZ(edgePairValue, allPoints, importRadius, vertexes, z)
 pointTable = {}
 return getDescendingAreaLoops(allPoints, corners, importRadius)

def getLoopsFromUnprovenMesh ( edges , faces , importRadius , vertexes , z ) : edgePairTable = { } corners = [ ] remainingEdgeTable = getRemainingEdgeTable ( edges , vertexes , z ) remainingEdgeTableKeys = remainingEdgeTable . keys ( ) for remainingEdgeIndexKey in remainingEdgeTable : edge = remainingEdgeTable [ remainingEdgeIndexKey ] carveIntersection = getCarveIntersectionFromEdge ( edge , vertexes , z ) corners . append ( carveIntersection ) for edgeFaceIndex in edge . faceIndexes : face = faces [ edgeFaceIndex ] for edgeIndex in face . edgeIndexes : addEdgePair ( edgePairTable , edges , edgeIndex , remainingEdgeIndexKey , remainingEdgeTable ) allPoints = corners [ : ] for edgePairValue in edgePairTable . values ( ) : addPointsAtZ ( edgePairValue , allPoints , importRadius , vertexes , z ) pointTable = { } return getDescendingAreaLoops ( allPoints , corners , importRadius )
get loops from a carve of an unproven mesh .