DataSetFilters.compute_boundary_mesh_quality#
- DataSetFilters.compute_boundary_mesh_quality(*, progress_bar: bool = 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:
- Returns:
pyvista.DataSetDataset with the computed metrics on the boundary faces of a mesh.
cell_dataas the"CellQuality"array.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.download_can_crushed_vtu()
>>> cqual = mesh.compute_boundary_mesh_quality()
>>> pl = pv.Plotter(shape=(2, 2))
>>> _ = pl.add_mesh(mesh, show_edges=True)
>>> pl.subplot(1, 0)
>>> _ = pl.add_mesh(cqual, scalars='DistanceFromCellCenterToFaceCenter')
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(cqual, scalars='DistanceFromCellCenterToFacePlane')
>>> pl.subplot(1, 1)
>>> _ = pl.add_mesh(
... cqual,
... scalars='AngleFaceNormalAndCellCenterToFaceCenterVector',
... )
>>> pl.show()