mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-28 11:50:49 -07:00
ENH: refresh FilamentUnPrintableOnFirstLayer error state
jira: none Change-Id: Ifec994cdba2c9590d4c1f8b59e6052593fd05bc2 (cherry picked from commit 04eeb40e1eba976e0921686bf6d66599a90e81cc)
This commit is contained in:
parent
6c002687e0
commit
307bb051e6
4 changed files with 30 additions and 1 deletions
|
|
@ -2961,6 +2961,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
//BBS:exclude the assmble view
|
||||
if (m_canvas_type != ECanvasType::CanvasAssembleView) {
|
||||
_set_warning_notification_if_needed(EWarning::GCodeConflict);
|
||||
_set_warning_notification(EWarning::FilamentUnPrintableOnFirstLayer, false);
|
||||
// checks for geometry outside the print volume to render it accordingly
|
||||
if (!m_volumes.empty()) {
|
||||
ModelInstanceEPrintVolumeState state;
|
||||
|
|
@ -10110,6 +10111,14 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
|||
notification_manager.close_slicing_serious_warning_notification(text);
|
||||
break;
|
||||
case SLICING_ERROR:
|
||||
if (warning == EWarning::FilamentUnPrintableOnFirstLayer) {
|
||||
if (state) {
|
||||
notification_manager.bbl_show_bed_filament_incompatible_notification(text);
|
||||
}
|
||||
else {
|
||||
notification_manager.bbl_close_bed_filament_incompatible_notification();
|
||||
}
|
||||
}
|
||||
if (warning == EWarning::FilamentPrintableError) {
|
||||
if (state)
|
||||
notification_manager.push_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel, text);
|
||||
|
|
|
|||
|
|
@ -3077,6 +3077,21 @@ void NotificationManager::bbl_close_gcode_overlap_notification()
|
|||
if (notification->get_type() == NotificationType::BBLGcodeOverlap) { notification->close(); }
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_bed_filament_incompatible_notification(const std::string& text)
|
||||
{
|
||||
auto callback = [](wxEvtHandler*) {
|
||||
const wxString bed_filament_compatibility_wiki = "https://wiki.bambulab.com/en/general/filament-guide-material-table";
|
||||
wxGetApp().open_browser_with_warning_dialog(bed_filament_compatibility_wiki);
|
||||
return false;
|
||||
};
|
||||
push_notification_data({ NotificationType::BBLBedFilamentIncompatible,NotificationLevel::ErrorNotificationLevel,0,_u8L("Error:") + "\n" + text,"Click for more.",callback }, 0);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_close_bed_filament_incompatible_notification()
|
||||
{
|
||||
close_notification_of_type(NotificationType::BBLBedFilamentIncompatible);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_sole_text_notification(NotificationType sType, const std::string &text, bool bOverride, int level, bool autohide) {
|
||||
|
||||
NotificationLevel nlevel;
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ enum class NotificationType
|
|||
BBLFilamentPrintableError,
|
||||
BBLSliceLimitError,
|
||||
BBLSliceMultiExtruderHeightOutside,
|
||||
BBLBedFilamentIncompatible,
|
||||
NotificationTypeCount
|
||||
|
||||
};
|
||||
|
|
@ -360,6 +361,10 @@ public:
|
|||
void bbl_show_gcode_overlap_notification();
|
||||
void bbl_close_gcode_overlap_notification();
|
||||
|
||||
//BBS--bed filament match
|
||||
void bbl_show_bed_filament_incompatible_notification(const std::string& text);
|
||||
void bbl_close_bed_filament_incompatible_notification();
|
||||
|
||||
//BBS--sole notification
|
||||
void bbl_show_sole_text_notification(NotificationType sType,const std::string &text, bool bOverride, int level, bool autohide);
|
||||
void bbl_chose_sole_text_notification(NotificationType sType);
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ public:
|
|||
bool result = m_slice_result_valid;
|
||||
if (result)
|
||||
result = m_gcode_result ?
|
||||
(!m_gcode_result->toolpath_outside && m_gcode_result->gcode_check_result.error_code == 0) :
|
||||
(!m_gcode_result->toolpath_outside && m_gcode_result->gcode_check_result.error_code == 0 && !m_gcode_result->filament_printable_reuslt.has_value()) :
|
||||
false;// && !m_gcode_result->conflict_result.has_value() gcode conflict can also print
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue