Print/Delete support for .gcode.3mf files

This commit is contained in:
Lam Wei Lun
2026-10-06 15:42:32 +08:00
parent 3e7f0c027a
commit 432d6be518
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ OrcaFilesPanel::OrcaFilesPanel(wxWindow* parent)
wxOK | wxICON_ERROR).ShowModal();
});
} else if (action == 1) {
// Print is .gcode-only for now; .gcode.3mf support to be added later.
// OrcaSonar unpacks a .gcode.3mf to its plate G-code before starting the print.
MessageDialog dlg(this,
wxString::Format(_L("Do you want to print the file '%s' from printer?"), from_u8(name)),
_L("Print file"), wxYES_NO | wxICON_WARNING);
@@ -61,10 +61,11 @@ bool is_displayable_file(const std::string& name)
return ends_with_ci(name, ".gcode") || ends_with_ci(name, ".3mf");
}
// Only .gcode is printable today; .gcode.3mf support to be added later.
// .gcode and .gcode.3mf are printable; OrcaSonar unpacks a 3MF to its plate
// G-code. A bare .3mf is an unsliced project file, so it stays unprintable.
bool is_printable_gcode(const std::string& name)
{
return ends_with_ci(name, ".gcode");
return ends_with_ci(name, ".gcode") || ends_with_ci(name, ".gcode.3mf");
}
}