NEW: add a new slicing warning

Change-Id: I62a31e505318441699141a5c86355c8d41b890f2
This commit is contained in:
Stone Li 2022-10-31 18:19:06 +08:00 committed by Lane.Wei
parent a9ac3657ca
commit e4198ad63a
3 changed files with 6 additions and 5 deletions

View file

@ -4026,7 +4026,7 @@ void GCodeProcessor::update_slice_warnings()
if (HRC != 0 && (m_result.nozzle_hrc<HRC)) { if (HRC != 0 && (m_result.nozzle_hrc<HRC)) {
GCodeProcessorResult::SliceWarning warning; GCodeProcessorResult::SliceWarning warning;
warning.level = 1; warning.level = 1;
warning.msg = THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN__THE_REQUAIRED_NOZZLE_HRC; warning.msg = THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN_THE_REQUAIRED_NOZZLE_HRC;
m_result.warnings.emplace_back(std::move(warning)); m_result.warnings.emplace_back(std::move(warning));
} }
} }

View file

@ -17,8 +17,8 @@
namespace Slic3r { namespace Slic3r {
// slice warnings enum strings // slice warnings enum strings
#define THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN__THE_REQUAIRED_NOZZLE_HRC "the_actual_nozzle_hrc_smaller_than_the_required_nozzle_hrc" #define THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN_THE_REQUAIRED_NOZZLE_HRC "the_actual_nozzle_hrc_smaller_than_the_required_nozzle_hrc"
#define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament" #define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament"
enum class EMoveType : unsigned char enum class EMoveType : unsigned char
{ {

View file

@ -2575,8 +2575,9 @@ wxString Plater::get_slice_warning_string(GCodeProcessorResult::SliceWarning& wa
{ {
if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) { if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) {
return _L("The bed temperature exceeds filament's vitrification temperature. Please open the front door of printer before printing to avoid nozzle clog."); return _L("The bed temperature exceeds filament's vitrification temperature. Please open the front door of printer before printing to avoid nozzle clog.");
} } else if (warning.msg == THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN_THE_REQUAIRED_NOZZLE_HRC) {
else { return _L("The nozzle hardness required by the filament is higher than the default nozzle hardness of the printer. Please replace the hardened nozzle or filament, otherwise, the nozzle will be attrited or damaged.");
} else {
return wxString(warning.msg); return wxString(warning.msg);
} }
} }