mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: add warning info when bed temperature is too high
Add bed temperature checker in gcode processer. And save slice warning into GcodeProcessorResult. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Iee96e4ab165a3171a5a1e165450bfc360401647f
This commit is contained in:
parent
48aed7fbe5
commit
99974c7f59
7 changed files with 115 additions and 12 deletions
|
@ -131,14 +131,12 @@ namespace Slic3r {
|
|||
}
|
||||
};
|
||||
|
||||
struct SliceWarnings {
|
||||
struct SliceWarning {
|
||||
int level; // 0: normal tips, 1: warning; 2: error
|
||||
std::string msg; // enum string
|
||||
std::vector<std::string> params; // extra msg info
|
||||
};
|
||||
|
||||
std::vector<SliceWarnings> warnings;
|
||||
|
||||
std::string filename;
|
||||
unsigned int id;
|
||||
std::vector<MoveVertex> moves;
|
||||
|
@ -155,8 +153,11 @@ namespace Slic3r {
|
|||
std::vector<std::string> extruder_colors;
|
||||
std::vector<float> filament_diameters;
|
||||
std::vector<float> filament_densities;
|
||||
std::vector<int> filament_vitrification_temperature;
|
||||
PrintEstimatedStatistics print_statistics;
|
||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
|
||||
//BBS
|
||||
std::vector<SliceWarning> warnings;
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
int64_t time{ 0 };
|
||||
|
@ -182,6 +183,7 @@ namespace Slic3r {
|
|||
filament_densities = other.filament_densities;
|
||||
print_statistics = other.print_statistics;
|
||||
custom_gcode_per_print_z = other.custom_gcode_per_print_z;
|
||||
warnings = other.warnings;
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
time = other.time;
|
||||
#endif
|
||||
|
@ -604,6 +606,7 @@ namespace Slic3r {
|
|||
unsigned char m_last_extruder_id;
|
||||
ExtruderColors m_extruder_colors;
|
||||
ExtruderTemps m_extruder_temps;
|
||||
int m_highest_bed_temp;
|
||||
float m_extruded_last_z;
|
||||
float m_first_layer_height; // mm
|
||||
float m_zero_layer_height; // mm
|
||||
|
@ -770,6 +773,12 @@ namespace Slic3r {
|
|||
// Set tool (MakerWare)
|
||||
void process_M135(const GCodeReader::GCodeLine& line);
|
||||
|
||||
//BBS: Set bed temperature
|
||||
void process_M140(const GCodeReader::GCodeLine& line);
|
||||
|
||||
//BBS: wait bed temperature
|
||||
void process_M190(const GCodeReader::GCodeLine& line);
|
||||
|
||||
// Set max printing acceleration
|
||||
void process_M201(const GCodeReader::GCodeLine& line);
|
||||
|
||||
|
@ -822,6 +831,7 @@ namespace Slic3r {
|
|||
void set_travel_acceleration(PrintEstimatedStatistics::ETimeMode mode, float value);
|
||||
float get_filament_load_time(size_t extruder_id);
|
||||
float get_filament_unload_time(size_t extruder_id);
|
||||
int get_filament_vitrification_temperature(size_t extrude_id);
|
||||
|
||||
void process_custom_gcode_time(CustomGCode::Type code);
|
||||
void process_filaments(CustomGCode::Type code);
|
||||
|
@ -830,6 +840,8 @@ namespace Slic3r {
|
|||
void simulate_st_synchronize(float additional_time = 0.0f);
|
||||
|
||||
void update_estimated_times_stats();
|
||||
//BBS:
|
||||
void update_slice_warnings();
|
||||
};
|
||||
|
||||
} /* namespace Slic3r */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue