UnstructuredGrid.polyhedron_face_location_connectivity

UnstructuredGrid.polyhedron_face_location_connectivity#

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

Return the connectivity array of the polyhedron face locations.

The connectivity array stores the ids of the faces that make up each cell, one cell after another and without any padding. A face id indexes polyhedron_face_offsets. Use polyhedron_face_location_offsets to determine where each cell begins and ends.

Added in version 0.49.

Returns:
numpy.ndarray

Ids of the faces that make up each cell.

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 face locations together with the cells, the cell types and the faces, so there is no way to assign them 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_location_connectivity
array([0, 1, 2, 3]...)

Follow a face id back to the point ids of that face.

See Also#

polyhedron_face_location_offsets

Index into this array at which each cell begins.

polyhedron_face_connectivity

Point ids that define the faces these ids refer to.

polyhedron_face_locations

Face locations in the legacy padded format.