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.

Returns
pyvista.UnstructuredGrid

Combined blocks.

Examples

Combine blocks within a multiblock without merging points.

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

Combine blocks and merge points

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