UnstructuredGrid.polyhedron_face_connectivity

UnstructuredGrid.polyhedron_face_connectivity#

property UnstructuredGrid.polyhedron_face_connectivity: NumpyArray[int][source]#

Return the connectivity array of the polyhedron faces.

The connectivity array stores the point ids of every polyhedron face in the grid, one face after another and without any padding. Use polyhedron_face_offsets to determine where each face begins and ends.

Added in version 0.49.

Returns:
numpy.ndarray

Point ids that define the polyhedron faces.

Raises:
pyvista.core.errors.VTKVersionError

If VTK is older than 9.4, which stores polyhedra as a single padded face stream instead.

Notes#

This property is read-only. VTK can only replace the faces together with the cells, the cell types and the face locations, so there is no way to assign the faces alone without leaving the grid inconsistent. Build a new grid instead.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> from pyvista import examples
>>> grid = examples.cells.Polyhedron()
>>> grid.polyhedron_face_connectivity
array([0, 2, 1, 0, 1, 3, 0, 3, 2, 1, 2, 3]...)

The array is read-only and writing to it raises a ValueError.

See Also#

polyhedron_face_offsets

Index into this array at which each face begins.

polyhedron_face_location_connectivity

Ids of the faces that make up each cell.

polyhedron_faces

Faces in the legacy padded format.

cell_connectivity

Connectivity of the cells themselves, which is empty for a polyhedron.