Skip to content

Inconsistency and incorrect behaviour of read_polygon_mesh() #9193

@efifogel

Description

@efifogel

Issue Details

Observe that there are already 2 issues related to this one, namely, #9034 and #7796.

  1. There are two functions in CGAL called read_polygon_mesh(), one in the namespace CGAL::IO and another in the name space CGAL::POlygon_mesh_processing::IO. Looking at the reference manual, it seems that the first one supports OpenMesh (OM) File format (.om), while the second does not, and on the other hand, the second supports the named parameter repair_polygon_soup, while the first does not. This is already a source of confusion. Either one should be discarded, or one should refer to the other (as they do), and the differences between them should be clearly listed in detail. Currently, there is a vague statement in the second: "if the data is not 2-manifold`.

  2. It seems that they also behave differently.

data.tar.gz

The compressed tar file contains 3 off files that represent degenerate meshes.
The first version dumps core on test1.off, creates an open mesh from test2.off, and a closed mesh from test3.off.
The second (PMP) version is able to read all, but the constructed meshes in all 3 cases is open.

I argue that they all should be CLOSED meshes, and it is not just a whim, but a substantial claim with significant impact, mainly because is closed() is used as a precondition for many other operations. Clearly, the mesh represented by test1.off is extremely degenerate, and I guess I could live with it being opened, but the mesh represented by test2.off is a different story, and you can see where I'm going with this...

Source Code

Environment

  • Operating system (Windows/Mac/Linux, 32/64 bits):
  • Compiler:
  • Release or debug mode: both
  • Specific flags used (if any):
  • CGAL version: latest
  • Boost version:
  • Other libraries versions if used (Eigen, TBB, etc.):

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions