I have a triangulated mesh that I generated with the Delaunay 3D function in PyVista. I would like to calculate the surface area of the mesh adding up the areas of all the triangles. Is there a way to obtain the indices of the simplices triangles from the delaunay result?
import pyvista as pv
cloud = pv.PolyData(points)
volume = cloud.delaunay_3d(alpha = 2.5)
shell = volume.extract_geometry()
shell.plot()
I know I can do it with Scipy but for whatever reason Scipy generates an incorrect mesh (and does not have attributes I can adjust in the Delaunay method):
from scipy.spatial import Delaunay
tri = Delaunay(points)
print(tri.simplices)
[[386 466 377 613]
[159 386 377 613]
[159 386 466 613]
...
[696 709 695 691]
[696 710 711 691]
[696 697 711 691]]
My goal is to loop through the triangles and calculate the surface area of the mesh.