File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#include < CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
1717#include < CGAL/Polygon_mesh_processing/orientation.h>
1818
19+ #include < CGAL/version_macros.h>
20+
21+ #if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR < 3
22+ #include < CGAL/IO/OFF_reader.h>
23+ #endif
24+
1925// for sharp features
2026// #include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
2127
@@ -68,8 +74,15 @@ void generate_from_off(
6874 std::vector<K::Point_3> points;
6975 std::vector<std::vector<std::size_t > > polygons;
7076
71- // CGAL::IO::read_OFF used to be CGAL::read_OFF in CGAL 5.2 and earlier
72- if (!input || !CGAL::IO::read_OFF (input, points, polygons) || points.empty ())
77+ if (
78+ !input ||
79+ #if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3
80+ !CGAL::IO::read_OFF (input, points, polygons) ||
81+ #else
82+ !CGAL::read_OFF (input, points, polygons) ||
83+ #endif
84+ points.empty ()
85+ )
7386 {
7487 std::stringstream msg;
7588 msg << " Cannot read .off file \" " << infile <<" \" " << std::endl;
You can’t perform that action at this time.
0 commit comments