DataSetFilters.merge_points#
- DataSetFilters.merge_points( ) _OutputDataSet[source]#
Merge duplicate points in this mesh.
Added in version 0.45.
- Parameters:
- tolerance
float, optional Specify a tolerance to use when comparing points. Points within this tolerance will be merged.
- inplacebool, default:
False Overwrite the original mesh with the result. Only possible if the input is
PolyDataorUnstructuredGrid.- progress_barbool, default:
False Display a progress bar to indicate progress.
- tolerance
- Returns:
- output
pyvista.PolyData|pyvista.PointSet|pyvista.UnstructuredGrid Mesh with merged points. A
PolyDatagives aPolyDataand aPointSetaPointSet; every other dataset gives anUnstructuredGrid.
- output
Examples#
Download Python source code | Download Jupyter notebook
Merge duplicate points in a mesh.
>>> import pyvista as pv
>>> mesh = pv.Cylinder(resolution=4)
>>> mesh.n_points
16
>>> _ = mesh.merge_points(inplace=True)
>>> mesh.n_points
8