diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 5f38d7dda..2eadc0cd6 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1730,13 +1730,13 @@ void Print::finalize_first_layer_convex_hull() // Wipe tower support. bool Print::has_wipe_tower() const { - if (enable_timelapse_print()) - return true; + if (m_config.enable_prime_tower.value == true) { + if (enable_timelapse_print()) + return true; - return - ! m_config.spiral_mode.value && - m_config.enable_prime_tower.value && - m_config.filament_diameter.values.size() > 1; + return !m_config.spiral_mode.value && m_config.filament_diameter.values.size() > 1; + } + return false; } const WipeTowerData& Print::wipe_tower_data(size_t filaments_cnt) const diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index ec13dc83f..80d57d916 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -3728,10 +3728,7 @@ void DynamicPrintConfig::normalize_fdm(int used_filaments) ConfigOptionEnum* timelapse_opt = this->option>("timelapse_type"); bool is_smooth_timelapse = timelapse_opt != nullptr && timelapse_opt->value == TimelapseType::tlSmooth; - if (is_smooth_timelapse) { - ept_opt->value = true; - } - else if (used_filaments == 1 || ps_opt->value == PrintSequence::ByObject) { + if (!is_smooth_timelapse && (used_filaments == 1 || ps_opt->value == PrintSequence::ByObject)) { ept_opt->value = false; } diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 0bd358177..a0557ed6c 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -3085,8 +3085,8 @@ void GCodeViewer::load_shells(const Print& print, bool initialized, bool force_p const double max_z = print.objects()[0]->model_object()->get_model()->bounding_box().max(2); const PrintConfig& config = print.config(); - if (print.enable_timelapse_print() - || (extruders_count > 1 && config.enable_prime_tower && (config.print_sequence == PrintSequence::ByLayer))) { + if (config.enable_prime_tower && + (print.enable_timelapse_print() || (extruders_count > 1 && (config.print_sequence == PrintSequence::ByLayer)))) { const float depth = print.wipe_tower_data(extruders_count).depth; const float brim_width = print.wipe_tower_data(extruders_count).brim_width; diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index a0cf1f345..3275d8100 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1935,7 +1935,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re auto timelapse_type = dconfig.option>("timelapse_type"); bool timelapse_enabled = timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false; - if (timelapse_enabled || (filaments_count > 1 && wt && co != nullptr && co->value != PrintSequence::ByObject)) { + if ((timelapse_enabled && wt) || (filaments_count > 1 && wt && co != nullptr && co->value != PrintSequence::ByObject)) { for (int plate_id = 0; plate_id < n_plates; plate_id++) { DynamicPrintConfig& proj_cfg = wxGetApp().preset_bundle->project_config; float x = dynamic_cast(proj_cfg.option("wipe_tower_x"))->get_at(plate_id); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 6c7e56575..be9020ce7 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1380,19 +1380,14 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) auto timelapse_type = m_config->option>("timelapse_type"); bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth; if (!boost::any_cast(value) && timelapse_enabled) { - MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timeplase. Are you sure you want to disable both of them?"), + MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by smooth timeplase. If whthout prime tower, there will be flaws on the model. Are you sure you want to disable prime tower?"), _L("Warning"), wxICON_WARNING | wxYES | wxNO); - if (dlg.ShowModal() == wxID_YES) { - DynamicPrintConfig new_conf = *m_config; - new_conf.set_key_value("timelapse_type", new ConfigOptionEnum(TimelapseType::tlNone)); - m_config_manipulation.apply(m_config, &new_conf); - wxGetApp().plater()->update(); - } - else { + if (dlg.ShowModal() == wxID_NO) { DynamicPrintConfig new_conf = *m_config; new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true)); m_config_manipulation.apply(m_config, &new_conf); } + wxGetApp().plater()->update(); } update_wiping_button_visibility(); } @@ -1401,7 +1396,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) if (opt_key == "timelapse_type") { bool wipe_tower_enabled = m_config->option("enable_prime_tower")->value; if (!wipe_tower_enabled && boost::any_cast(value) == int(TimelapseType::tlSmooth)) { - MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timelapse. Do you want to enable both of them?"), + MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by smooth timelapse. If whthout prime tower, there will be flaws on the model. Do you want to enable prime tower?"), _L("Warning"), wxICON_WARNING | wxYES | wxNO); if (dlg.ShowModal() == wxID_YES) { DynamicPrintConfig new_conf = *m_config; @@ -1409,11 +1404,6 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) m_config_manipulation.apply(m_config, &new_conf); wxGetApp().plater()->update(); } - else { - DynamicPrintConfig new_conf = *m_config; - new_conf.set_key_value("timelapse_type", new ConfigOptionEnum(TimelapseType::tlNone)); - m_config_manipulation.apply(m_config, &new_conf); - } } else { wxGetApp().plater()->update(); }