model.cutFunction.getMTime is not a function

I try to use vtk cutter with kitware/vtk.js as the below code.
But “model.cutFunction.getMTime is not a function” happens.
Do you have some ideas to solve it??

Thank you in advance.

Hello,

The cut function you pass to the cutter has to be a vtk object with an evaluateFunction. It is a plane in the cutter example you can find here.
You could do:

const plane = vtkPlane.newInstance();
plane.setOrigin(0, 0, 0);
plane.setNormal(0, 0, 1);

const cutter = vtkCutter.newInstance();
cutter.setCutFunction(plane);