Skip to content

Commit

Permalink
FIX: [bambulab#3375] Force .gcode.3mf file extension
Browse files Browse the repository at this point in the history
github: bambulab#3375

Change-Id: Id0a1e8e5c9d6ebaceaac52e31cc64d60c6b266a2
  • Loading branch information
DanBao-Bambu authored and hadess committed Jun 22, 2024
1 parent 5df3f6b commit fd145bc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10783,7 +10783,17 @@ void Plater::export_gcode_3mf(bool export_all)
output_path = into_path(dlg.GetPath());
ext = output_path.extension().string();
if (ext != ".3mf")
output_path = output_path.string() + ".3mf";
output_path = output_path.string() + ".gcode.3mf";
else {
std::string path = output_path.string();
path = path.substr(0, path.size() - 4);
if (path.size() < 6)
output_path = output_path.replace_extension(".gcode.3mf");
else {
std::string extension = path.substr(path.size() - 6);
if (extension != ".gcode") output_path = output_path.replace_extension(".gcode.3mf");
}
}
}
}

Expand Down

0 comments on commit fd145bc

Please sign in to comment.