1st installment of g-code window in preview
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#if ENABLE_GCODE_WINDOW
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#endif // ENABLE_GCODE_WINDOW
|
||||
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
@@ -976,6 +979,9 @@ void GCodeProcessor::process_file(const std::string& filename, bool apply_postpr
|
||||
}
|
||||
|
||||
// process gcode
|
||||
#if ENABLE_GCODE_WINDOW
|
||||
m_result.filename = filename;
|
||||
#endif // ENABLE_GCODE_WINDOW
|
||||
m_result.id = ++s_result_id;
|
||||
// 1st move must be a dummy move
|
||||
m_result.moves.emplace_back(MoveVertex());
|
||||
|
||||
@@ -334,13 +334,15 @@ namespace Slic3r {
|
||||
std::vector<std::string> filament;
|
||||
std::string printer;
|
||||
|
||||
void reset()
|
||||
{
|
||||
void reset() {
|
||||
print = "";
|
||||
filament = std::vector<std::string>();
|
||||
printer = "";
|
||||
}
|
||||
};
|
||||
#if ENABLE_GCODE_WINDOW
|
||||
std::string filename;
|
||||
#endif // ENABLE_GCODE_WINDOW
|
||||
unsigned int id;
|
||||
std::vector<MoveVertex> moves;
|
||||
Pointfs bed_shape;
|
||||
|
||||
Reference in New Issue
Block a user