How to calculate the volume and surface area of an actor in vtk js?

Hello,
I have created an actor with the following js code:

    var polydata = vtk.Common.DataModel.vtkPolyData.newInstance();
    polydata.getPoints().setData(Float32Array.from(vertexArray), 3);
    polydata.getPolys().setData(Uint32Array.from(polyArray));
    const mapper = vtk.Rendering.Core.vtkMapper.newInstance();
    mapper.setInputData(polydata);
    const actor = vtk.Rendering.Core.vtkActor.newInstance();
    actor.setMapper(mapper);

But how could I calculate the surface area and volume of the actor? (I got all points and meshes)

You can’t unless you mesh with 3D cells your polydata and sum the volume of each cell.
For the area, that could be done using your points and polys. But you will have to do that computation yourself as we don’t have such code inside vtk.js.

Got the idea. Thanks!