class_docstr: Class for storing and operating on 3D mesh data. May contain:
  
    - list of vertex locations
    - list of edges
    - list of triangles
    - colors per vertex, edge, or tri
    - normals per vertex or tri
  
  This class handles conversion between the standard [list of vertexes, list of faces]
  format (suitable for use with glDrawElements) and 'indexed' [list of vertexes] format
  (suitable for use with glDrawArrays). It will automatically compute face normal
  vectors as well as averaged vertex normal vectors. 
  
  The class attempts to be as efficient as possible in caching conversion results and
  avoiding unnecessary conversions.
class_docstr_tok: ["Class","for","storing","and","operating","on","3D","mesh","data",".","May","contain",":","-","list","of","vertex","locations","-","list","of","edges","-","list","of","triangles","-","colors","per","vertex",",","edge",",","or","tri","-","normals","per","vertex","or","tri","This","class","handles","conversion","between","the","standard","[","list","of","vertexes",",","list","of","faces","]","format","(","suitable","for","use","with","glDrawElements",")","and","'indexed","'","[","list","of","vertexes","]","format","(","suitable","for","use","with","glDrawArrays",")",".","It","will","automatically","compute","face","normal","vectors","as","well","as","averaged","vertex","normal","vectors",".","The","class","attempts","to","be","as","efficient","as","possible","in","caching","conversion","results","and","avoiding","unnecessary","conversions","."]
code: def _computeUnindexedVertexes(self):
      ## Given (Nv, 3, 3) array of vertexes-indexed-by-face, convert backward to unindexed vertexes
      ## This is done by collapsing into a list of 'unique' vertexes (difference < 1e-14)
  
      ## I think generally this should be discouraged..
      faces = self._vertexesIndexedByFaces
      verts = {}  ## used to remember the index of each vertex position
      self._faces = np.empty(faces.shape[:2], dtype=np.uint)
      self._vertexes = []
      self._vertexFaces = []
      self._faceNormals = None
      self._vertexNormals = None
      for i in range(faces.shape[0]):
          face = faces[i]
          for j in range(face.shape[0]):
              pt = face[j]
              pt2 = tuple(
                  [round(x * 1e14) for x in pt]
              )  ## quantize to be sure that nearly-identical points will be merged
              index = verts.get(pt2, None)
              if index is None:
                  # self._vertexes.append(QtGui.QVector3D(*pt))
                  self._vertexes.append(pt)
                  self._vertexFaces.append([])
                  index = len(self._vertexes) - 1
                  verts[pt2] = index
              self._vertexFaces[index].append(
                  i
              )  # keep track of which vertexes belong to which faces
              self._faces[i, j] = index
      self._vertexes = np.array(self._vertexes, dtype=np.float32)
  
imports: import numpy
  from ..Qt import QtGui
label_desc: Use image node_id 20 for calling the MeshData obj's underlying member method code with example usage: obj._computeUnindexedVertexes() without return types