Fix prime tower and by-object brim with mixed filaments

This commit is contained in:
SoftFever
2026-08-23 22:11:48 +08:00
parent 3c37bf9ca4
commit 9d733e50f9
2 changed files with 29 additions and 6 deletions
+10 -1
View File
@@ -2,6 +2,7 @@
#include "PrintConfigConstants.hpp"
#include "ClipperUtils.hpp"
#include "Config.hpp"
#include "FilamentMixer.hpp"
#include "MaterialType.hpp"
#include "I18N.hpp"
#include "format.hpp"
@@ -9669,7 +9670,15 @@ t_config_option_keys DynamicPrintConfig::normalize_fdm_2(int num_objects, int us
ConfigOptionBool *enable_wrapping_opt = this->option<ConfigOptionBool>("enable_wrapping_detection");
bool enable_wrapping = enable_wrapping_opt != nullptr && enable_wrapping_opt->value;
if (!is_smooth_timelapse && !enable_wrapping && (used_filaments == 1 || (ps_opt->value == PrintSequence::ByObject && num_objects > 1))) {
bool has_mixed_filament = false;
{
auto *mixed_opt = this->option<ConfigOptionBools>("filament_is_mixed");
if (mixed_opt)
has_mixed_filament = has_any_mixed_filament(mixed_opt->values);
}
if (!is_smooth_timelapse && !enable_wrapping
&& ( (used_filaments == 1 && !has_mixed_filament)
|| (ps_opt->value == PrintSequence::ByObject && num_objects > 1))) {
if (ept_opt->value) {
ept_opt->value = false;
changed_keys.push_back("enable_prime_tower");