mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-28 21:32:11 +00:00
ENH: add filament saved by multi extruder
1.Add filament flush,filament change count reduced by multi extruder NTOE: cases when printing by object haven't been handled jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Iaaea5f8ffae2345df5a6f1dc605342d835974d48 (cherry picked from commit ad65cdb909b29210117f690a119ef76b70373da4)
This commit is contained in:
@@ -824,6 +824,17 @@ class ConstPrintRegionPtrsAdaptor : public ConstVectorOfPtrsAdaptor<PrintRegion>
|
||||
};
|
||||
*/
|
||||
|
||||
struct StatisticsByExtruderCount
|
||||
{
|
||||
// multi extruder always comes first
|
||||
std::vector<int> filament_flush_weight{ 0,0 };
|
||||
std::vector<int> filament_change_count{ 0,0 };
|
||||
void clear() {
|
||||
filament_flush_weight.clear();
|
||||
filament_change_count.clear();
|
||||
}
|
||||
};
|
||||
|
||||
enum FilamentTempType {
|
||||
HighTemp=0,
|
||||
LowTemp,
|
||||
@@ -929,6 +940,9 @@ public:
|
||||
const PrintStatistics& print_statistics() const { return m_print_statistics; }
|
||||
PrintStatistics& print_statistics() { return m_print_statistics; }
|
||||
|
||||
const StatisticsByExtruderCount statistics_by_extruder() const { return m_statistics_by_extruder_count; }
|
||||
StatisticsByExtruderCount& statistics_by_extruder() { return m_statistics_by_extruder_count; }
|
||||
|
||||
// Wipe tower support.
|
||||
bool has_wipe_tower() const;
|
||||
const WipeTowerData& wipe_tower_data(size_t filaments_cnt = 0) const;
|
||||
@@ -1060,6 +1074,7 @@ private:
|
||||
// Estimated print time, filament consumed.
|
||||
PrintStatistics m_print_statistics;
|
||||
bool m_support_used {false};
|
||||
StatisticsByExtruderCount m_statistics_by_extruder_count;
|
||||
|
||||
//BBS: plate's origin
|
||||
Vec3d m_origin;
|
||||
|
||||
Reference in New Issue
Block a user