diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index f9d5e350b8..42217a310b 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3851,8 +3851,32 @@ std::vector Plater::priv::load_files(const std::vector& input_ // // Is there any modifier or advanced config data? // for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset(); // } - // } - else if (load_config && (file_version > app_version)) { + // } + // Orca: check if the project is created with OrcaSlicer 2.3.1-alpha and use the sparse infill rotation template for non-safe infill patterns + else if ((file_version < app_version) && file_version == Semver("2.3.1-alpha")) { + if (!config_loaded.opt_string("sparse_infill_rotate_template").empty()) { + const auto _sparse_infill_pattern = + config_loaded.option>("sparse_infill_pattern")->value; + bool is_safe_to_rotate = _sparse_infill_pattern == ipRectilinear || _sparse_infill_pattern == ipLine || + _sparse_infill_pattern == ipZigZag || _sparse_infill_pattern == ipCrossZag || + _sparse_infill_pattern == ipLockedZag; + if (!is_safe_to_rotate) { + wxString msg_text = _( + L("This project was created with an OrcaSlicer 2.3.1-alpha and uses " + "infill rotation template settings that may not work properly with your current infill pattern. " + "This could result in weak support or print quality issues.")); + msg_text += "\n\n" + + _(L("Would you like OrcaSlicer to automatically fix this by clearing the rotation template settings?")); + MessageDialog dialog(wxGetApp().plater(), msg_text, "", wxICON_WARNING | wxYES | wxNO); + dialog.SetButtonLabel(wxID_YES, _L("Yes")); + dialog.SetButtonLabel(wxID_NO, _L("No")); + if (dialog.ShowModal() == wxID_YES) { + config_loaded.opt_string("sparse_infill_rotate_template") = ""; + } + } + } + + } else if (load_config && (file_version > app_version)) { if (config_substitutions.unrecogized_keys.size() > 0) { wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, found following unrecognized keys:"), file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string()); @@ -3883,8 +3907,7 @@ std::vector Plater::priv::load_files(const std::vector& input_ show_info(q, text, _L("Newer 3mf version")); } } - } - else if (!load_config) { + } else if (!load_config) { // reset config except color for (ModelObject *model_object : model.objects) { bool has_extruder = model_object->config.has("extruder");