def addFacesGivenBinary(stlData, triangleMesh, vertexIndexTable):
 numberOfVertexes = ((len(stlData) - 84) / 50)
 vertexes = []
 for vertexIndex in xrange(numberOfVertexes):
  byteIndex = (84 + (vertexIndex * 50))
  vertexes.append(getVertexGivenBinary((byteIndex + 12), stlData))
  vertexes.append(getVertexGivenBinary((byteIndex + 24), stlData))
  vertexes.append(getVertexGivenBinary((byteIndex + 36), stlData))
 addFacesGivenVertexes(triangleMesh, vertexIndexTable, vertexes)

def addFacesGivenBinary ( stlData , triangleMesh , vertexIndexTable ) : numberOfVertexes = ( ( len ( stlData ) - 84 ) / 50 ) vertexes = [ ] for vertexIndex in xrange ( numberOfVertexes ) : byteIndex = ( 84 + ( vertexIndex * 50 ) ) vertexes . append ( getVertexGivenBinary ( ( byteIndex + 12 ) , stlData ) ) vertexes . append ( getVertexGivenBinary ( ( byteIndex + 24 ) , stlData ) ) vertexes . append ( getVertexGivenBinary ( ( byteIndex + 36 ) , stlData ) ) addFacesGivenVertexes ( triangleMesh , vertexIndexTable , vertexes )
add faces given stl binary .