pyvista.PolyDataFilters.append_polydata#

PolyDataFilters.append_polydata(*meshes, inplace=False, progress_bar=False)[source]#

Append one or more PolyData into this one.

Under the hood, the VTK vtkAppendPolyDataFilter filter is used to perform the append operation.

New in version 0.40.0.

Note

As stated in the VTK documentation of vtkAppendPolyDataFilter, point and cell data are added to the output PolyData only if they are present across all input PolyData.

Parameters:
*mesheslist[pyvista.PolyData]

The PolyData(s) to append with the current one.

inplacebool, default: False

Whether to update the mesh in-place.

progress_barbool, default: False

Display a progress bar to indicate progress.

Returns:
pyvista.PolyData

Appended PolyData(s).

Examples

>>> import pyvista as pv
>>> sp0 = pv.Sphere()
>>> sp1 = sp0.translate((1, 0, 0))
>>> appended = sp0.append_polydata(sp1)
>>> appended.plot()
../../../_images/pyvista-PolyDataFilters-append_polydata-1_00_00.png

Append more than one PolyData.

>>> sp2 = sp0.translate((-1, 0, 0))
>>> appended = sp0.append_polydata(sp1, sp2)
>>> appended.plot()
../../../_images/pyvista-PolyDataFilters-append_polydata-1_01_00.png