curvature

PolyDataFilters.curvature(curv_type='mean', progress_bar=False)

Return the pointwise curvature of a mesh.

Parameters
curv_typestr, optional

Curvature type. One of the following:

  • "Mean"

  • "Gaussian"

  • "Maximum"

  • "Minimum"

progress_barbool, optional

Display a progress bar to indicate progress. Default False.

Returns
numpy.ndarray

Array of curvature values.

Examples

Calculate the mean curvature of the hills example mesh.

>>> from pyvista import examples
>>> hills = examples.load_random_hills()
>>> curv = hills.curvature()
>>> curv   
array([0.20587616, 0.06747695, ..., 0.11781171, 0.15988467])

Plot it.

>>> hills.plot(scalars=curv)