def getFaceGivenLines(triangleMesh, vertexStartIndex, vertexIndexTable, vertexes):
 faceGivenLines = face.Face()
 faceGivenLines.index = len(triangleMesh.faces)
 for vertexIndex in xrange(vertexStartIndex, (vertexStartIndex + 3)):
  vertex = vertexes[vertexIndex]
  vertexUniqueIndex = len(vertexIndexTable)
  if (str(vertex) in vertexIndexTable):
   vertexUniqueIndex = vertexIndexTable[str(vertex)]
  else:
   vertexIndexTable[str(vertex)] = vertexUniqueIndex
   triangleMesh.vertexes.append(vertex)
  faceGivenLines.vertexIndexes.append(vertexUniqueIndex)
 return faceGivenLines

def getFaceGivenLines ( triangleMesh , vertexStartIndex , vertexIndexTable , vertexes ) : faceGivenLines = face . Face ( ) faceGivenLines . index = len ( triangleMesh . faces ) for vertexIndex in xrange ( vertexStartIndex , ( vertexStartIndex + 3 ) ) : vertex = vertexes [ vertexIndex ] vertexUniqueIndex = len ( vertexIndexTable ) if ( str ( vertex ) in vertexIndexTable ) : vertexUniqueIndex = vertexIndexTable [ str ( vertex ) ] else : vertexIndexTable [ str ( vertex ) ] = vertexUniqueIndex triangleMesh . vertexes . append ( vertex ) faceGivenLines . vertexIndexes . append ( vertexUniqueIndex ) return faceGivenLines
add face given line index and lines .