def getFaceGivenLine(line, triangleMesh):
 faceGivenLine = face.Face()
 faceGivenLine.index = len(triangleMesh.faces)
 splitLine = line.split()
 for vertexStringIndex in xrange(1, 4):
  vertexString = splitLine[vertexStringIndex]
  vertexStringWithSpaces = vertexString.replace('/', ' ')
  vertexStringSplit = vertexStringWithSpaces.split()
  vertexIndex = (int(vertexStringSplit[0]) - 1)
  faceGivenLine.vertexIndexes.append(vertexIndex)
 return faceGivenLine

def getFaceGivenLine ( line , triangleMesh ) : faceGivenLine = face . Face ( ) faceGivenLine . index = len ( triangleMesh . faces ) splitLine = line . split ( ) for vertexStringIndex in xrange ( 1 , 4 ) : vertexString = splitLine [ vertexStringIndex ] vertexStringWithSpaces = vertexString . replace ( '/' , ' ' ) vertexStringSplit = vertexStringWithSpaces . split ( ) vertexIndex = ( int ( vertexStringSplit [ 0 ] ) - 1 ) faceGivenLine . vertexIndexes . append ( vertexIndex ) return faceGivenLine
add face given line index and lines .