#9823 - Fixed parsing of gcode generated by Simplify3D

This commit is contained in:
enricoturri1966 2023-02-22 11:33:39 +01:00
parent beabf46e87
commit 17899adc69

View file

@ -472,7 +472,7 @@ const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProces
{ EProducer::Slic3r, "generated by Slic3r" },
{ EProducer::SuperSlicer, "generated by SuperSlicer" },
{ EProducer::Cura, "Cura_SteamEngine" },
{ EProducer::Simplify3D, "G-Code generated by Simplify3D(R)" },
{ EProducer::Simplify3D, "generated by Simplify3D(R)" },
{ EProducer::CraftWare, "CraftWare" },
{ EProducer::ideaMaker, "ideaMaker" },
{ EProducer::KissSlicer, "KISSlicer" },
@ -2025,10 +2025,10 @@ bool GCodeProcessor::process_simplify3d_tags(const std::string_view comment)
return true;
}
// ; layer
tag = " layer";
// ; layer | ;layer
tag = "layer";
pos = cmt.find(tag);
if (pos == 0) {
if (pos == 0 || pos == 1) {
// skip lines "; layer end"
const std::string_view data = cmt.substr(pos + tag.length());
size_t end_start = data.find("end");