ENH: Add prompt information when mixture of PLA and PETG

jira: STUDIO-9659
Change-Id: I03a09dd796074d0872010672bdd85688bb7f1715
(cherry picked from commit 903b230f389ac8fce2816a8d46a0675019af0b04)
This commit is contained in:
zhimin.zeng
2025-01-14 17:51:10 +08:00
committed by Noisyfox
parent cb26af8477
commit 10e676e439
5 changed files with 35 additions and 3 deletions

View File

@@ -2970,6 +2970,9 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
bool filament_printable = cur_plate->check_filament_printable(wxGetApp().preset_bundle->full_config(), filament_printable_error_msg);
_set_warning_notification(EWarning::FilamentPrintableError, !filament_printable);
bool mix_pla_and_petg = cur_plate->check_mixture_of_pla_and_petg(wxGetApp().preset_bundle->full_config());
_set_warning_notification(EWarning::MixUsePLAAndPETG, !mix_pla_and_petg);
bool model_fits = contained_min_one && !m_model->objects.empty() && !partlyOut && object_results.filaments.empty() && tpu_valid;
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, model_fits));
ppl.get_curr_plate()->update_slice_ready_status(model_fits);
@@ -2981,6 +2984,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
//_set_warning_notification(EWarning::SlaSupportsOutside, false);
_set_warning_notification(EWarning::TPUPrintableError, false);
_set_warning_notification(EWarning::FilamentPrintableError, false);
_set_warning_notification(EWarning::MixUsePLAAndPETG, false);
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, false));
}
}
@@ -10018,6 +10022,9 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
error = ErrorType::SLICING_ERROR;
break;
}
case EWarning::MixUsePLAAndPETG:
text = _u8L("PLA and PETG filaments detected in the mixture. Adjust parameters according to the Wiki to ensure print quality.");
break;
}
//BBS: this may happened when exit the app, plater is null
if (!wxGetApp().plater())