mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-11 17:49:00 +08: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
This commit is contained in:
parent
3eac767b14
commit
d1e6680f4c
@ -1991,6 +1991,18 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||||||
file.writeln(max_height_z_tip.str());
|
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");
|
file.write_format("; HEADER_BLOCK_END\n\n");
|
||||||
|
|
||||||
//BBS: write global config at the beginning of gcode file because printer need these config information
|
//BBS: write global config at the beginning of gcode file because printer need these config information
|
||||||
|
Loading…
x
Reference in New Issue
Block a user