def getUniqueVertexes(loops):
 vertexDictionary = {}
 uniqueVertexes = []
 for loop in loops:
  for (vertexIndex, vertex) in enumerate(loop):
   vertexTuple = (vertex.x, vertex.y, vertex.z)
   if (vertexTuple in vertexDictionary):
    loop[vertexIndex] = vertexDictionary[vertexTuple]
   else:
    if (vertex.__class__ == Vector3Index):
     loop[vertexIndex].index = len(vertexDictionary)
    else:
     loop[vertexIndex] = Vector3Index(len(vertexDictionary), vertex.x, vertex.y, vertex.z)
    vertexDictionary[vertexTuple] = loop[vertexIndex]
    uniqueVertexes.append(loop[vertexIndex])
 return uniqueVertexes

def getUniqueVertexes ( loops ) : vertexDictionary = { } uniqueVertexes = [ ] for loop in loops : for ( vertexIndex , vertex ) in enumerate ( loop ) : vertexTuple = ( vertex . x , vertex . y , vertex . z ) if ( vertexTuple in vertexDictionary ) : loop [ vertexIndex ] = vertexDictionary [ vertexTuple ] else : if ( vertex . __class__ == Vector3Index ) : loop [ vertexIndex ] . index = len ( vertexDictionary ) else : loop [ vertexIndex ] = Vector3Index ( len ( vertexDictionary ) , vertex . x , vertex . y , vertex . z ) vertexDictionary [ vertexTuple ] = loop [ vertexIndex ] uniqueVertexes . append ( loop [ vertexIndex ] ) return uniqueVertexes
get unique vertexes .