initial version, DXFs can b...
Stefan Schuermans authored 11 years ago
|
1) /* drawing (DXF) to G-code (NGC) converter
2) * Copyright 2013 Stefan Schuermans <stefan@schuermans.info>
3) * Copyleft: CC-BY-SA http://creativecommons.org/licenses/by-sa/3.0/
4) */
5)
6) #ifndef CMDPARSER_H
7) #define CMDPARSER_H
8)
9) #include <iostream>
10) #include <string>
11)
12) #include "drawing.h"
|
implement converting paths...
Stefan Schuermans authored 11 years ago
|
13) #include "gcode.h"
14) #include "layer.h"
15) #include "polygons.h"
|
initial version, DXFs can b...
Stefan Schuermans authored 11 years ago
|
16) #include "settings.h"
17)
18) /// command parser
19) class CmdParser {
20) public:
|
implement converting paths...
Stefan Schuermans authored 11 years ago
|
21) /**
22) * @brief get layer by name from stream
23) * @param[in] strm stream to read layer name from
24) * @param[out] name layer name from stream
25) * @param[out] layer layer indicated by name from stream
26) * @return if layer could be found
27) */
28) bool getLayer(std::istream &strm, std::string &name,
29) const Layer *&layer) const;
30)
31) /**
32) * @brief get layer by name from stream and convert to polygons
33) * @param[in] strm stream to read layer name from
34) * @param[out] name layer name from stream
35) * @param[out] layer layer indicated by name from stream
36) * @param[in,out] polys polygons created from layer
37) * @return if layer could be found and converted to polygons
38) */
39) bool getLayerPolys(std::istream &strm, std::string &name,
40) const Layer *&layer, Polygons &polys) const;
41)
|
initial version, DXFs can b...
Stefan Schuermans authored 11 years ago
|
42) /**
43) * @brief process cmd command
44) * @param[in] strm stream to read command arguments from
45) * @return if processing command was successful
46) */
47) bool procCmd_cmd(std::istream &strm);
48)
49) /**
50) * @brief process cut command
51) * @param[in] strm stream to read command arguments from
52) * @return if processing command was successful
53) */
54) bool procCmd_cut(std::istream &strm);
55)
|
implement converting paths...
Stefan Schuermans authored 11 years ago
|
56) /**
57) * @brief process cut_inside command
58) * @param[in] strm stream to read command arguments from
59) * @return if processing command was successful
60) */
61) bool procCmd_cut_inside(std::istream &strm);
62)
63) /**
64) * @brief process cut_outside command
65) * @param[in] strm stream to read command arguments from
66) * @return if processing command was successful
67) */
68) bool procCmd_cut_outside(std::istream &strm);
69)
70) /**
71) * @brief process cut_pocket command
72) * @param[in] strm stream to read command arguments from
73) * @return if processing command was successful
74) */
75) bool procCmd_cut_pocket(std::istream &strm);
76)
|
initial version, DXFs can b...
Stefan Schuermans authored 11 years ago
|
77) /**
78) * @brief process read_dxf command
79) * @param[in] strm stream to read command arguments from
80) * @return if processing command was successful
81) */
82) bool procCmd_read_dxf(std::istream &strm);
83)
84) /**
85) * @brief process set_base_z command
86) * @param[in] strm stream to read command arguments from
87) * @return if processing command was successful
88) */
89) bool procCmd_set_base_z(std::istream &strm);
90)
91) /**
92) * @brief process set_cut_z command
93) * @param[in] strm stream to read command arguments from
94) * @return if processing command was successful
95) */
96) bool procCmd_set_cut_z(std::istream &strm);
97)
98) /**
99) * @brief process set_cut_z_step command
100) * @param[in] strm stream to read command arguments from
101) * @return if processing command was successful
102) */
103) bool procCmd_set_cut_z_step(std::istream &strm);
104)
105) /**
106) * @brief process set_feed_drill command
107) * @param[in] strm stream to read command arguments from
108) * @return if processing command was successful
109) */
110) bool procCmd_set_feed_drill(std::istream &strm);
111)
112) /**
113) * @brief process set_feed_mill command
114) * @param[in] strm stream to read command arguments from
115) * @return if processing command was successful
116) */
117) bool procCmd_set_feed_mill(std::istream &strm);
118)
119) /**
120) * @brief process set_move_z command
121) * @param[in] strm stream to read command arguments from
122) * @return if processing command was successful
123) */
124) bool procCmd_set_move_z(std::istream &strm);
125)
|
add support for offset in x...
Stefan Schuermans authored 11 years ago
|
126) /**
127) * @brief process set_offset_x command
128) * @param[in] strm stream to read command arguments from
129) * @return if processing command was successful
130) */
131) bool procCmd_set_offset_x(std::istream &strm);
132)
133) /**
134) * @brief process set_offset_y command
135) * @param[in] strm stream to read command arguments from
136) * @return if processing command was successful
137) */
138) bool procCmd_set_offset_y(std::istream &strm);
139)
|
configuration of precision
Stefan Schuermans authored 11 years ago
|
140) /**
141) * @brief process set_precision command
142) * @param[in] strm stream to read command arguments from
143) * @return if processing command was successful
144) */
145) bool procCmd_set_precision(std::istream &strm);
146)
|