Skip to main content

Hi there. I have just started to use FME and am still learning this super capable software.

I have a question regarding vtk (paraview data file, legacy format).

I want to read vtk legacy files and convert to different 3D file format like 3D Tiles or IFC. And it is important to keep attributes when I convert vtk files. So far, I am converting vtk files to stl format using a python script but it won't keep attributes (or values).

Do you think I can somehow convert vtk legacy files using FME? or Safe Software can somehow develop the reader for vtk legacy format??

I searched community postings but I couldn't find any answers.

Thank you!

As far as I can tell these files are ASCII (or maybe binary), later types are XML. You'll be able to read the ASCII and XML version files directly with FME by using the Text or XML Readers in FME respectively, but then you'll have to do a little legwork with FME's transformers to get the features out. Perhaps post a sample of the data so the community can identify what is the best option for you.

It's also possible to run your Python code directly with FME by using a PythonCaller transformer, but that assumes it does what you wish, which it sounds like it perhaps doesn't right now.

All the best


Thanks for your response! I will give a try first and update what I find. If I cannot figure this out, then I am going to post some of my data. I also want to try to integrate a few python script to deal with vtk too. It is going to be a good practice for me.

Again, thank you for your advice.

Hiroo


Thanks for your response! I will give a try first and update what I find. If I cannot figure this out, then I am going to post some of my data. I also want to try to integrate a few python script to deal with vtk too. It is going to be a good practice for me.

Again, thank you for your advice.

Hiroo

I checked documents for both FME and vtk. It is going to take a while to make a progress on what I wanted to achieve. Do you think anybody in this community can help on this? I basically want to convert a vtk file like I attached (I change its extension from vtk to txt to upload the file sample-data.txt) to IFC or other 3D file formats that can hold both geometries and attributes. I am going to spend more time but if you have some suggestions, please let me know.

 

 

This sample data include two attributes (CellType and Material). There are several cell types like VTK_LINE (=3), VTK_TRIANGLE(=5), VTK_QUAD (=9), VTK_TETRA (=10), VTK_HEXAHEDRON (=12), and VTK_WEDGE (=13).

 

 

Thank you!

 

Hiroo

 

 


Reply