def getNextEdgeIndexAroundZ(edge, faces, remainingEdgeTable):
 for faceIndex in edge.faceIndexes:
  face = faces[faceIndex]
  for edgeIndex in face.edgeIndexes:
   if (edgeIndex in remainingEdgeTable):
    return edgeIndex
 return (-1)

def getNextEdgeIndexAroundZ ( edge , faces , remainingEdgeTable ) : for faceIndex in edge . faceIndexes : face = faces [ faceIndex ] for edgeIndex in face . edgeIndexes : if ( edgeIndex in remainingEdgeTable ) : return edgeIndex return ( - 1 )
get the next edge index in the mesh carve .