pyvista.ExplicitStructuredGrid.compute_connections#

ExplicitStructuredGrid.compute_connections(inplace=False)[source]#

Compute an array with the number of connected cell faces.

This method calculates the number of topological cell neighbors connected by faces. The results are stored in the 'number_of_connections' cell array.

Parameters:
inplacebool, default: False

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

Returns:
ExplicitStructuredGrid

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

See also

ExplicitStructuredGrid.compute_connectivity

Compute the faces connectivity flags array.

Examples

>>> from pyvista import examples
>>> grid = examples.load_explicit_structured()
>>> grid = grid.compute_connections()
>>> grid.plot(show_edges=True)
../../../_images/pyvista-ExplicitStructuredGrid-compute_connections-1_00_00.png