mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
GCode Viewer - Fixed color print visualization for gcode containing multiple extruders
This commit is contained in:
parent
006630299b
commit
bf12c7cb8c
7 changed files with 57 additions and 24 deletions
|
@ -508,6 +508,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||
m_flavor = config.gcode_flavor;
|
||||
|
||||
size_t extruders_count = config.nozzle_diameter.values.size();
|
||||
m_result.extruders_count = extruders_count;
|
||||
|
||||
m_extruder_offsets.resize(extruders_count);
|
||||
for (size_t i = 0; i < extruders_count; ++i) {
|
||||
|
@ -580,6 +581,8 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||
}
|
||||
}
|
||||
|
||||
m_result.extruders_count = config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
|
||||
const ConfigOptionPoints* extruder_offset = config.option<ConfigOptionPoints>("extruder_offset");
|
||||
if (extruder_offset != nullptr) {
|
||||
m_extruder_offsets.resize(extruder_offset->values.size());
|
||||
|
|
|
@ -283,6 +283,7 @@ namespace Slic3r {
|
|||
std::vector<MoveVertex> moves;
|
||||
Pointfs bed_shape;
|
||||
SettingsIds settings_ids;
|
||||
size_t extruders_count;
|
||||
std::vector<std::string> extruder_colors;
|
||||
PrintEstimatedTimeStatistics time_statistics;
|
||||
|
||||
|
@ -294,6 +295,7 @@ namespace Slic3r {
|
|||
moves = std::vector<MoveVertex>();
|
||||
bed_shape = Pointfs();
|
||||
extruder_colors = std::vector<std::string>();
|
||||
extruders_count = 0;
|
||||
settings_ids.reset();
|
||||
}
|
||||
#else
|
||||
|
@ -302,6 +304,7 @@ namespace Slic3r {
|
|||
moves = std::vector<MoveVertex>();
|
||||
bed_shape = Pointfs();
|
||||
extruder_colors = std::vector<std::string>();
|
||||
extruders_count = 0;
|
||||
settings_ids.reset();
|
||||
}
|
||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue