calculate the center of mass incorrectly after clipping polydata

The center of mass is calculate not correctly after clipping a polydata.
I get the center of mass of the original polydata

If you compute center of mass from all the points in the polydata then make sure you delete all the points that are not used in any cells are removed. For example, you can use vtkCleanPolyData filter to remove all unused points.

Yess thanks, this solved the problem

1 Like