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_offsetsto determine where each face begins and ends.Added in version 0.49.
- Returns:
numpy.ndarrayPoint ids that define the polyhedron faces.
- 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 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.
>>> grid.polyhedron_face_connectivity.flags['WRITEABLE']
False
See Also#
polyhedron_face_offsetsIndex into this array at which each face begins.
polyhedron_face_location_connectivityIds of the faces that make up each cell.
polyhedron_facesFaces in the legacy padded format.
cell_connectivityConnectivity of the cells themselves, which is empty for a polyhedron.
Used In#
Docstring Examples