Skip to content

Fix Bounding Spheres for Disparately Sized Cells

Stephen Hogarth requested to merge shogarth/vtk:fix_bounding_sphere_size into master

Modified vtkSphere::vtkSphereComputeBoundingSphere to build a valid bounding sphere when one cell in the group has both largest and smallest values.

Before, if one cell in the group has both the maximum and minimum coordinates, there is no calculated difference between the maximum and minimum cell which results in calculation errors. When a cutting plane generates bounding spheres through using the sphere tree hierarchy, any cell contained in one of these invalid groups cannot be cut because the cutter will detect a false negative between the cut plane and the bounding sphere group. These false negatives are more visible if the grid has a large number of cells with vastly different sizes. By directly using the radius of the large cell instead of calculating the radius from the distance between two cells when both cells are the same, these false negatives are corrected.

Merge request reports