# Examples from pyvista.UnstructuredGrid.cells_dict
# =================================================

# Return the cells dictionary of the sample hex beam.  Note how
# there is only one key/value pair as the hex beam example is
# composed of only all hexahedral cells, which is
# `CellType.HEXAHEDRON`, which evaluates to 12.
# Also note how there is no padding for the cell array.  This
# approach may be more helpful than the `cells` property when
# extracting cells.
import pyvista as pv
from pyvista import examples
hex_beam = pv.read(examples.hexbeamfile)
hex_beam.cells_dict

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

