Search code examples
graphicscgal

How to display '.cgal' File generated by CGAL:mcfskel


I'm new to CGAL and in the fields of computer graphics. I'm currently interested in doing CGAL:Mean Curvature Skeletonization. I tested the simple example program and it works. As a result, it generated a 'skel.cgal' files, which i think is the points for the generated 1D skeletal.

The problem is i don't know how to display it because normally it will be '.off' file format. I think about converting it to '.off' but don't know where to start. Hope you guys can help me out.


Solution

  • The output is a set a polylines. The format is: n1 x1 y1 z1 ... xn1 yn1 zn1 ... ni x1 y1 z1 ... xni yni zni

    The first number is the number of points for a polyline, followed by the 3D points.

    If you want to have a look at it you can try the CGAL Polyhedron 3D demo. You can compile it yourself from sources or use the precompiled windows version with its required dlls.