Is there a way to save CGAL::Linear_cell_complex_for_combinatorial_map as .off or .obj format?

I have just implemented an algorithm that takes a surface mesh, tetrahedralizes it and saves the tetrahedralization data inside the CGAL data structure CGAL::Linear_cell_complex_for_combinatorial_map.

I’m new to using CGAL library and I would like to know if there is a way to write CGAL::Linear_cell_complex_for_combinatorial_map data structure in .obj, .off or some other formats.


There is an undocumented function write_off(lcc) (cf here).

In the off, when a face is shared by two volumes, the face is saved twice. Moreover, the output mesh is not a surface, and some tools (like meshlab) does not like such a mesh.

It is easy to modify the code of write_off to save only the surface of your volumic mesh. Contact me if you need such function.