mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
ENABLE_GCODE_VIEWER - Basic framework for new gcode viewer
This commit is contained in:
parent
ebbebe3727
commit
3b6d334d7b
17 changed files with 173 additions and 48 deletions
|
@ -244,8 +244,12 @@ std::string gcode(Print & print)
|
|||
boost::filesystem::path temp = boost::filesystem::unique_path();
|
||||
print.set_status_silent();
|
||||
print.process();
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
print.export_gcode(temp.string(), nullptr, nullptr);
|
||||
#else
|
||||
print.export_gcode(temp.string(), nullptr);
|
||||
std::ifstream t(temp.string());
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
std::ifstream t(temp.string());
|
||||
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
|
||||
boost::nowide::remove(temp.string().c_str());
|
||||
return str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue