From 1a809b0931bc1bfe7a5aa7c2cbb34f595d291cc7 Mon Sep 17 00:00:00 2001 From: Dylan <331506+macdylan@users.noreply.github.com> Date: Thu, 29 Jun 2023 12:03:34 +0800 Subject: [PATCH] Fix check multi filament valid (#1433) * no need to check different filaments if using a multi-head printer * bed temperatures warning --- src/libslic3r/Print.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index b5a349931e..21f577ed69 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -913,9 +913,29 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* return { L("No extrusions under current settings.") }; if (extruders.size() > 1 && m_config.print_sequence != PrintSequence::ByObject) { - auto ret = check_multi_filament_valid(*this); - if (!ret.string.empty()) - return ret; + if (m_config.single_extruder_multi_material) { + auto ret = check_multi_filament_valid(*this); + if (!ret.string.empty()) + return ret; + } + + if (warning) { + for (unsigned int extruder_a: extruders) { + const ConfigOptionInts* bed_temp_opt = m_config.option(get_bed_temp_key(m_config.curr_bed_type)); + const ConfigOptionInts* bed_temp_1st_opt = m_config.option(get_bed_temp_1st_layer_key(m_config.curr_bed_type)); + int bed_temp_a = bed_temp_opt->get_at(extruder_a); + int bed_temp_1st_a = bed_temp_1st_opt->get_at(extruder_a); + for (unsigned int extruder_b: extruders) { + int bed_temp_b = bed_temp_opt->get_at(extruder_b); + int bed_temp_1st_b = bed_temp_1st_opt->get_at(extruder_b); + if (std::abs(bed_temp_a - bed_temp_b) > 15 || std::abs(bed_temp_1st_a - bed_temp_1st_b) > 15) { + warning->string = L("Bed temperatures for the used filaments differ significantly."); + goto DONE; + } + } + } + DONE:; + } } if (m_config.print_sequence == PrintSequence::ByObject) {