ENH: save filament change count in gcode result

1.Save filament change count per filament

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I26e7963c0b5fdcca7c7d0ec5590c3f40c1fc5eed
(cherry picked from commit 759d78dd2bad7157af8d41570ff24e5f7c4a364f)
This commit is contained in:
xun.zhang
2024-12-30 20:59:48 +08:00
committed by Noisyfox
parent 55ec1da34f
commit f636c494cd
3 changed files with 25 additions and 3 deletions

View File

@@ -256,6 +256,9 @@ class Print;
std::vector<NozzleType> nozzle_type;
// first key stores filaments, second keys stores the layer ranges(enclosed) that use the filaments
std::unordered_map<std::vector<unsigned int>, std::vector<std::pair<int, int>>,FilamentSequenceHash> layer_filaments;
// first key stores `from` filament, second keys stores the `to` filament
std::map<std::pair<int,int>, int > filament_change_count_map;
BedType bed_type = BedType::btCount;
#if ENABLE_GCODE_VIEWER_STATISTICS
int64_t time{ 0 };
@@ -291,6 +294,8 @@ class Print;
gcode_check_result = other.gcode_check_result;
limit_filament_maps = other.limit_filament_maps;
filament_printable_reuslt = other.filament_printable_reuslt;
layer_filaments = other.layer_filaments;
filament_change_count_map = other.filament_change_count_map;
#if ENABLE_GCODE_VIEWER_STATISTICS
time = other.time;
#endif