WIP: prusa-gcodeviewer command line wrapper to start the PrusaSlicer

in standalone G-code viewer mode.
Linux and OSX stuff will follow.
This commit is contained in:
bubnikv 2020-09-01 16:56:12 +02:00
parent ac9e1e8e4a
commit 08580a9b18
6 changed files with 52 additions and 1 deletions

View file

@ -101,6 +101,7 @@ int CLI::run(int argc, char **argv)
std::find(m_transforms.begin(), m_transforms.end(), "cut") == m_transforms.end() &&
std::find(m_transforms.begin(), m_transforms.end(), "cut_x") == m_transforms.end() &&
std::find(m_transforms.begin(), m_transforms.end(), "cut_y") == m_transforms.end();
bool start_as_gcodeviewer = false;
const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->values;
@ -521,6 +522,9 @@ int CLI::run(int argc, char **argv)
<< " (" << print.total_extruded_volume()/1000 << "cm3)" << std::endl;
*/
}
} else if (opt_key == "gcodeviewer") {
start_gui = true;
start_as_gcodeviewer = true;
} else {
boost::nowide::cerr << "error: option not supported yet: " << opt_key << std::endl;
return 1;