GCodeViewer -> Export of extrude toolpaths to obj files

This commit is contained in:
enricoturri1966 2020-07-03 12:17:12 +02:00
parent feb4857cf8
commit 0b1086f390
6 changed files with 300 additions and 10 deletions

View file

@ -1373,9 +1373,13 @@ void MainFrame::init_gcodeviewer_menubar()
wxMenu* fileMenu = new wxMenu;
{
append_menu_item(fileMenu, wxID_ANY, _L("&Open G-code") + dots + "\tCtrl+O", _L("Open a G-code file"),
[this](wxCommandEvent&) { if (m_plater) m_plater->load_gcode(); }, "open", nullptr,
[this](wxCommandEvent&) { if (m_plater != nullptr) m_plater->load_gcode(); }, "open", nullptr,
[this]() {return m_plater != nullptr; }, this);
fileMenu->AppendSeparator();
append_menu_item(fileMenu, wxID_ANY, _L("Export &toolpaths as OBJ") + dots, _L("Export toolpaths as OBJ"),
[this](wxCommandEvent&) { if (m_plater != nullptr) m_plater->export_toolpaths_to_obj(); }, "export_plater", nullptr,
[this]() {return can_export_toolpaths(); }, this);
fileMenu->AppendSeparator();
append_menu_item(fileMenu, wxID_ANY, _L("Exit &G-code preview"), _L("Switch to editor mode"),
[this](wxCommandEvent&) { set_mode(EMode::Editor); });
fileMenu->AppendSeparator();