diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index a35bd2c45c..34338f08dc 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -3676,6 +3676,8 @@ int Print::get_filament_config_indx(int filament_id, int layer_id) void Print::update_filament_self_index_cache() { + m_missing_nozzle_group_logged.clear(); // reset the per-slice get_config_index log dedupe + std::vector values; if (m_full_print_config.has("filament_self_index")) { values = m_full_print_config.option("filament_self_index")->values; @@ -3721,9 +3723,12 @@ int Print::get_config_index(int filament_id, int layer_id, const std::vectorget_nozzle_for_filament(filament_id, layer_id); if (!nozzle_info.has_value()) { - BOOST_LOG_TRIVIAL(error) << __FUNCTION__ - << boost::format(", Line %1%: could not found group_nozzle_info corresponding to filament_id %2%, layer_id %3%") % __LINE__ % filament_id % - layer_id; + // Orca: this fallback runs per-filament/per-layer in the g-code hot path — log once per filament + // (reset each slice) instead of flooding thousands of identical lines that bury the real error. + if (m_missing_nozzle_group_logged.insert(filament_id).second) + BOOST_LOG_TRIVIAL(error) << __FUNCTION__ + << boost::format(", Line %1%: could not found group_nozzle_info corresponding to filament_id %2%, layer_id %3% (further occurrences for this filament suppressed)") % __LINE__ % filament_id % + layer_id; return 0; } @@ -3750,9 +3755,12 @@ int Print::get_config_index(int filament_id, int layer_id, const std::vectorget_nozzle_for_filament(filament_id, layer_id); if (!nozzle_info.has_value()) { - BOOST_LOG_TRIVIAL(error) << __FUNCTION__ - << boost::format(", Line %1%: could not found group_nozzle_info corresponding to filament_id %2%, layer_id %3%") % __LINE__ % filament_id % - layer_id; + // Orca: this fallback runs per-filament/per-layer in the g-code hot path — log once per filament + // (reset each slice) instead of flooding thousands of identical lines that bury the real error. + if (m_missing_nozzle_group_logged.insert(filament_id).second) + BOOST_LOG_TRIVIAL(error) << __FUNCTION__ + << boost::format(", Line %1%: could not found group_nozzle_info corresponding to filament_id %2%, layer_id %3% (further occurrences for this filament suppressed)") % __LINE__ % filament_id % + layer_id; return 0; } diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index bd5c25f478..0d87a46b68 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -1302,6 +1302,10 @@ private: FilamentIndexMap m_filament_index_map; // Used to cache printer and process parameter information PrintIndexMap m_nozzle_index_map; + // Orca: filament ids already reported as missing a nozzle-group entry this slice. get_config_index() + // falls back per-filament/per-layer in the g-code hot path, so this dedupes its log to once per + // filament instead of flooding thousands of identical error lines. Cleared with the caches each slice. + std::set m_missing_nozzle_group_logged; // save the config value of "filament_self_index" std::vector m_filament_self_index; diff --git a/src/libslic3r/Support/SupportSpotsGenerator.hpp b/src/libslic3r/Support/SupportSpotsGenerator.hpp index 22e85c021e..615158dabb 100644 --- a/src/libslic3r/Support/SupportSpotsGenerator.hpp +++ b/src/libslic3r/Support/SupportSpotsGenerator.hpp @@ -22,7 +22,7 @@ struct Params : /*max_acceleration(max_acceleration), */raft_layers_count(raft_layers_count), brim_type(brim_type), brim_width(brim_width) { if (filament_types.size() > 1) { - BOOST_LOG_TRIVIAL(warning) + BOOST_LOG_TRIVIAL(debug) << "SupportSpotsGenerator does not currently handle different materials properly, only first will be used"; } if (filament_types.empty() || filament_types[0].empty()) {