Skip to content

vtkPolyhedron: Improve GetParametricCenter

The parametric center of a polyhedron has been the center of its bounding box. This can be really problematic, because the actual location can be outside of the cell itself.

If you consider a tetrahedron, the location of its parametric center is its centroid.

Therefore, in this commit, as parametric center of a polyhedron, we return the parametric location of the centroid of its points.

There are probably still going to be corner cases where it might not make sense, but it's definitely better than bounding box center

cc: @dcthomp @cory.quammen

Merge request reports

Loading