mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Ported Slic3r::GCode storage to XS
This commit is contained in:
@@ -97,4 +97,15 @@ Wipe::reset_path()
|
||||
REGISTER_CLASS(Wipe, "GCode::Wipe");
|
||||
#endif
|
||||
|
||||
GCode::GCode()
|
||||
: enable_loop_clipping(true), enable_cooling_markers(false), layer_count(0),
|
||||
layer_index(-1), first_layer(false), elapsed_time(0), volumetric_speed(0),
|
||||
last_pos_defined(false)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(GCode, "GCode");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,13 @@
|
||||
|
||||
#include <myinit.h>
|
||||
#include "ExPolygon.hpp"
|
||||
#include "GCodeWriter.hpp"
|
||||
#include "Layer.hpp"
|
||||
#include "MotionPlanner.hpp"
|
||||
#include "Point.hpp"
|
||||
#include "PlaceholderParser.hpp"
|
||||
#include "Print.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
@@ -54,6 +60,34 @@ class Wipe {
|
||||
//std::string wipe(GCode &gcodegen, bool toolchange = false);
|
||||
};
|
||||
|
||||
class GCode {
|
||||
public:
|
||||
|
||||
/* Origin of print coordinates expressed in unscaled G-code coordinates.
|
||||
This affects the input arguments supplied to the extrude*() and travel_to()
|
||||
methods. */
|
||||
Pointf origin;
|
||||
FullPrintConfig config;
|
||||
GCodeWriter writer;
|
||||
PlaceholderParser* placeholder_parser;
|
||||
OozePrevention ooze_prevention;
|
||||
Wipe wipe;
|
||||
AvoidCrossingPerimeters avoid_crossing_perimeters;
|
||||
bool enable_loop_clipping;
|
||||
bool enable_cooling_markers;
|
||||
size_t layer_count;
|
||||
int layer_index; // just a counter
|
||||
Layer* layer;
|
||||
std::map<PrintObject*,Point> _seam_position;
|
||||
bool first_layer; // this flag triggers first layer speeds
|
||||
unsigned int elapsed_time; // seconds
|
||||
Point last_pos;
|
||||
bool last_pos_defined;
|
||||
double volumetric_speed;
|
||||
|
||||
GCode();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user