diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 434f479e61..a889cd3412 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -2302,14 +2302,6 @@ bool model_has_parameter_modifiers_in_objects(const Model &model) return false; } -bool model_has_multi_part_objects(const Model &model) -{ - for (const ModelObject *model_object : model.objects) - if (model_object->volumes.size() != 1 || ! model_object->volumes.front()->is_model_part()) - return true; - return false; -} - bool model_has_advanced_features(const Model &model) { auto config_is_advanced = [](const ModelConfig &config) { diff --git a/src/libslic3r/Model.hpp b/src/libslic3r/Model.hpp index fe27806b4b..08e8224c11 100644 --- a/src/libslic3r/Model.hpp +++ b/src/libslic3r/Model.hpp @@ -1449,9 +1449,6 @@ extern bool model_fuzzy_skin_data_changed(const ModelObject &mo, const ModelObje // If the model has object(s) which contains a modofoer, then it is currently not supported by the SLA mode. // Either the model cannot be loaded, or a SLA printer has to be activated. bool model_has_parameter_modifiers_in_objects(const Model& model); -// If the model has multi-part objects, then it is currently not supported by the SLA mode. -// Either the model cannot be loaded, or a SLA printer has to be activated. -bool model_has_multi_part_objects(const Model &model); // If the model has advanced features, then it cannot be processed in simple mode. bool model_has_advanced_features(const Model &model); diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index a052b6b4e3..de081bcf80 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -3311,9 +3311,10 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese const auto enabled_vendors = appconfig_new.vendors(); const auto enabled_vendors_old = app_config->vendors(); - bool suppress_sla_printer = model_has_multi_part_objects(wxGetApp().model()); + bool show_info_msg = false; + bool suppress_sla_printer = model_has_parameter_modifiers_in_objects(wxGetApp().model()); PrinterTechnology preferred_pt = ptAny; - auto get_preferred_printer_technology = [enabled_vendors, enabled_vendors_old, suppress_sla_printer](const std::string& bundle_name, const Bundle& bundle) { + auto get_preferred_printer_technology = [enabled_vendors, enabled_vendors_old, suppress_sla_printer, &show_info_msg](const std::string& bundle_name, const Bundle& bundle) { const auto config = enabled_vendors.find(bundle_name); PrinterTechnology pt = ptAny; if (config != enabled_vendors.end()) { @@ -3323,17 +3324,21 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese pt = model.technology; const auto config_old = enabled_vendors_old.find(bundle_name); if (config_old == enabled_vendors_old.end() || config_old->second.find(model.id) == config_old->second.end()) { - // if preferred printer model has SLA printer technology it's important to check the model for multi-part state - if (pt == ptSLA && suppress_sla_printer) + // if preferred printer model has SLA printer technology it's important to check the model for modifiers + if (pt == ptSLA && suppress_sla_printer) { + show_info_msg = true; continue; + } return pt; } if (const auto model_it_old = config_old->second.find(model.id); model_it_old == config_old->second.end() || model_it_old->second != model_it->second) { - // if preferred printer model has SLA printer technology it's important to check the model for multi-part state - if (pt == ptSLA && suppress_sla_printer) + // if preferred printer model has SLA printer technology it's important to check the model for modifiers + if (pt == ptSLA && suppress_sla_printer) { + show_info_msg = true; continue; + } return pt; } } @@ -3355,8 +3360,9 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese } } - if (preferred_pt == ptSLA && !wxGetApp().may_switch_to_SLA_preset(caption)) - return false; + if (show_info_msg) + show_info(nullptr, _L("It's impossible to print object(s) which contains parameter modifiers with SLA technology.\n\n" + "SLA-printer preset will not be selected"), caption); bool check_unsaved_preset_changes = page_welcome->reset_user_profile(); if (check_unsaved_preset_changes) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 15d2d5cd49..22fef94c11 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3350,9 +3350,6 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage break; } } - // #ysFIXME - delete after testing: This part of code looks redundant. All checks are inside ConfigWizard::priv::apply_config() - if (preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA) - may_switch_to_SLA_preset(_L("Configuration is editing from ConfigWizard")); } return res; }