Allow to open more that OFF files

The files are even repaired on the fiy.
This commit is contained in:
Laurent Rineau 2023-09-28 12:38:18 +02:00
parent 7d35d64f1e
commit 21c4aec8b5
1 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include <CGAL/IO/File_binary_mesh_3.h>
#include <CGAL/Polygon_mesh_processing/bbox.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <vector>
#include <cassert>
@ -91,7 +92,8 @@ int main(int argc, char* argv[])
std::ifstream input(filename);
Mesh mesh;
if (!input || !(input >> mesh))
const bool ok = CGAL::Polygon_mesh_processing::IO::read_polygon_mesh(filename, mesh);
if (!ok)
{
std::cerr << "Not a valid input file." << std::endl;
return 1;