- PolyData.smooth_taubin(n_iter=20, pass_band=0.1, edge_angle=15, feature_angle=45, boundary_smoothing=True, feature_smoothing=False, non_manifold_smoothing=False, normalize_coordinates=False, inplace=False, progress_bar=False)#
Smooth a PolyData DataSet with Taubin smoothing.
This filter allows you to smooth the mesh as in the Laplacian smoothing implementation in
smooth(). However, unlike Laplacian smoothing the surface does not “shrink” since this filter relies on an alternative approach to smoothing. This filter is more akin to a low pass filter where undesirable high frequency features are removed.
This PyVista filter uses the VTK vtkWindowedSincPolyDataFilter filter.
This is the degree of the polynomial used to approximate the windowed sync function. This is generally much less than the number needed by
The passband value for the windowed sinc filter. This should be between 0 and 2, where lower values cause more smoothing.
Edge angle to control smoothing along edges (either interior or boundary).
Feature angle for sharp edge identification.
Flag to control smoothing of boundary edges. When
True, boundary edges remain fixed. Default
Flag to control smoothing of feature edges. When
True, boundary edges remain fixed as defined by
Smooth non-manifold points, default
Flag to control coordinate normalization. To improve the numerical stability of the solution and minimize the scaling of the translation effects, the algorithm can translate and scale the position coordinates to within the unit cube
[-1, 1], perform the smoothing, and translate and scale the position coordinates back to the original coordinate frame. This defaults to
Updates mesh in-place.
Display a progress bar to indicate progress.
For maximum performance, do not enable
feature_smoothingis especially expensive.
See Optimal Surface Smoothing as Filter Design <https://dl.acm.org/doi/pdf/10.1145/218380.218473> for details regarding the implementation of Taubin smoothing.
Smooth the example bone mesh. Here, it’s necessary to subdivide the mesh to increase the number of faces as the original mesh is so coarse.
>>> import pyvista as pv >>> from pyvista import examples >>> mesh = examples.download_foot_bones().subdivide(2) >>> smoothed_mesh = mesh.smooth_taubin() >>> pl = pv.Plotter(shape=(1, 2)) >>> _ = pl.add_mesh(mesh) >>> _ = pl.add_text('Original Mesh') >>> pl.subplot(0, 1) >>> _ = pl.add_mesh(smoothed_mesh) >>> _ = pl.add_text('Smoothed Mesh') >>> pl.show()
See Surface Smoothing for more examples using this filter.