From 21c4aec8b545f78d4d2dfb8e66ff9fa7fc39aa61 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Sep 2023 12:38:18 +0200 Subject: [PATCH] Allow to open more that OFF files The files are even repaired on the fiy. --- Triangulation_3/test/Triangulation_3/cdt_3_from_off.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/test/Triangulation_3/cdt_3_from_off.cpp b/Triangulation_3/test/Triangulation_3/cdt_3_from_off.cpp index ce97d46a44f..3d697cb0271 100644 --- a/Triangulation_3/test/Triangulation_3/cdt_3_from_off.cpp +++ b/Triangulation_3/test/Triangulation_3/cdt_3_from_off.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -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;