- DataSetFilters.merge(grid=None, merge_points=True, inplace=False, main_has_priority=True, progress_bar=False)¶
Join one or many other grids to this grid.
Grid is updated in-place by default.
Can be used to merge points of adjacent cells when no grids are input.
+operator between two meshes uses this filter with the default parameters. When the target mesh is already a
pyvista.UnstructuredGrid, in-place merging via
+=is similarly possible.
Grids to merge to this grid.
Points in exactly the same location will be merged between the two meshes. Warning: this can leave degenerate point data.
Updates grid inplace when True if the input type is an
When this parameter is true and merge_points is true, the arrays of the merging grids will be overwritten by the original main mesh.
Display a progress bar to indicate progress.
When two or more grids are joined, the type and name of each array must match or the arrays will be ignored and not included in the final merged mesh.
Merge three separate spheres into a single mesh.
>>> import pyvista >>> sphere_a = pyvista.Sphere(center=(1, 0, 0)) >>> sphere_b = pyvista.Sphere(center=(0, 1, 0)) >>> sphere_c = pyvista.Sphere(center=(0, 0, 1)) >>> merged = sphere_a.merge([sphere_b, sphere_c]) >>> merged.plot()