pyvista.PolyDataFilters.curvature#

PolyDataFilters.curvature(curv_type='mean', progress_bar=False)[source]#

Return the pointwise curvature of a mesh.

Parameters:
curv_typestr, default: “mean”

Curvature type. One of the following:

  • "mean"

  • "gaussian"

  • "maximum"

  • "minimum"

progress_barbool, 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)
https://d33wubrfki0l68.cloudfront.net/adf8c72b0c5082d8ed219ddccbcb26352dbfee64/3103f/_images/pyvista-polydatafilters-curvature-1_00_00.png

Show the curvature array.

>>> curv  
array([0.20587616, 0.06747695, ..., 0.11781171, 0.15988467])