Conversion of .vtk polygon data file to .stl file format

Hello Team,

I am a beginner and blocked in my research. I kindly need help of anyone here.

I have a .vtk file format (having Polydata as “26.3162314062377 2.03114038667601 7.867” and Polygon data as “34 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33”) and I want to convert it to .stl file format. Kindly share the script for its conversion or any other way to overcome this issue.

Thanks and kind regards

Open in ParaView and save as .stl

Thanks for the response. I already have done it but I could not visualize that .stl file

please share your .vtk file

I believe stl presumes triangles, do the polygons need triangulation ?

I now successfully visualized the .stl file. actually I need to convert that .stl file to .off file format to mesh it with CGAL, but this .stl file could not read by meshio for conversion

dfn.vtk (62.0 KB)

This is my .vtk file sir

ParaView save it in stl perfectly.
testd.stl (66.9 KB)

Yes sir, Thanks. I have visualized it. I needed .stl to further process it to .off format but the main problem now is that I cannot convert this .stl to triangulated .off format.

Afaik, VTK can not write to .off format. Cant help you there.