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: Return the pointwise curvature of a mesh.
  
  See :ref:`connectivity_example` for more examples using this
  filter.
  
  Parameters
  ----------
  curv_type : str, default: "mean"
      Curvature type.  One of the following:
  
      * ``"mean"``
      * ``"gaussian"``
      * ``"maximum"``
      * ``"minimum"``
  
  progress_bar : bool, default: False
      Display a progress bar to indicate progress.
  
  Returns
  -------
  numpy.ndarray
      Array of curvature values.
  
  Examples
  --------
  Calculate the mean curvature of the hills example mesh and plot it.
  
  >>> from pyvista import examples
  >>> hills = examples.load_random_hills()
  >>> curv = hills.curvature()
  >>> hills.plot(scalars=curv)
  
  Show the curvature array.
  
  >>> curv  # doctest:+SKIP
  array([0.20587616, 0.06747695, ..., 0.11781171, 0.15988467])
docstr_tok: ["Return","the","pointwise","curvature","of","a","mesh",".","See",":","ref",":","`","connectivity_example","`","for","more","examples","using","this","filter",".","Parameters","--","--","--","--","--","curv_type",":","str",",","default",":","``","mean","''","Curvature","type",".","One","of","the","following",":","*","``","``","mean","''","``","*","``","``","gaussian","''","``","*","``","``","maximum","''","``","*","``","``","minimum","''","``","progress_bar",":","bool",",","default",":","False","Display","a","progress","bar","to","indicate","progress",".","Returns","--","--","--","-","numpy.ndarray","Array","of","curvature","values",".","Examples","--","--","--","--","Calculate","the","mean","curvature","of","the","hills","example","mesh","and","plot","it",".",">",">",">","from","pyvista","import","examples",">",">",">","hills","=","examples.load_random_hills","(",")",">",">",">","curv","=","hills.curvature","(",")",">",">",">","hills.plot","(","scalars=curv",")","Show","the","curvature","array",".",">",">",">","curv","#","doctest",":","+SKIP","array","(","[","0.20587616",",","0.06747695",",","...",",","0.11781171",",","0.15988467","]",")"]
code: def curvature(self, curv_type="mean", progress_bar=False):
      """Return the pointwise curvature of a mesh.
  
      See :ref:`connectivity_example` for more examples using this
      filter.
  
      Parameters
      ----------
      curv_type : str, default: "mean"
          Curvature type.  One of the following:
  
          * ``"mean"``
          * ``"gaussian"``
          * ``"maximum"``
          * ``"minimum"``
  
      progress_bar : bool, default: False
          Display a progress bar to indicate progress.
  
      Returns
      -------
      numpy.ndarray
          Array of curvature values.
  
      Examples
      --------
      Calculate the mean curvature of the hills example mesh and plot it.
  
      >>> from pyvista import examples
      >>> hills = examples.load_random_hills()
      >>> curv = hills.curvature()
      >>> hills.plot(scalars=curv)
  
      Show the curvature array.
  
      >>> curv  # doctest:+SKIP
      array([0.20587616, 0.06747695, ..., 0.11781171, 0.15988467])
  
      """
      curv_type = curv_type.lower()
  
      # Create curve filter and compute curvature
      curvefilter = _vtk.vtkCurvatures()
      curvefilter.SetInputData(self)
      if curv_type == "mean":
          curvefilter.SetCurvatureTypeToMean()
      elif curv_type == "gaussian":
          curvefilter.SetCurvatureTypeToGaussian()
      elif curv_type == "maximum":
          curvefilter.SetCurvatureTypeToMaximum()
      elif curv_type == "minimum":
          curvefilter.SetCurvatureTypeToMinimum()
      else:
          raise ValueError(
              '``curv_type`` must be either "Mean", "Gaussian", "Maximum", or "Minimum".'
          )
      _update_alg(curvefilter, progress_bar, "Computing Curvature")
  
      # Compute and return curvature
      curv = _get_output(curvefilter)
      return _vtk.vtk_to_numpy(curv.GetPointData().GetScalars())
  
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 11 for calling the PolyDataFilters obj's underlying member method code with example usage: obj.curvature(curv_type, progress_bar) and returns: _vtk