From ad452360565d7677e3ce5210c8cc8e690be46831 Mon Sep 17 00:00:00 2001 From: "songwei.li" Date: Fri, 8 Aug 2025 16:47:30 +0800 Subject: [PATCH] ENH: add warning about enable_wrapping_detection without prime tower Add warning about enable_wrapping_detection without prime tower. Note: Only one of this warning, check_multi_filament_valid, and support_enforcer without support can be displayed at the same time. jira: none Change-Id: Ic8f0fc7ab62b63af1604e32b7380642741669462 (cherry picked from commit 698c0d16c99e13244101c06d7a3a8ff66ae2e4d0) --- src/libslic3r/Print.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index ca4ad76e41..1a20a991c1 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1182,7 +1182,7 @@ StringObjectException Print::check_multi_filament_valid(const Print& print) boost::regex regex_g92e0 { "^[ \\t]*[gG]92[ \\t]*[eE](0(\\.0*)?|\\.0+)[ \\t]*(;.*)?$" }; // Precondition: Print::validate() requires the Print::apply() to be called its invocation. -//BBS: refine seq-print validation logic +//BBS: refine seq-print validation logic.....FIXME:StringObjectException *warning can only contain one warning, but there might be many warnings, need a vector StringObjectException Print::validate(StringObjectException *warning, Polygons* collison_polygons, std::vector>* height_polygons) const { std::vector extruders = this->extruders(); @@ -1201,9 +1201,9 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* ret.type = STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP; if (ret.is_warning && warning != nullptr) { *warning = ret; - return {}; - } - return ret; + //return {}; + }else + return ret; } } @@ -1230,6 +1230,17 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* } } + if (m_config.enable_prime_tower) { + } else { + if (m_config.enable_wrapping_detection && warning!=nullptr) { + StringObjectException warningtemp; + warningtemp.string = L("Prime tower is required for clumping detection; otherwise, there may be flaws on the model."); + warningtemp.opt_key = L("enable_prime_tower"); + warningtemp.is_warning = true; + *warning = warningtemp; + } + } + if (m_config.spiral_mode) { size_t total_copies_count = 0; for (const PrintObject* object : m_objects) @@ -1498,8 +1509,10 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* bool has_enforcers = mv->is_support_enforcer() || (mv->is_model_part() && mv->supported_facets.has_facets(*mv, EnforcerBlockerType::ENFORCER)); if (has_enforcers) { - warning->string = L("Support enforcers are used but support is not enabled. Please enable support."); - warning->object = object; + StringObjectException warningtemp; + warningtemp.string = L("Support enforcers are used but support is not enabled. Please enable support."); + warningtemp.object = object; + *warning = warningtemp; break; } }