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 _computeEdges(self):
      if not self.hasFaceIndexedData():
          ## generate self._edges from self._faces
          nf = len(self._faces)
          edges = np.empty(nf * 3, dtype=[("i", np.uint, 2)])
          edges["i"][0:nf] = self._faces[:, :2]
          edges["i"][nf : 2 * nf] = self._faces[:, 1:3]
          edges["i"][-nf:, 0] = self._faces[:, 2]
          edges["i"][-nf:, 1] = self._faces[:, 0]
  
          # sort per-edge
          mask = edges["i"][:, 0] > edges["i"][:, 1]
          edges["i"][mask] = edges["i"][mask][:, ::-1]
  
          # remove duplicate entries
          self._edges = np.unique(edges)["i"]
          # print self._edges
      elif self._vertexesIndexedByFaces is not None:
          verts = self._vertexesIndexedByFaces
          edges = np.empty((verts.shape[0], 3, 2), dtype=np.uint)
          nf = verts.shape[0]
          edges[:, 0, 0] = np.arange(nf) * 3
          edges[:, 0, 1] = edges[:, 0, 0] + 1
          edges[:, 1, 0] = edges[:, 0, 1]
          edges[:, 1, 1] = edges[:, 1, 0] + 1
          edges[:, 2, 0] = edges[:, 1, 1]
          edges[:, 2, 1] = edges[:, 0, 0]
          self._edges = edges
      else:
          raise Exception(
              "MeshData cannot generate edges--no faces in this data."
          )
  
imports: import numpy
  from ..Qt import QtGui
label_desc: Use image node_id 22 for calling the MeshData obj's underlying member method code with example usage: obj._computeEdges() without return types