-
Notifications
You must be signed in to change notification settings - Fork 1.6k
IO for Polygon Soups #2196
Description
Issue Details
I'm opening this issue just to start a discussion on the input/output functions for polygons soups, especially:
- the current OFF reader
- a PLY reader to develop
So far, we already have a function that can interpret OFF input as a polygon soup, namely read_OFF(). But this function is in the Polyhedron_IO package (although it never actually refers to a Polyhedron), and it is not documented. Note that it is used in the example for polygon soup orientation, which makes me think it should be documented.
For PLY, we already have a PLY reader (with a new version in pull request along with LAS) but for points only. There is not that much of work to do if we want to handle face graphs and polygon soups in addition (basically, write something to handle the PLY lists of indices).
Questions
-
Do you think it would make sense to move
read_OFF()into Polygon Mesh Processing? There could be an IO section in there (and polygon soups are used there, for example for orientation) -
In that case, do we also want to add
read_PLY()? I'm not really fond of these names, it seems to me that they should be more precise, for exampleread_off_polygon_soup()andread_ply_polygon_soup()(similarly to what we have withread_off_points()andread_ply_points()). -
For
Point_set_3, I made anoperator>>()that automatically calls the right reader (betweenXYZ,OFF,PLYand soonLAS) by analysing the first line of the stream (that contains a tag, except forXYZ). Do we want the same thing forSurface_mesh, for example? It could select betweenOFFandPLY. And as it works similarly toPoint_set_3, we could similarly recover additional properties inPLYin automatically generated property maps.