class_docstr: Wrapping of vtkCell.
  
  This class provides the capability to access a given cell topology and can
  be useful when walking through a cell's individual faces or investigating
  cell properties.
  
  Parameters
  ----------
  vtk_cell : vtk.vtkCell, optional
      The vtk object to wrap as Cell, that must be of ``vtk.vtkCell`` type.
  
  cell_type : int, optional
      VTK cell type. Determined from ``vtk_cell`` if not input.
  
  deep : bool, default: False
      Perform a deep copy of the original cell.
  
  Notes
  -----
  Accessing individual cells from a :class:`pyvista.DataSet` using this class
  will be much slower than accessing bulk data from the
  :attr:`pyvista.PolyData.faces` or :attr:`pyvista.UnstructuredGrid.cells` attributes.
  
  Also note that the cell object is a deep copy of the original cell and
  is unassociated with the original cell. Changing any data of
  that cell (for example, :attr:`pyvista.Cell.points`) will not change the original dataset.
  
  Examples
  --------
  Get the 0-th cell from a :class:`pyvista.PolyData`.
  
  >>> import pyvista as pv
  >>> mesh = pv.Sphere()
  >>> cell = mesh.get_cell(0)
  >>> cell  # doctest: +SKIP
  Cell (0x7fa760075a10)
    Type:       <CellType.TRIANGLE: 5>
    Linear:     True
    Dimension:  2
    N Points:   3
    N Faces:    0
    N Edges:    3
    X Bounds:   -5.406e-02, -5.551e-17
    Y Bounds:   0.000e+00, 1.124e-02
    Z Bounds:   -5.000e-01, -4.971e-01
  
  Get the 0-th cell from a :class:`pyvista.UnstructuredGrid`.
  
  >>> from pyvista import examples
  >>> mesh = examples.load_hexbeam()
  >>> cell = mesh.get_cell(0)
  >>> cell  # doctest: +SKIP
  Cell (0x7fdc71a3c210)
    Type:       <CellType.HEXAHEDRON: 12>
    Linear:     True
    Dimension:  3
    N Points:   8
    N Faces:    6
    N Edges:    12
    X Bounds:   0.000e+00, 5.000e-01
    Y Bounds:   0.000e+00, 5.000e-01
    Z Bounds:   0.000e+00, 5.000e-01
docstr: Cast this cell to PolyData.
  
  Can only be used for 0D, 1D, or 2D cells.
  
  Returns
  -------
  pyvista.PolyData
      This cell cast to a :class:`pyvista.PolyData`.
  
  Examples
  --------
  >>> from pyvista import examples
  >>> mesh = examples.load_sphere()
  >>> cell = mesh.get_cell(0)
  >>> grid = cell.cast_to_polydata()
  >>> grid  # doctest: +SKIP
  PolyData (0x7f09ae437b80)
    N Cells:    1
    N Points:   3
    N Strips:   0
     X Bounds:   0.000e+00, 1.000e+01
    Y Bounds:   0.000e+00, 2.500e+01
    Z Bounds:   -1.270e+02, -1.250e+02
    N Arrays:   0
docstr_tok: ["Cast","this","cell","to","PolyData",".","Can","only","be","used","for","0D",",","1D",",","or","2D","cells",".","Returns","--","--","--","-","pyvista.PolyData","This","cell","cast","to","a",":","class",":","`","pyvista.PolyData","`",".","Examples","--","--","--","--",">",">",">","from","pyvista","import","examples",">",">",">","mesh","=","examples.load_sphere","(",")",">",">",">","cell","=","mesh.get_cell","(","0",")",">",">",">","grid","=","cell.cast_to_polydata","(",")",">",">",">","grid","#","doctest",":","+SKIP","PolyData","(","0x7f09ae437b80",")","N","Cells",":","1","N","Points",":","3","N","Strips",":","0","X","Bounds",":","0.000e+00",",","1.000e+01","Y","Bounds",":","0.000e+00",",","2.500e+01","Z","Bounds",":","-1.270e+02",",","-1.250e+02","N","Arrays",":","0"]
code: def cast_to_polydata(self) -> pyvista.PolyData:
      """Cast this cell to PolyData.
  
      Can only be used for 0D, 1D, or 2D cells.
  
      Returns
      -------
      pyvista.PolyData
          This cell cast to a :class:`pyvista.PolyData`.
  
      Examples
      --------
      >>> from pyvista import examples
      >>> mesh = examples.load_sphere()
      >>> cell = mesh.get_cell(0)
      >>> grid = cell.cast_to_polydata()
      >>> grid  # doctest: +SKIP
      PolyData (0x7f09ae437b80)
        N Cells:    1
        N Points:   3
        N Strips:   0
         X Bounds:   0.000e+00, 1.000e+01
        Y Bounds:   0.000e+00, 2.500e+01
        Z Bounds:   -1.270e+02, -1.250e+02
        N Arrays:   0
  
      """
      cells = [len(self.point_ids)] + list(range(len(self.point_ids)))
      if self.dimension == 0:
          return pyvista.PolyData(self.points.copy(), verts=cells)
      if self.dimension == 1:
          return pyvista.PolyData(self.points.copy(), lines=cells)
      if self.dimension == 2:
          if self.type == CellType.TRIANGLE_STRIP:
              return pyvista.PolyData(self.points.copy(), strips=cells)
          else:
              return pyvista.PolyData(self.points.copy(), faces=cells)
      else:
          raise ValueError(
              f"3D cells cannot be cast to PolyData: got cell type {self.type}"
          )
  
imports: from __future__ import annotations
  from typing import List, Optional, Sequence, Tuple, Union, cast
  import numpy
  import pyvista
  from .None import _vtk_core
  from ._typing_core import Matrix, NumpyArray, Vector
  from .celltype import CellType
  from .dataset import DataObject
  from .errors import CellSizeError
  from .utilities.cells import ncells_from_cells, numpy_to_idarr
label_desc: Use image node_id 5 for calling the Cell obj's underlying member method code with example usage: obj.cast_to_polydata() and returns: pyvista, pyvista, pyvista, pyvista