Draft for binary representation of G-code commands

This commit is contained in:
Alessandro Ranellucci 2014-05-10 15:08:49 +02:00
parent 7ba08c90cf
commit 65b7d27def
2 changed files with 36 additions and 0 deletions

View File

@ -1668,6 +1668,7 @@ src/ExtrusionEntityCollection.cpp
src/ExtrusionEntityCollection.hpp
src/Flow.cpp
src/Flow.hpp
src/GCode.hpp
src/Geometry.cpp
src/Geometry.hpp
src/Layer.hpp

35
xs/src/GCode.hpp Normal file
View File

@ -0,0 +1,35 @@
#ifndef slic3r_GCode_hpp_
#define slic3r_GCode_hpp_
#include <myinit.h>
#include <string>
namespace Slic3r {
// draft for a binary representation of a G-code line
enum GCodeCmdType {
gcctSyncMotion,
gcctExtrude,
gcctResetE,
gcctSetTemp,
gcctSetTempWait,
gcctToolchange,
gcctCustom
};
class GCodeCmd {
public:
GCodeCmdType type;
float X, Y, Z, E, F;
unsigned short T, S;
std::string custom, comment;
float xy_dist; // cache
GCodeCmd(GCodeCmdType type)
: type(type), X(0), Y(0), Z(0), E(0), F(0), T(-1), S(0), xy_dist(-1) {};
};
}
#endif