diff --git a/src/libslic3r/SLA/SupportPointGenerator.cpp b/src/libslic3r/SLA/SupportPointGenerator.cpp index 4cabdac2b3..bb343216a0 100644 --- a/src/libslic3r/SLA/SupportPointGenerator.cpp +++ b/src/libslic3r/SLA/SupportPointGenerator.cpp @@ -17,11 +17,13 @@ using namespace Slic3r; using namespace Slic3r::sla; namespace { +#ifndef NDEBUG bool exist_point_in_distance(const Vec3f &p, float distance, const LayerSupportPoints &pts) { float distance_sq = sqr(distance); return std::any_of(pts.begin(), pts.end(), [&p, distance_sq](const LayerSupportPoint &sp) { return (sp.pos - p).squaredNorm() < distance_sq; }); } +#endif // NDEBUG /// /// Struct to store support points in KD tree to fast search for nearest ones. @@ -597,7 +599,7 @@ void create_peninsulas(LayerPart &part, const PrepareSupportConfig &config) { // Check, wheather line exist in set of belowe lines // True .. line exist in previous layer (or partialy overlap previous line), connection to land // False .. line is made by border of current layer part(peninsula coast) - auto exist_belowe = [&get_angle, &idx, &is_lower, &below_lines, &belowe_line_angle] + auto exist_belowe = [&get_angle, &idx, &below_lines, &belowe_line_angle] (const Line &l) { // It is edge case of expand if (below_lines.empty()) @@ -720,12 +722,9 @@ SupportPointGeneratorData Slic3r::sla::prepare_generator_data( } }, 4 /*gransize*/); - double sample_distance_in_um = scale_(config.discretize_overhang_step); - double sample_distance_in_um2 = sample_distance_in_um * sample_distance_in_um; - // Link parts by intersections execution::for_each(ex_tbb, size_t(1), result.slices.size(), - [&result, sample_distance_in_um2, throw_on_cancel](size_t layer_id) { + [&result, throw_on_cancel](size_t layer_id) { if ((layer_id % 16) == 0) throw_on_cancel(); @@ -754,6 +753,8 @@ SupportPointGeneratorData Slic3r::sla::prepare_generator_data( }, 8 /* gransize */); // Sample overhangs part of island + double sample_distance_in_um = scale_(config.discretize_overhang_step); + double sample_distance_in_um2 = sample_distance_in_um * sample_distance_in_um; execution::for_each(ex_tbb, size_t(1), result.slices.size(), [&result, sample_distance_in_um2, throw_on_cancel](size_t layer_id) { if ((layer_id % 32) == 0) diff --git a/src/libslic3r/SLAPrintSteps.cpp b/src/libslic3r/SLAPrintSteps.cpp index d142f8e476..5331e643b3 100644 --- a/src/libslic3r/SLAPrintSteps.cpp +++ b/src/libslic3r/SLAPrintSteps.cpp @@ -169,7 +169,7 @@ void prepare_permanent_support_points( } permanent_supports.erase(std::remove_if(permanent_supports.begin(), permanent_supports.end(), - [&tree](const SupportPoint &p) { return p.head_front_radius < 0.f; }),permanent_supports.end()); + [](const SupportPoint &p) { return p.head_front_radius < 0.f; }),permanent_supports.end()); std::sort(permanent_supports.begin(), permanent_supports.end(), [](const SupportPoint& p1,const SupportPoint& p2){ return p1.pos.z() < p2.pos.z(); }); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index d9bae9c76d..8731a93c1c 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -85,9 +85,6 @@ const IconManager::Icon &get_icon(const IconManager::Icons &icons, IconType type bool draw_view_mode(bool &show_support_structure, const IconManager::Icons &icons) { ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 8.); ScopeGuard sg([] { ImGui::PopStyleVar(); }); - - ImVec4 tint(1, 1, 1, 1); - ImVec4 border = ImGuiPureWrap::COL_ORANGE_DARK; if (show_support_structure) { draw(get_icon(icons, IconType::show_support_structure_selected)); if(ImGui::IsItemHovered()) @@ -787,7 +784,7 @@ RENDER_AGAIN: (int) supports.size(), count_user_edited, count_island); } ImVec4 light_gray{0.4f, 0.4f, 0.4f, 1.0f}; - ImGui::TextColored(light_gray, stats.c_str()); + ImGui::TextColored(light_gray, "%s", stats.c_str()); //ImGui::Separator(); // START temporary debug //ImGui::Text("Between delimiters is temporary GUI");