I have been studying the documentation here in an attempt to implement a cross-section widget in a VTK/WASM project. I have not been successful, even after copying and pasting the (Python) code directly from the example at that link into my project.
Specifically, the line iren.Start()
fails in VTK/WASM.
I understand that vtkRenderWindowInteractor.Start()
begins mouse interaction. However, since I’m using VTK/WASM, is there some other workflow I should be using to set up this widget? Is the example at that link still relevant with this technology?
Is there more documentation on how to enable a cross-section widget with VTK/WASM? If not, could a small code example be shared here? Thanks.
The following screenshot is as far as I’ve gotten in VTK/WASM with ImplicitPlaneWidget2
. I had to comment out the iren.Start()
line for it to work. As you can see, there is no actual “widget”, but rather just a 2D plane that has cut a sphere mesh in half: