ENH: allow generate wipe tower when print ByObject

allow generate wipe tower when print ByObject if there is only one object

Change-Id: I199e9cab7bd7c963edf58e829c663bb91c12f4f8
(cherry picked from commit 7153c30800022f3afb9811c67f88ba28c9b25d20)
This commit is contained in:
zhimin.zeng 2022-12-14 15:05:01 +08:00 committed by Lane.Wei
parent 1c5c9bd3d2
commit 93b1a335d2
7 changed files with 38 additions and 9 deletions

View file

@ -4035,7 +4035,7 @@ void DynamicPrintConfig::normalize_fdm_1()
return;
}
t_config_option_keys DynamicPrintConfig::normalize_fdm_2(int used_filaments)
t_config_option_keys DynamicPrintConfig::normalize_fdm_2(int num_objects, int used_filaments)
{
t_config_option_keys changed_keys;
ConfigOptionBool* ept_opt = this->option<ConfigOptionBool>("enable_prime_tower");
@ -4046,7 +4046,7 @@ t_config_option_keys DynamicPrintConfig::normalize_fdm_2(int used_filaments)
ConfigOptionEnum<TimelapseType>* timelapse_opt = this->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
bool is_smooth_timelapse = timelapse_opt != nullptr && timelapse_opt->value == TimelapseType::tlSmooth;
if (!is_smooth_timelapse && (used_filaments == 1 || ps_opt->value == PrintSequence::ByObject)) {
if (!is_smooth_timelapse && (used_filaments == 1 || (ps_opt->value == PrintSequence::ByObject && num_objects > 1))) {
if (ept_opt->value) {
ept_opt->value = false;
changed_keys.push_back("enable_prime_tower");