# Examples from pyvista.PolyData.n_verts
# ======================================

# Create a simple mesh containing just two points and return the
# number of vertices and cells. By default, when constructing a PolyData with points but no
# cells, vertices are automatically created, one per point.
import pyvista as pv
mesh = pv.PolyData([[1.0, 0.0, 0.0], [1.0, 1.0, 1.0]])
mesh.n_points, mesh.n_verts, mesh.n_cells

# If any other cells are specified, these vertices are not created.
import pyvista as pv
mesh = pv.PolyData([[1.0, 0.0, 0.0], [1.0, 1.0, 1.0]], lines=[2, 0, 1])
mesh.n_points, mesh.n_verts, mesh.n_cells

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

