paraview openfoam mesh Reader

Hi,
I’m developping a custom openfoam reader using vtk.js. Therefore I need a tool analog to paraview to read the mesh. I’m interested about the techniques paraview is using for this. Is it simply read all the points and connect them through lines using the polyData Class? Or is there a magic trick? Would already help me to provide the source code for the reader. I don’t know where to find it.

Thanks in advance!!

Please explain the full scope of what you are trying to do as I’m worry to provide an answer that will only solve your immediate question but will lead you to a dead end for your end goal.

One solution is to convert the native reader to a WASM module like we do in itk.js. But such path will have to extract the skin of your mesh to generate a vtkPolyData for rendering.

If more processing is expected such as contouring, clipping, slicing and streamlining, such approach will be shortcoming. For dealing with the later use-case, using a framework like trame would be a better approach.