From 2b1bd627d70b0a7e27aba9d772caafec089d923e Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Mon, 6 Feb 2023 17:06:28 +0100 Subject: [PATCH] Extra perimeters - minimal change, reduce touch distance in order to improve path sorting Object stability warning - relfect the state, recommend brim only when it makes sense, and brim is not enabled yet. --- src/libslic3r/PerimeterGenerator.cpp | 2 +- src/libslic3r/Print.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 6e71c782e..c71d95059 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -754,7 +754,7 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector current_dependencies{}; if (shell > 0) { for (const auto &prev_path : dependencies[shell - 1]) { - if (paths_touch(get_path(current_path), get_path(prev_path.first), extrusion_spacing * 2.0)) { + if (paths_touch(get_path(current_path), get_path(prev_path.first), extrusion_spacing * 1.5f)) { current_dependencies.insert(prev_path.first); }; } diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index b6d8eb2c1..e4cc8497f 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1204,7 +1204,7 @@ void Print::alert_when_supports_needed() for (const auto &obj : objects_isssues) { for (const auto &issue : obj.second) { po_by_support_issues[issue].push_back(obj.first); - if (issue.first == SupportSpotsGenerator::SupportPointCause::SeparationFromBed){ + if (issue.first == SupportSpotsGenerator::SupportPointCause::SeparationFromBed && !obj.first->has_brim()){ recommend_brim = true; } } @@ -1235,7 +1235,9 @@ void Print::alert_when_supports_needed() } } - message += "\n" + L("Consider enabling supports") + (recommend_brim ? (" " + L("and/or brim")) : "") + "."; + bool brim_or_supp = recommend_brim && po_by_support_issues.size() < 2; + auto brim_part = " " + (brim_or_supp ? L("or") : L("and")) + " " + L("brim"); + message += "\n" + L("Consider enabling supports") + (recommend_brim ? brim_part : "") + "."; if (objects_isssues.size() > 0) { this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, message);