pyvista.DataSetFilters.compute_boundary_mesh_quality#

DataSetFilters.compute_boundary_mesh_quality(*, progress_bar=False)[source]#

Compute metrics on the boundary faces of a mesh.

The metrics that can be computed on the boundary faces of the mesh and are:

  • Distance from cell center to face center

  • Distance from cell center to face plane

  • Angle of faces plane normal and cell center to face center vector

Parameters:
progress_barbool, default: False

Display a progress bar to indicate progress.

Returns:
pyvista.DataSet

Dataset with the computed metrics on the boundary faces of a mesh. cell_data as the "CellQuality" array.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.download_can_crushed_vtu()
>>> cqual = mesh.compute_boundary_mesh_quality()
>>> plotter = pv.Plotter(shape=(2, 2))
>>> _ = plotter.add_mesh(mesh, show_edges=True)
>>> plotter.subplot(1, 0)
>>> _ = plotter.add_mesh(
...     cqual, scalars="DistanceFromCellCenterToFaceCenter"
... )
>>> plotter.subplot(0, 1)
>>> _ = plotter.add_mesh(
...     cqual, scalars="DistanceFromCellCenterToFacePlane"
... )
>>> plotter.subplot(1, 1)
>>> _ = plotter.add_mesh(
...     cqual,
...     scalars="AngleFaceNormalAndCellCenterToFaceCenterVector",
... )
>>> plotter.show()
../../../_images/pyvista-DataSetFilters-compute_boundary_mesh_quality-1_00_00.png