PolyDataFilters.append_polydata

PolyDataFilters.append_polydata#

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

Append one or more PolyData into this one.

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

Added in version 0.40.0.

Note

As stated in the VTK documentation of vtkAppendPolyData, 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 objects 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

The appended PolyData objects.

Examples#

Download Python source code | Download Jupyter notebook

>>> 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-35f631331e29ea39_00_00.png

Append more than one PolyData.

../../../_images/pyvista-PolyDataFilters-append_polydata-35f631331e29ea39_01_00.png

See Also#

pyvista.PolyDataFilters.merge()