From e8909924d59c69aed52d694f64e4acc12790bdc0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2024 11:09:36 +0000 Subject: [PATCH] Fix clipart.cpp --- Polygon_repair/include/CGAL/Polygon_repair/Polygon_repair.h | 4 ++-- Polygon_repair/test/Polygon_repair/clipart.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Polygon_repair/include/CGAL/Polygon_repair/Polygon_repair.h b/Polygon_repair/include/CGAL/Polygon_repair/Polygon_repair.h index 8010387d4ea..8ff40ee27d5 100644 --- a/Polygon_repair/include/CGAL/Polygon_repair/Polygon_repair.h +++ b/Polygon_repair/include/CGAL/Polygon_repair/Polygon_repair.h @@ -212,14 +212,14 @@ template bool is_valid(const Multipolygon_with_holes_2& multipolygon) { // Validate polygons - for (auto const& polygon: multipolygon.polygons()) { + for (auto const& polygon: multipolygon.polygons_with_holes()) { if (!is_valid(polygon)) return false; } typename CGAL::Polygon_repair::Polygon_repair::Validation_triangulation vt; typename CGAL::Polygon_repair::Polygon_repair::Validation_triangulation::Locate_type lt; int li; - for (auto const& polygon: multipolygon.polygons()) { + for (auto const& polygon: multipolygon.polygons_with_holes()) { if (vt.number_of_faces() > 0) { diff --git a/Polygon_repair/test/Polygon_repair/clipart.cpp b/Polygon_repair/test/Polygon_repair/clipart.cpp index 3760c477f73..94516d6e764 100644 --- a/Polygon_repair/test/Polygon_repair/clipart.cpp +++ b/Polygon_repair/test/Polygon_repair/clipart.cpp @@ -31,7 +31,7 @@ int main(int argc, char* argv[]) { if (file.path().filename().extension() != ".obj") continue; std::cout << "Reading " << file.path().filename() << "..."; - if (std::filesystem::exists(folder_out + "/" + std::string(file.path().stem()) + ".svg")) { + if (std::filesystem::exists(folder_out + "/" + file.path().stem().string() + ".svg")) { std::cout << " skipped: already processed" << std::endl; continue; } @@ -90,7 +90,7 @@ int main(int argc, char* argv[]) { double scale = desired_width/(bbox.xmax()-bbox.xmin()); - std::ofstream ofs(folder_out + "/" + std::string(file.path().stem()) + ".svg"); + std::ofstream ofs(folder_out + "/" + file.path().stem().string() + ".svg"); ofs << "" << std::endl; for (auto const& polygon: mp.polygons_with_holes()) {