code: def loadOFF(filename, c="gold", alpha=1, wire=False, bc=None):
      
      if not os.path.exists(filename):
          colors.printc("~noentry Error in loadOFF: Cannot find", filename, c=1)
          return None
  
      f = open(filename, "r")
      lines = f.readlines()
      f.close()
  
      vertices = []
      faces = []
      NumberOfVertices = None
      i = -1
      for text in lines:
          if len(text) == 0:
              continue
          if text == '\n':
              continue
          if "#" in text:
              continue
          if "OFF" in text:
              continue
  
          ts = text.split()
          n = len(ts)
  
          if not NumberOfVertices and n > 1:
              NumberOfVertices, NumberOfFaces = int(ts[0]), int(ts[1])
              continue
          i += 1
  
          if i < NumberOfVertices and n == 3:
              x, y, z = float(ts[0]), float(ts[1]), float(ts[2])
              vertices.append([x, y, z])
  
          ids = []
          if NumberOfVertices <= i < (NumberOfVertices + NumberOfFaces + 1) and n > 2:
              ids += [int(x) for x in ts[1:]]
              faces.append(ids)
  
      return Actor(buildPolyData(vertices, faces), c, alpha, wire, bc)
docs: Read OFF file format.