# Examples from pyvista.CellType
# ==============================

# Create a single cube. Notice how the cell type is defined using the
# `CellType`.
import numpy as np
from pyvista import CellType
import pyvista as pv
cells = np.array([8, 0, 1, 2, 3, 4, 5, 6, 7])
cell_type = np.array([CellType.HEXAHEDRON], np.int8)
points = np.array(
    [
        [0, 0, 0],
        [1, 0, 0],
        [1, 1, 0],
        [0, 1, 0],
        [0, 0, 1],
        [1, 0, 1],
        [1, 1, 1],
        [0, 1, 1],
    ],
    dtype=np.float32,
)
grid = pv.UnstructuredGrid(cells, cell_type, points)
grid

# Member Type`int`
# Valid values are as follows:

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

