mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
ENH: save filament sequences in gcode result
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I79c2eb4002c72568d487df417c914ab0b8a14a67 (cherry picked from commit a289370b19e78693698db388d4057e25ba285d6b)
This commit is contained in:
@@ -145,6 +145,15 @@ class Print;
|
||||
|
||||
struct GCodeProcessorResult
|
||||
{
|
||||
struct FilamentSequenceHash
|
||||
{
|
||||
uint64_t operator()(const std::vector<unsigned int>& layer_filament) const {
|
||||
uint64_t key = 0;
|
||||
for (auto& f : layer_filament)
|
||||
key |= (uint64_t(1) << f);
|
||||
return key;
|
||||
}
|
||||
};
|
||||
ConflictResultOpt conflict_result;
|
||||
GCodeCheckResult gcode_check_result;
|
||||
FilamentPrintableResult filament_printable_reuslt;
|
||||
@@ -241,6 +250,8 @@ class Print;
|
||||
std::vector<SliceWarning> warnings;
|
||||
int nozzle_hrc;
|
||||
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;
|
||||
BedType bed_type = BedType::btCount;
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
int64_t time{ 0 };
|
||||
|
||||
Reference in New Issue
Block a user