pyvista.CompositeFilters.combine

pyvista.CompositeFilters.combine#

CompositeFilters.combine(merge_points=False, tolerance=0.0)[source]#

Combine all blocks into a single unstructured grid.

Parameters:
merge_pointsbool, default: False

Merge coincidental points.

tolerancefloat, default: 0.0

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 as pv
>>> block = pv.MultiBlock(
...     [
...         pv.Cube(clean=False),
...         pv.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