mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Completed implementation of 'File->GCode preview...' command
This commit is contained in:
parent
e010d287c5
commit
2f9dd9d9e8
3 changed files with 87 additions and 44 deletions
|
@ -1,6 +1,9 @@
|
|||
#include "GCodeReader.hpp"
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
@ -113,7 +116,11 @@ void GCodeReader::update_coordinates(GCodeLine &gline, std::pair<const char*, co
|
|||
|
||||
void GCodeReader::parse_file(const std::string &file, callback_t callback)
|
||||
{
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
boost::nowide::ifstream f(file);
|
||||
#else
|
||||
std::ifstream f(file);
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
std::string line;
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
m_parsing_file = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue