Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to slice the polydata (cfd volume grid data) with vtk.js and see the grid on the slice? #3014

Open
chiyandetaotie opened this issue Feb 8, 2024 · 9 comments
Labels
type: feature request 💡 Desired capabilities / enhancements

Comments

@chiyandetaotie
Copy link

Feature Request

How to slice the polydata (cfd volume grid data) with vtk.js and see the grid on the slice?
I have seen the vtkCutter example, but I do not know how to show the grid on the slice. I have the cfd volume grid data, and I want to see the grid on the slice. How can I do?

Motivation and Detailed Description

I want to slice the the cfd volume grid data, and to see the grid on the slice. How can I do?

@chiyandetaotie chiyandetaotie added the type: feature request 💡 Desired capabilities / enhancements label Feb 8, 2024
@chiyandetaotie chiyandetaotie changed the title How to slice the polydata (cfd volume mesh data) with vtk.js and see the grid on the slice? How to slice the polydata (cfd volume grid data) with vtk.js and see the grid on the slice? Feb 8, 2024
@finetjul
Copy link
Member

finetjul commented Feb 9, 2024

VTK.js does not support volumetric meshes (volume grid data). You can only manipulate surface meshes. Cutting them will leave a hole (see vtkCutter). The hole can be filled at a second step (see vtkClipClosedSurface)

@chiyandetaotie
Copy link
Author

How to fill the hole with the "vtkClipClosedSurface"? I want to show the meshes on the slice, but the example (see vtkClipClosedSurface) does not show the grid on the clippingPlanes. How can I do? Is there any example?

@finetjul
Copy link
Member

It does not show the grid because there is no internal structure information stored in your mesh.
VTK.js does not support volumetric mesh, therefore the data you have is only surface mesh.
Please share screenshots.

@chiyandetaotie
Copy link
Author

I want to use vtk.js and vue to achieve the same slicing functionality as in paraview. How can I do ?I want to achieve the following effect.

paraview01
paraview02
paraview03

@finetjul
Copy link
Member

finetjul commented Feb 20, 2024

There are 3 options:

  1. Add Unstructured Grid (i.e. volumetric mesh) support in VTK.js,
  2. Use VTK.wasm,
  3. Use a client/server approach like trame offers.

In the first 2 cases, you may face memory limitations if your data is too large.

@chiyandetaotie
Copy link
Author

If I want to Add Unstructured Grid (i.e. volumetric mesh) support in VTK.js, How can I do?

@finetjul
Copy link
Member

You can look at the existing vtkPolyData and vtkImageData.

You then need to look at vtkUnstructuredGrid in VTK C++ and do the same in VTK.js. There will be unstructured grid mappers to port to JS as well.

@chiyandetaotie
Copy link
Author

I'm not very familiar with C++. This is a bit difficult for me to look at vtkUnstructuredGrid in VTK C++ and do the same in VTK.js. Is there any recommended way to achieve this function using vue + vtk.js. How about "Use VTK.wasm"?

@finetjul
Copy link
Member

finetjul commented Feb 21, 2024

Here is some documentation about VTK wasm.

Shall you have funding, feel free to reach me out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request 💡 Desired capabilities / enhancements
Projects
None yet
Development

No branches or pull requests

2 participants