# Examples from pyvista.DataObjectFilters.compute_cell_sizes
# ==========================================================

# Compute the face area of the example airplane mesh.
from pyvista import examples
surf = examples.load_airplane()
surf = surf.compute_cell_sizes(length=False, volume=False)
surf.plot(show_edges=True, scalars='Area')

# Create a mesh with cells of various dimensions.
mesh_0D = examples.cells.Vertex()
mesh_1D = examples.cells.Line()
mesh_2D = examples.cells.Quadrilateral()
mesh_3D = examples.cells.Hexahedron()
mesh = mesh_0D + mesh_1D + mesh_2D + mesh_3D

# Compute all arrays and compare them.
sizes = mesh.compute_cell_sizes(vertex_count=True)
sizes['VertexCount']

sizes['Length']

sizes['Area']

sizes['Volume']

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