But the areas are not equal....
def get_area(mesh):
return sum(mesh.compute_cell_sizes(length=False, area=True, volume=False,)["Area"])
import pyvista as pv
mesh = pv.Cube()
shrunk = mesh.shrink(0.8)
>>> get_area(mesh), get_area(shrunk)
(6.0, 3.840000114440919)
Also. there must be a bug with vtkMassProperties as shrunk.extract_surface().area return 0.0
_Originally posted by @banesullivan in https://github.com/pyvista/pyvista/pull/913#discussion_r499108567_
Perhaps we just change the area property to be:
@property
def area(self):
return np.sum(self.compute_cell_sizes(length=False, area=True, volume=False,)["Area"])
Also. the suspect code:
>>> import pyvista as pv
>>> pv.Cube().area
0.0
whereas:
>>> np.sum(pv.Cube().compute_cell_sizes(length=False, area=True, volume=False,)["Area"])
6.0
Fixed in #933