class_docstr: An internal class to manage filters/algorithms for polydata datasets.
class_docstr_tok: ["An","internal","class","to","manage","filters\/algorithms","for","polydata","datasets","."]
docstr: Smooth a PolyData DataSet with Taubin smoothing.
  
  This filter allows you to smooth the mesh as in the Laplacian smoothing
  implementation in :func:`smooth() <PolyDataFilters.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
  <https://vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html>`_
  filter.
  
  Parameters
  ----------
  n_iter : int, default: 20
      This is the degree of the polynomial used to approximate the
      windowed sync function. This is generally much less than the number
      needed by :func:`smooth() <PolyDataFilters.smooth>`.
  
  pass_band : float, default: 0.1
      The passband value for the windowed sinc filter. This should be
      between 0 and 2, where lower values cause more smoothing.
  
  edge_angle : float, default: 15.0
      Edge angle to control smoothing along edges (either interior or
      boundary).
  
  feature_angle : float, default: 45.0
      Feature angle for sharp edge identification.
  
  boundary_smoothing : bool, default: True
      Flag to control smoothing of boundary edges. When ``True``,
      boundary edges remain fixed.
  
  feature_smoothing : bool, default: False
      Flag to control smoothing of feature edges.  When ``True``,
      boundary edges remain fixed as defined by ``feature_angle`` and
      ``edge_angle``.
  
  non_manifold_smoothing : bool, default: False
      Smooth non-manifold points.
  
  normalize_coordinates : bool, default: False
      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.
  
  inplace : bool, default: False
      Updates mesh in-place.
  
  progress_bar : bool, default: False
      Display a progress bar to indicate progress.
  
  Returns
  -------
  pyvista.PolyData
      Smoothed mesh.
  
  Notes
  -----
  For maximum performance, do not enable ``feature_smoothing`` or
  ``boundary_smoothing``. ``feature_smoothing`` is especially expensive.
  
  References
  ----------
  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.
  
  Examples
  --------
  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 :ref:`surface_smoothing_example` for more examples using this filter.
docstr_tok: ["Smooth","a","PolyData","DataSet","with","Taubin","smoothing",".","This","filter","allows","you","to","smooth","the","mesh","as","in","the","Laplacian","smoothing","implementation","in",":","func",":","`","smooth","(",")","<","PolyDataFilters.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","<","https",":","\/\/vtk.org\/doc\/nightly\/html\/classvtkWindowedSincPolyDataFilter.html",">","`","_","filter",".","Parameters","--","--","--","--","--","n_iter",":","int",",","default",":","20","This","is","the","degree","of","the","polynomial","used","to","approximate","the","windowed","sync","function",".","This","is","generally","much","less","than","the","number","needed","by",":","func",":","`","smooth","(",")","<","PolyDataFilters.smooth",">","`",".","pass_band",":","float",",","default",":","0.1","The","passband","value","for","the","windowed","sinc","filter",".","This","should","be","between","0","and","2",",","where","lower","values","cause","more","smoothing",".","edge_angle",":","float",",","default",":","15.0","Edge","angle","to","control","smoothing","along","edges","(","either","interior","or","boundary",")",".","feature_angle",":","float",",","default",":","45.0","Feature","angle","for","sharp","edge","identification",".","boundary_smoothing",":","bool",",","default",":","True","Flag","to","control","smoothing","of","boundary","edges",".","When","``","True","``",",","boundary","edges","remain","fixed",".","feature_smoothing",":","bool",",","default",":","False","Flag","to","control","smoothing","of","feature","edges",".","When","``","True","``",",","boundary","edges","remain","fixed","as","defined","by","``","feature_angle","``","and","``","edge_angle","``",".","non_manifold_smoothing",":","bool",",","default",":","False","Smooth","non-manifold","points",".","normalize_coordinates",":","bool",",","default",":","False","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",".","inplace",":","bool",",","default",":","False","Updates","mesh","in-place",".","progress_bar",":","bool",",","default",":","False","Display","a","progress","bar","to","indicate","progress",".","Returns","--","--","--","-","pyvista.PolyData","Smoothed","mesh",".","Notes","--","--","-","For","maximum","performance",",","do","not","enable","``","feature_smoothing","``","or","``","boundary_smoothing","``",".","``","feature_smoothing","``","is","especially","expensive",".","References","--","--","--","--","--","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",".","Examples","--","--","--","--","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",":","ref",":","`","surface_smoothing_example","`","for","more","examples","using","this","filter","."]
code: def smooth_taubin(
      self,
      n_iter=20,
      pass_band=0.1,
      edge_angle=15.0,
      feature_angle=45.0,
      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 :func:`smooth() <PolyDataFilters.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
      <https://vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html>`_
      filter.
  
      Parameters
      ----------
      n_iter : int, default: 20
          This is the degree of the polynomial used to approximate the
          windowed sync function. This is generally much less than the number
          needed by :func:`smooth() <PolyDataFilters.smooth>`.
  
      pass_band : float, default: 0.1
          The passband value for the windowed sinc filter. This should be
          between 0 and 2, where lower values cause more smoothing.
  
      edge_angle : float, default: 15.0
          Edge angle to control smoothing along edges (either interior or
          boundary).
  
      feature_angle : float, default: 45.0
          Feature angle for sharp edge identification.
  
      boundary_smoothing : bool, default: True
          Flag to control smoothing of boundary edges. When ``True``,
          boundary edges remain fixed.
  
      feature_smoothing : bool, default: False
          Flag to control smoothing of feature edges.  When ``True``,
          boundary edges remain fixed as defined by ``feature_angle`` and
          ``edge_angle``.
  
      non_manifold_smoothing : bool, default: False
          Smooth non-manifold points.
  
      normalize_coordinates : bool, default: False
          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.
  
      inplace : bool, default: False
          Updates mesh in-place.
  
      progress_bar : bool, default: False
          Display a progress bar to indicate progress.
  
      Returns
      -------
      pyvista.PolyData
          Smoothed mesh.
  
      Notes
      -----
      For maximum performance, do not enable ``feature_smoothing`` or
      ``boundary_smoothing``. ``feature_smoothing`` is especially expensive.
  
      References
      ----------
      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.
  
      Examples
      --------
      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 :ref:`surface_smoothing_example` for more examples using this filter.
  
      """
      alg = _vtk.vtkWindowedSincPolyDataFilter()
      alg.SetInputData(self)
      alg.SetNumberOfIterations(n_iter)
      alg.SetFeatureEdgeSmoothing(feature_smoothing)
      alg.SetNonManifoldSmoothing(non_manifold_smoothing)
      alg.SetFeatureAngle(feature_angle)
      alg.SetEdgeAngle(edge_angle)
      alg.SetBoundarySmoothing(boundary_smoothing)
      alg.SetPassBand(pass_band)
      alg.SetNormalizeCoordinates(normalize_coordinates)
      _update_alg(
          alg, progress_bar, "Smoothing Mesh using Taubin Smoothing"
      )
  
      mesh = _get_output(alg)
      if inplace:
          self.copy_from(mesh, deep=False)
          return self
      return mesh
  
imports: import collections.abc
  import warnings
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core.errors import MissingDataError, NotAllTrianglesError, PyVistaFutureWarning, VTKVersionError
  from pyvista.core.filters import _get_output, _update_alg
  from pyvista.core.filters.data_set import DataSetFilters
  from pyvista.core.utilities.arrays import FieldAssociation, get_array, get_array_association, set_default_active_scalars, vtk_id_list_to_array
  from pyvista.core.utilities.geometric_objects import NORMALS
  from pyvista.core.utilities.helpers import generate_plane, wrap
  from pyvista.core.utilities.misc import abstract_class, assert_empty_kwargs
label_desc: Use image node_id 15 for calling the PolyDataFilters obj's underlying member method code with example usage: obj.smooth_taubin(n_iter, pass_band, edge_angle, feature_angle, boundary_smoothing, feature_smoothing, non_manifold_smoothing, normalize_coordinates, inplace, progress_bar) and returns: mesh, self