ENH: expor core spec 3mf
Change-Id: I97ccd87f29668833881b9327b251c2ca110ecd31
This commit is contained in:
parent
29267b58d3
commit
0fa82b5e18
|
@ -1765,6 +1765,9 @@ void MainFrame::init_menubar_as_editor()
|
||||||
append_menu_item(export_menu, wxID_ANY, _L("Export all objects as STL") + dots, _L("Export all objects as STL"),
|
append_menu_item(export_menu, wxID_ANY, _L("Export all objects as STL") + dots, _L("Export all objects as STL"),
|
||||||
[this](wxCommandEvent&) { if (m_plater) m_plater->export_stl(); }, "menu_export_stl", nullptr,
|
[this](wxCommandEvent&) { if (m_plater) m_plater->export_stl(); }, "menu_export_stl", nullptr,
|
||||||
[this](){return can_export_model(); }, this);
|
[this](){return can_export_model(); }, this);
|
||||||
|
append_menu_item(export_menu, wxID_ANY, _L("Export Generic 3MF") + dots/* + "\tCtrl+G"*/, _L("Export 3mf file without using some 3mf-extensions"),
|
||||||
|
[this](wxCommandEvent&) { if (m_plater) m_plater->export_core_3mf(); }, "menu_export_sliced_file", nullptr,
|
||||||
|
[this](){return can_export_model(); }, this);
|
||||||
// BBS export .gcode.3mf
|
// BBS export .gcode.3mf
|
||||||
append_menu_item(export_menu, wxID_ANY, _L("Export Sliced File") + dots/* + "\tCtrl+G"*/, _L("Export current Sliced file"),
|
append_menu_item(export_menu, wxID_ANY, _L("Export Sliced File") + dots/* + "\tCtrl+G"*/, _L("Export current Sliced file"),
|
||||||
[this](wxCommandEvent&) { if (m_plater) wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_EXPORT_SLICED_FILE)); }, "menu_export_sliced_file", nullptr,
|
[this](wxCommandEvent&) { if (m_plater) wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_EXPORT_SLICED_FILE)); }, "menu_export_sliced_file", nullptr,
|
||||||
|
|
|
@ -8057,6 +8057,14 @@ void Plater::export_gcode_3mf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Plater::export_core_3mf()
|
||||||
|
{
|
||||||
|
wxString path = p->get_export_file(FT_3MF);
|
||||||
|
if (path.empty()) { return; }
|
||||||
|
const std::string path_u8 = into_u8(path);
|
||||||
|
export_3mf(path_u8, SaveStrategy::Silence);
|
||||||
|
}
|
||||||
|
|
||||||
void Plater::export_stl(bool extended, bool selection_only)
|
void Plater::export_stl(bool extended, bool selection_only)
|
||||||
{
|
{
|
||||||
if (p->model.objects.empty()) { return; }
|
if (p->model.objects.empty()) { return; }
|
||||||
|
|
|
@ -297,6 +297,7 @@ public:
|
||||||
|
|
||||||
void export_gcode(bool prefer_removable);
|
void export_gcode(bool prefer_removable);
|
||||||
void export_gcode_3mf();
|
void export_gcode_3mf();
|
||||||
|
void export_core_3mf();
|
||||||
void export_stl(bool extended = false, bool selection_only = false);
|
void export_stl(bool extended = false, bool selection_only = false);
|
||||||
//BBS: remove amf
|
//BBS: remove amf
|
||||||
//void export_amf();
|
//void export_amf();
|
||||||
|
|
Loading…
Reference in New Issue