diff --git a/src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp b/src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp index 99de7a2659..7e6b77b271 100644 --- a/src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp +++ b/src/libslic3r/SLA/SupportIslands/SampleIslandUtils.cpp @@ -620,6 +620,7 @@ void SampleIslandUtils::align_samples(SupportIslandPoints &samples, } +#ifndef NDEBUG namespace { bool is_points_in_distance(const Slic3r::Point & p, const Slic3r::Points &points, @@ -633,6 +634,7 @@ bool is_points_in_distance(const Slic3r::Point & p, return true; } } // namespace +#endif // NDEBUG coord_t SampleIslandUtils::align_once( SupportIslandPoints &samples, @@ -1492,7 +1494,7 @@ SampleIslandUtils::Field SampleIslandUtils::create_field( // Prepare data for field outline, // when field transit into tiny part of island - auto add_wide_tiny_change_only = [&wide_tiny_changes, &lines, &tiny_done] + auto add_wide_tiny_change_only = [&wide_tiny_changes, &lines] (const VoronoiGraph::Position &position){ Point p1, p2; std::tie(p1, p2) = VoronoiGraphUtils::point_on_lines(position, lines); @@ -1827,7 +1829,6 @@ SupportIslandPoints SampleIslandUtils::sample_outline( using RestrictionPtr = std::shared_ptr; auto add_sample = [&](size_t index, const RestrictionPtr& restriction, coord_t &last_support) { using Position = SupportOutlineIslandPoint::Position; - const Line & line = restriction->lines[index]; const double &line_length_double = restriction->lengths[index]; coord_t line_length = static_cast(std::round(line_length_double)); if (last_support + line_length > sample_distance) { diff --git a/src/libslic3r/SLA/SupportIslands/SupportIslandPoint.hpp b/src/libslic3r/SLA/SupportIslands/SupportIslandPoint.hpp index 2348b84b5f..56ea11e244 100644 --- a/src/libslic3r/SLA/SupportIslands/SupportIslandPoint.hpp +++ b/src/libslic3r/SLA/SupportIslands/SupportIslandPoint.hpp @@ -100,7 +100,7 @@ public: /// Can move? /// /// FALSE - virtual bool can_move() const override { return false; } + bool can_move() const override { return false; } /// /// No move! @@ -108,7 +108,7 @@ public: /// /// Wanted position /// No move means zero distance - virtual coord_t move(const Point &destination) { return 0; } + coord_t move(const Point &destination) override { return 0; } }; /// diff --git a/src/libslic3r/SLA/SupportIslands/VoronoiDiagramCGAL.cpp b/src/libslic3r/SLA/SupportIslands/VoronoiDiagramCGAL.cpp index 20ab3761d3..69203ddeab 100644 --- a/src/libslic3r/SLA/SupportIslands/VoronoiDiagramCGAL.cpp +++ b/src/libslic3r/SLA/SupportIslands/VoronoiDiagramCGAL.cpp @@ -34,11 +34,8 @@ using Halfedge_handle = VD::Halfedge_handle; using Ccb_halfedge_circulator = VD::Ccb_halfedge_circulator; namespace{ -Vec2d to_point_d(const Site_2 &s) { return {s.x(), s.y()}; } -Slic3r::Point to_point(const Site_2 &s) { - // conversion from double to coor_t - return Slic3r::Point(s.x(), s.y()); -} +// conversion from double to coor_t +Slic3r::Point to_point(const Site_2 &s) { return Slic3r::Point(s.x(), s.y()); } /// /// Create line segment lay between given points with distance limited by maximal_distance diff --git a/src/libslic3r/SLA/SupportPointGenerator.cpp b/src/libslic3r/SLA/SupportPointGenerator.cpp index 5f3f3746dd..ba05a4497f 100644 --- a/src/libslic3r/SLA/SupportPointGenerator.cpp +++ b/src/libslic3r/SLA/SupportPointGenerator.cpp @@ -356,6 +356,7 @@ bool contain_point(const Point &p, const Points &sorted_points) { return it->x() == p.x() && it->y() == p.y(); }; +#ifndef NDEBUG bool exist_same_points(const ExPolygon &shape, const Points& prev_points) { auto shape_points = to_points(shape); return shape_points.end() != @@ -363,6 +364,7 @@ bool exist_same_points(const ExPolygon &shape, const Points& prev_points) { return contain_point(p, prev_points); }); } +#endif // NDEBUG Points sample_overhangs(const LayerPart& part, double dist2) { const ExPolygon &shape = *part.shape; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index cb258b18e7..cf8640a9a1 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -817,7 +817,7 @@ void GLGizmoSlaSupports::draw_island_config() { #ifdef OPTION_TO_STORE_ISLAND bool store_islands = !sample_config.path.empty(); if (ImGui::Checkbox("StoreIslands", &store_islands)) { - if (store_islands = true) + if (store_islands == true) sample_config.path = "C:/data/temp/island<>.svg"; } else if (ImGui::IsItemHovered()) ImGui::SetTooltip("Store islands in file\n<> is replaced by island order number"); @@ -896,7 +896,7 @@ void GLGizmoSlaSupports::draw_island_config() { ImGui::SetTooltip("Minimal width to be supported by outline\nMust be smaller or equal to thin max width(to make hysteresis)"); ImGui::Text("head radius is set to %.2f", unscale(sample_config.head_radius)); - ImGui::Text("Alignment stop criteria: min_move(%.0f um), iter(%d x), max_VD_move(%.2f mm)", unscale(sample_config.minimal_move)*1000, sample_config.count_iteration, + ImGui::Text("Alignment stop criteria: min_move(%.0f um), iter(%d x), max_VD_move(%.2f mm)", unscale(sample_config.minimal_move)*1000, (int)sample_config.count_iteration, unscale(sample_config.max_align_distance) );