Vtk.js unstructured grid

Hello!

Can vtk.js render unstructured grid data independently (i.e., without relying on vtk python as a backend or another tools beyond the scope of vtk.js)?

If not, are there any plans to add this capability?

Thank you in advance.

No, VTK.js does not support unstructured grid.
There is no short term plan to add such capability.
You might want to consider VTK.wasm instead.

1 Like

Thanks for your reply!

Speaking of VTK.wasm, is it possible to somehow combine it on client side with vtk.js+react? Perhaps there are any examples?

And is the option you suggested better than using vtk.js+react as a frontend and vtk+python as a backend (the operation to turn unstructured data into structured data will take place on the server and then sent to vtk.js to display)?

it possible to somehow combine it on client side with vtk.js+react? Perhaps there are any examples?

Yes. it is possible. Using WebAssembly - VTK documentation
Examples are not React related.

And is the option you suggested better than using vtk.js+react as a frontend and vtk+python as a backend (the operation to turn unstructured data into structured data will take place on the server and then sent to vtk.js to display)?

Use trame. Supporting unstructured data is built-in.

1 Like

Hello, I am trying to address a similar problem (i.e. use vtk.js for the frontend and Python for the backend). I had in mind the example of pyvista and mesh visualization in a jupyter notebook using trame. I am trying to achieve something similar to GitHub - pyvista/pyvista-fastapi-webapp: Demo FastAPI and Three.js application using PyVista but to visualize data from an unstructured mesh interactively in a web application.

Use trame. Supporting unstructured data is built-in.

Would you mind to explicit how to use trame in this case? I thought about using trame to generate a view of a mesh (typically unstructed grid stored as *.vtu) to be rendered on the client side using vtk.js.
I understood trame as a framework to build an entire web application with Python. Because the intended web application does more than the visualization with vtk, I don’t want to rely on trame for the whole application.

You can use trame “just” for the 3D view and not the web application. In such case, it is a simple iframe within your whole application

Thank you for your answer. With the js-trame example of trame-iframe was able to do what I wanted.