How can I convert Vtk STL polydata into opencascade poly_triangulation and vise versa ?

Hello, I would like to convert opencascade’s poly_triangulation(occt) into VTK polydata and visualize it, or otherway around as well. vtk polydata to poly_triangulation (occt). I didn’t find any proper document or example so any help would be awesome.

You can only go one way OpenCascade → VTK

1 Like

F3D also have a OpenCascade reader:


I did a very similar way to read occt STL and convert into VTK PolyData and able to show in viewer which works fine. But since we can write PolyData into file, wouldn’t be possible read vertices and faces and write into Poly_Trian(occt) and convert back to it ?

I was thinking that, we have " polyData->GetPolys();" and “polyData->GetVerts();” and they contain faces and vertices so maybe we can utilize that ?