calfem-python icon indicating copy to clipboard operation
calfem-python copied to clipboard

Convert VTK file to OBJ with Meshio

Open Biaggio74 opened this issue 4 years ago • 1 comments

Hi, congrats on this nice library, I think it stands out among other open source libs for FEA with its simplicity and "engineer" friendly API.

I try to work further with a meshed elevation profile for CFD analysis with my collaborators and I would need to convert the VTK output file of the mesh into OBJ or STL files. I thought Meshio is the solution but unfortunately it is not capable of reading the produced VTK file by CALFEM as it is POLY DATA.

See the error message extract as below: meshio._exceptions.ReadError: Only VTK 'UNSTRUCTURED_GRID', 'STRUCTURED_POINTS', 'STRUCTURED_GRID', 'RECTILINEAR_GRID' supported (not POLYDATA).

Could you suggest a work around how to export this VTK into OBJ or STL file?

See an example attached about a terrain. Screenshot 2021-05-28 at 11 14 20

Biaggio74 avatar May 29 '21 11:05 Biaggio74

Try to open it in ParaView and export from there.

jonaslindemann avatar Sep 01 '22 13:09 jonaslindemann