PolyData.is_all_triangles#
- property PolyData.is_all_triangles: bool[source]#
Return if all the faces of the
pyvista.PolyDataare triangles.Changed in version 0.50: A mesh with triangle strips is no longer all triangles.
- Returns:
- bool
Trueif all the faces of thepyvista.PolyDataare triangles and it contains no vertices, lines or strips.
Examples#
Download Python source code | Download Jupyter notebook
Show a mesh from pyvista.Plane() is not composed of all
triangles.
>>> import pyvista as pv
>>> plane = pv.Plane()
>>> plane.is_all_triangles
False
Show that the mesh from pyvista.Sphere() contains only
triangles.
>>> sphere = pv.Sphere()
>>> sphere.is_all_triangles
True