code: def addIDs(self, asfield=False):
          
          ids = vtk.vtkIdFilter()
          ids.SetInputData(self.poly)
          ids.PointIdsOn()
          ids.CellIdsOn()
          if asfield:
              ids.FieldDataOn()
          else:
              ids.FieldDataOff()
          ids.Update()
          return self.updateMesh(ids.GetOutput())
docs: Generate point and cell ids.
  
          :param bool asfield: flag to control whether to generate scalar or field data.