You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been added to the FEAScript roadmap for the upcoming 0.2.0 release (https://github.com/orgs/FEAScript/discussions/17). With vtk.js we can visualize both the results and the computational mesh. Additionally, we could export a .vtk file to allow users to download the results.
VTK format is very messy and is for advanced meshes i think our current gmsh is good for visualization. I will see if i could ways to visualize it for future 3d cases too somehow.
Edit - Considering maybe we can use it for exporting capabilities to export our result in some way.
VTK format is very messy and is for advanced meshes i think our current gmsh is good for visualization. I will see if i could ways to visualize it for future 3d cases too somehow.
Edit - Considering maybe we can use it for exporting capabilities to export our result in some way.
Yes, Gmsh also offers visualization capabilities. However, vtk.js is written in pure JavaScript, making it potentially easier to integrate into our tutorials or in the FEAScript platform. It provides (at least from what I know from ParaView) advanced features such as domain slicing, contour plots, stream tracing, mesh visualization, etc..
I'm not sure how difficult or messy integrating the vtk.js library would be, as I only have limited experience with the .vtk file format. In the past, I have exported Fortran FEM results to a .vtk file and visualized them in ParaView (take a look of the Fortran code here). I think adding .vtk export functionality, as you mentioned, would be a great starting point, with vtk.js integration potentially coming later. Alternatively, there is a vtk loader for Three.js (example here), but I believe it is no longer actively supported or maintained.
The tricky thing is that volume rendering that is normally possible in paraview for the vtk or vtu format is not possible in vtk.js. It is only possible with the integration of vtk.wasm for js approach.
I see your point. I doubt however if FEAScript would support 3D computations in the near future. We are staying at 2D, at least for the next release. Thus the lack of volume rendering is not a significant concern for now. Furthermore, when we finally go to 3D we could use 2D slices, contour surfaces, streamlines, etc, for visualization (at least this is what I use in ParaView).
I couldn't' find any alternatives for visualizing results on real-time, apart from vtk.js. The plotly.js library we use now is, according to my opinion, very limited and I think we should abandon it until the next release. We need something specialized for FEM results.
Activity
sridhar-mani commentedon May 21, 2025
VTK format is very messy and is for advanced meshes i think our current gmsh is good for visualization. I will see if i could ways to visualize it for future 3d cases too somehow.
Edit - Considering maybe we can use it for exporting capabilities to export our result in some way.
nikoscham commentedon May 21, 2025
Yes, Gmsh also offers visualization capabilities. However, vtk.js is written in pure JavaScript, making it potentially easier to integrate into our tutorials or in the FEAScript platform. It provides (at least from what I know from ParaView) advanced features such as domain slicing, contour plots, stream tracing, mesh visualization, etc..
I'm not sure how difficult or messy integrating the vtk.js library would be, as I only have limited experience with the
.vtkfile format. In the past, I have exported Fortran FEM results to a.vtkfile and visualized them in ParaView (take a look of the Fortran code here). I think adding.vtkexport functionality, as you mentioned, would be a great starting point, with vtk.js integration potentially coming later. Alternatively, there is avtkloader for Three.js (example here), but I believe it is no longer actively supported or maintained.sridhar-mani commentedon May 21, 2025
The tricky thing is that volume rendering that is normally possible in paraview for the vtk or vtu format is not possible in vtk.js. It is only possible with the integration of vtk.wasm for js approach.
nikoscham commentedon May 21, 2025
I see your point. I doubt however if FEAScript would support 3D computations in the near future. We are staying at 2D, at least for the next release. Thus the lack of volume rendering is not a significant concern for now. Furthermore, when we finally go to 3D we could use 2D slices, contour surfaces, streamlines, etc, for visualization (at least this is what I use in ParaView).
I couldn't' find any alternatives for visualizing results on real-time, apart from vtk.js. The plotly.js library we use now is, according to my opinion, very limited and I think we should abandon it until the next release. We need something specialized for FEM results.
sridhar-mani commentedon May 21, 2025
I have worked extensively with vtk.js so i can integrate it.