def getLoopsFromCorrectMesh(edges, faces, vertexes, z):
 remainingEdgeTable = getRemainingEdgeTable(edges, vertexes, z)
 remainingValues = remainingEdgeTable.values()
 for edge in remainingValues:
  if (len(edge.faceIndexes) < 2):
   print 'This should never happen, there is a hole in the triangle mesh, each edge should have two faces.'
   print edge
   print 'Something will still be printed, but there is no guarantee that it will be the correct shape.'
   print 'Once the gcode is saved, you should check over the layer with a z of:'
   print z
   return []
 loops = []
 while isPathAdded(edges, faces, loops, remainingEdgeTable, vertexes, z):
  pass
 if euclidean.isLoopListIntersecting(loops):
  print 'Warning, the triangle mesh slice intersects itself in getLoopsFromCorrectMesh in triangle_mesh.'
  print 'Something will still be printed, but there is no guarantee that it will be the correct shape.'
  print 'Once the gcode is saved, you should check over the layer with a z of:'
  print z
  return []
 return loops

def getLoopsFromCorrectMesh ( edges , faces , vertexes , z ) : remainingEdgeTable = getRemainingEdgeTable ( edges , vertexes , z ) remainingValues = remainingEdgeTable . values ( ) for edge in remainingValues : if ( len ( edge . faceIndexes ) < 2 ) : print 'This should never happen, there is a hole in the triangle mesh, each edge should have two faces.' print edge print 'Something will still be printed, but there is no guarantee that it will be the correct shape.' print 'Once the gcode is saved, you should check over the layer with a z of:' print z return [ ] loops = [ ] while isPathAdded ( edges , faces , loops , remainingEdgeTable , vertexes , z ) : pass if euclidean . isLoopListIntersecting ( loops ) : print 'Warning, the triangle mesh slice intersects itself in getLoopsFromCorrectMesh in triangle_mesh.' print 'Something will still be printed, but there is no guarantee that it will be the correct shape.' print 'Once the gcode is saved, you should check over the layer with a z of:' print z return [ ] return loops
get loops from a carve of a correct mesh .