Xinqi Bao's Git

XbSlicer, re-organized the entire project
[XbSlicer.git] / src / GCode.hh
1 #pragma once
2
3 /*
4 @author: Xinqi Bao
5 After having loops for one layer, can use this class to generate the
6 gcode
7 */
8
9 #include <vector>
10
11 #include "Cross.hh"
12 #include "Layer.hh"
13 #include "Loop.hh"
14
15 static double dp = 1;
16
17 class Gcode
18 {
19 private:
20 int numParts;
21 double &minX, &maxX;
22 std::vector<Loop>& loops;
23 std::vector<Command>&
24 commands; // contain each line of gcode, stored to layer
25 std::vector<std::vector<Cross>>& parts;
26 void G0(double x, double y, double z);
27 void G0(double x, double y);
28 void G0_high(double z);
29 void G1(double x, double y);
30 void resetE();
31 void outline(); // method before implement subLoops
32 void fill(); // method before implement subLoops
33 void doLoops(); //***method using implement subLoops***
34 void fillLoop(Loop& lp); //***method using implement subLoops***
35 public:
36 Gcode(Layer& layer);
37 };