combine#

MultiBlock.combine(merge_points=False, tolerance=0.0)#

Combine all blocks into a single unstructured grid.

Parameters
merge_pointsbool, optional

Merge coincidental points.

tolerancefloat, optional

The absolute tolerance to use to find coincident points when merge_points=True. Note, this was added in VTK v9.

Returns
pyvista.UnstructuredGrid

Combined blocks.

Examples

Combine blocks within a multiblock without merging points.

>>> import pyvista
>>> block = pyvista.MultiBlock([
...     pyvista.Cube(clean=False),
...     pyvista.Cube(center=(1, 0, 0), clean=False)
... ])
>>> merged = block.combine()
>>> merged.n_points
48

Combine blocks and merge points

>>> merged = block.combine(merge_points=True)
>>> merged.n_points
12