From b0a8dd1014d3184be8ef9f2a4e9bd304cf4bdea3 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Fri, 14 Feb 2025 21:18:20 +0800 Subject: [PATCH] FIX: fix the error slice status when filament printable check is not valid jira: none Change-Id: I6d98e3aa27b063d2e7431f7aa5637348978331f2 --- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- src/slic3r/GUI/Plater.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 13eda2be5..4a4cb977c 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3071,7 +3071,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re 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; + bool model_fits = contained_min_one && !m_model->objects.empty() && !partlyOut && object_results.filaments.empty() && tpu_valid && filament_printable; post_event(Event(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, model_fits)); ppl.get_curr_plate()->update_slice_ready_status(model_fits); } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 2353c0d39..18a957b0c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -15908,6 +15908,19 @@ void Plater::validate_current_plate(bool& model_fits, bool& validate_error) ObjectFilamentResults object_results; ModelInstanceEPrintVolumeState state = p->view3D->get_canvas3d()->check_volumes_outside_state(&object_results); model_fits = (state != ModelInstancePVS_Partly_Outside); + + PartPlate *cur_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate(); + if (model_fits) { // TPU check + bool tpu_valid = cur_plate->check_tpu_printable_status(wxGetApp().preset_bundle->full_config(), wxGetApp().preset_bundle->get_used_tpu_filaments(cur_plate->get_extruders(true))); + model_fits &= tpu_valid; + } + + if (model_fits) { // Filament printable check + wxString filament_printable_error_msg; + bool filament_printable = cur_plate->check_filament_printable(wxGetApp().preset_bundle->full_config(), filament_printable_error_msg); + model_fits &= filament_printable; + } + model_fits = model_fits && object_results.filaments.empty(); validate_error = false; if (p->printer_technology == ptFFF) {