ExplicitStructuredGrid.compute_connectivity(inplace=False) pyvista.core.pointset.ExplicitStructuredGrid

Compute the faces connectivity flags array.

This method checks the faces connectivity of the cells with their topological neighbors. The result is stored in the array of integers 'ConnectivityFlags'. Each value in this array must be interpreted as a binary number, where the digits shows the faces connectivity of a cell with its topological neighbors -Z, +Z, -Y, +Y, -X and +X respectively. For example, a cell with 'ConnectivityFlags' equal to 27 (011011) indicates that this cell is connected by faces with their neighbors (0, 0, 1), (0, -1, 0), (-1, 0, 0) and (1, 0, 0).

inplacebool, optional

This method is applied to this grid if True (default) or to a copy otherwise.


A deep copy of this grid if inplace=False, or this DataSet if otherwise.

See also


Compute an array with the number of connected cell faces.


>>> from pyvista import examples
>>> grid = examples.load_explicit_structured()  
>>> grid = grid.compute_connectivity()  
>>> grid.plot(show_edges=True)