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. Usepolyhedron_face_location_offsetsto determine where each cell begins and ends.Added in version 0.49.
- Returns:
numpy.ndarrayIds of the faces that make up each cell.
- Raises:
pyvista.core.errors.VTKVersionErrorIf 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.
>>> face = grid.polyhedron_face_location_connectivity[0]
>>> start, stop = grid.polyhedron_face_offsets[face : face + 2]
>>> grid.polyhedron_face_connectivity[start:stop]
array([0, 2, 1]...)
See Also#
polyhedron_face_location_offsetsIndex into this array at which each cell begins.
polyhedron_face_connectivityPoint ids that define the faces these ids refer to.
polyhedron_face_locationsFace locations in the legacy padded format.