Ported Slic3r::GCode storage to XS

This commit is contained in:
Alessandro Ranellucci 2015-07-01 21:47:17 +02:00
parent ab858f320d
commit 801f629fdc
13 changed files with 199 additions and 64 deletions

View file

@ -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