mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-16 01:19:47 -07:00
ENH: add filament map and filament list in GCode head
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Id214bcf5f76e6c59d4b8bcb55583f96b347630bf (cherry picked from commit d1e6680f4c19ae19e8328813528f21e63084e577)
This commit is contained in:
parent
cd9fd28c4e
commit
01673d1fef
1 changed files with 12 additions and 0 deletions
|
|
@ -2255,6 +2255,18 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
file.writeln(max_height_z_tip.str());
|
||||
}
|
||||
|
||||
{
|
||||
auto used_filaments = print.get_slice_used_filaments(false);
|
||||
std::ostringstream out;
|
||||
out << "; filament: ";
|
||||
for (size_t idx = 0; idx < used_filaments.size(); ++idx) {
|
||||
if (idx != 0)
|
||||
out << ',';
|
||||
out << used_filaments[idx] + 1;
|
||||
}
|
||||
file.writeln(out.str());
|
||||
}
|
||||
|
||||
file.write_format("; HEADER_BLOCK_END\n\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue