diff --git a/src/libslic3r/Geometry/Circle.hpp b/src/libslic3r/Geometry/Circle.hpp index 07a3f268d7..b2c27e636f 100644 --- a/src/libslic3r/Geometry/Circle.hpp +++ b/src/libslic3r/Geometry/Circle.hpp @@ -104,18 +104,18 @@ CircleSq smallest_enclosing_circle2_welzl(const Points &points) { using Scalar = typename Vector::Scalar; - const auto &p0 = points[0].cast(); - auto circle = CircleSq(p0, points[1].cast()); + const auto &p0 = points[0].template cast(); + auto circle = CircleSq(p0, points[1].template cast()); for (size_t i = 2; i < points.size(); ++ i) - if (const Vector &p = points[i].cast(); ! circle.contains_with_eps(p)) { + if (const Vector &p = points[i].template cast(); ! circle.contains_with_eps(p)) { // p is the first point on the smallest circle enclosing points[0..i] auto c = CircleSq(p0, p); for (size_t j = 1; j < i; ++ j) - if (const Vector &q = points[j].cast(); ! c.contains_with_eps(q)) { + if (const Vector &q = points[j].template cast(); ! c.contains_with_eps(q)) { // q is the second point on the smallest circle enclosing points[0..i] auto c2 = CircleSq(p, q); - for (int k = 0; k < j; ++ k) - if (const Vector &r = points[k].cast(); ! c2.contains_with_eps(r)) { + for (size_t k = 0; k < j; ++ k) + if (const Vector &r = points[k].template cast(); ! c2.contains_with_eps(r)) { if (Vector center; circle_center(p, q, r, center)) { c2.center = center; c2.radius2 = (center - p).squaredNorm(); diff --git a/src/libslic3r/Geometry/MedialAxis.cpp b/src/libslic3r/Geometry/MedialAxis.cpp index 60af8fa475..f4ac6d80fd 100644 --- a/src/libslic3r/Geometry/MedialAxis.cpp +++ b/src/libslic3r/Geometry/MedialAxis.cpp @@ -385,8 +385,8 @@ void dump_voronoi_to_svg(const Lines &lines, /* const */ boost::polygon::voronoi template inline const typename VD::point_type retrieve_cell_point(const typename VD::cell_type& cell, const SEGMENTS &segments) { - assert(cell.source_category() == SOURCE_CATEGORY_SEGMENT_START_POINT || cell.source_category() == SOURCE_CATEGORY_SEGMENT_END_POINT); - return (cell.source_category() == SOURCE_CATEGORY_SEGMENT_START_POINT) ? low(segments[cell.source_index()]) : high(segments[cell.source_index()]); + assert(cell.source_category() == boost::polygon::SOURCE_CATEGORY_SEGMENT_START_POINT || cell.source_category() == boost::polygon::SOURCE_CATEGORY_SEGMENT_END_POINT); + return (cell.source_category() == boost::polygon::SOURCE_CATEGORY_SEGMENT_START_POINT) ? low(segments[cell.source_index()]) : high(segments[cell.source_index()]); } template