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.
This commit is contained in:
PavelMikus 2023-02-06 17:06:28 +01:00
parent aaffcbc282
commit 2b1bd627d7
2 changed files with 5 additions and 3 deletions

View File

@ -754,7 +754,7 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector<ExtrusionPath
std::unordered_set<Pidx, PidxHash> current_dependencies{}; std::unordered_set<Pidx, PidxHash> current_dependencies{};
if (shell > 0) { if (shell > 0) {
for (const auto &prev_path : dependencies[shell - 1]) { 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); current_dependencies.insert(prev_path.first);
}; };
} }

View File

@ -1204,7 +1204,7 @@ void Print::alert_when_supports_needed()
for (const auto &obj : objects_isssues) { for (const auto &obj : objects_isssues) {
for (const auto &issue : obj.second) { for (const auto &issue : obj.second) {
po_by_support_issues[issue].push_back(obj.first); 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; 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) { if (objects_isssues.size() > 0) {
this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, message); this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, message);