FIX: fix the error slice status

when filament printable check is not valid
jira: none

Change-Id: I6d98e3aa27b063d2e7431f7aa5637348978331f2
This commit is contained in:
zhimin.zeng 2025-02-14 21:18:20 +08:00 committed by lane.wei
parent 4747cbc53a
commit b0a8dd1014
2 changed files with 14 additions and 1 deletions

View File

@ -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<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, model_fits));
ppl.get_curr_plate()->update_slice_ready_status(model_fits);
}

View File

@ -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) {