pyvista.PolyDataFilters.curvature

pyvista.PolyDataFilters.curvature#

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

Return the pointwise curvature of a mesh.

See Connectivity for more examples using this filter.

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)
../../../_images/pyvista-PolyDataFilters-curvature-1_00_00.png

Show the curvature array.

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