Skip to content

IO for Polygon Soups #2196

@sgiraudot

Description

@sgiraudot

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

  1. 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)

  2. 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 example read_off_polygon_soup() and read_ply_polygon_soup() (similarly to what we have with read_off_points() and read_ply_points()).

  3. For Point_set_3, I made an operator>>() that automatically calls the right reader (between XYZ, OFF, PLY and soon LAS) by analysing the first line of the stream (that contains a tag, except for XYZ). Do we want the same thing for Surface_mesh, for example? It could select between OFF and PLY. And as it works similarly to Point_set_3, we could similarly recover additional properties in PLY in automatically generated property maps.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions