diff --git a/src/svgfill/src/arrange_polygons.cpp b/src/svgfill/src/arrange_polygons.cpp index 55fb2cbd32..4281571f26 100644 --- a/src/svgfill/src/arrange_polygons.cpp +++ b/src/svgfill/src/arrange_polygons.cpp @@ -25,6 +25,7 @@ #include #include +#include #include "graph_2d.h" @@ -2313,8 +2314,8 @@ extend_end_vertices_based_on_input_simple( CGAL::Ray_2 ray(incoming, M - incoming); // intersect ray with boundary - boost::optional> closest_segment; - boost::optional> closest_intersection_point; + std::optional> closest_segment; + std::optional> closest_intersection_point; K::FT sq_distance_along_ray = std::numeric_limits::infinity(); for (auto jt = bnd.edges_begin(); jt != bnd.edges_end(); ++jt) { const auto& seg = *jt; @@ -2345,7 +2346,7 @@ extend_end_vertices_based_on_input_simple( // Loop over boundary segments, and project point onto it, take the closest K::FT closest_distance = std::numeric_limits::infinity(); - boost::optional> closest_point; + std::optional> closest_point; for (auto& poly : outer_perimiter) { for (auto jt = poly.edges_begin(); jt != poly.edges_end(); ++jt) { auto seg = *jt; @@ -2395,7 +2396,7 @@ extend_end_vertices_based_on_input_simple( } } } else if (bnd.has_on_boundary(M)) { - return boost::optional{M}; + return std::optional{M}; } } if (within_any_perimeter) { @@ -2403,7 +2404,7 @@ extend_end_vertices_based_on_input_simple( } else { logger.message(::logger::LOG_WARNING, "ARR", 3, "Point is outside all boundaries"); } - return boost::optional{}; + return std::optional{}; }; using solution_length_point_incoming = std::tuple; diff --git a/src/svgfill/src/graph_2d.h b/src/svgfill/src/graph_2d.h index 76d8200d4c..e5601f6dea 100644 --- a/src/svgfill/src/graph_2d.h +++ b/src/svgfill/src/graph_2d.h @@ -7,6 +7,8 @@ #endif #endif +#include + template class Graph2D { public: @@ -56,8 +58,8 @@ public: return adjacency_list.find(p); } - boost::optional< CGAL::Segment_2 > query(const Point_2& p, typename Kernel::FT eps) { - boost::optional< CGAL::Segment_2 > closest_segment; + std::optional< CGAL::Segment_2 > query(const Point_2& p, typename Kernel::FT eps) { + std::optional< CGAL::Segment_2 > closest_segment; typename Kernel::FT closest_distance = std::numeric_limits::infinity(); for (auto& p1 : adjacency_list) { for (auto& p2 : p1.second) {