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

I have created an actor with the following js code:

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

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!