nc-gcode-interpreter 0.1.8__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/Cargo.lock +3 -3
  2. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/Cargo.toml +1 -1
  3. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/PKG-INFO +42 -27
  4. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/README.md +40 -25
  5. nc_gcode_interpreter-0.1.9/examples/function_calls.csv +3 -0
  6. nc_gcode_interpreter-0.1.9/examples/if_statement.mpf +13 -0
  7. nc_gcode_interpreter-0.1.9/examples/loop.csv +321 -0
  8. nc_gcode_interpreter-0.1.9/examples/multiple_m_codes.csv +10 -0
  9. nc_gcode_interpreter-0.1.9/examples/simple.csv +6 -0
  10. nc_gcode_interpreter-0.1.9/examples/tool.csv +2 -0
  11. nc_gcode_interpreter-0.1.9/ggroups/generate_modal_ggroups.py +29 -0
  12. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/pyproject.toml +1 -1
  13. nc_gcode_interpreter-0.1.9/python/nc_gcode_interpreter/__init__.py +259 -0
  14. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/python/nc_gcode_interpreter/_internal.pyi +22 -1
  15. nc_gcode_interpreter-0.1.9/python/tests/test_expected_output.py +68 -0
  16. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/interpret_rules.rs +2 -1
  17. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/interpreter.rs +104 -51
  18. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/lib.rs +16 -0
  19. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/main.rs +1 -1
  20. {nc_gcode_interpreter-0.1.8/ggroups → nc_gcode_interpreter-0.1.9/src}/modal_groups.rs +9 -1
  21. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/uv.lock +106 -30
  22. nc_gcode_interpreter-0.1.8/examples/function_calls.csv +0 -3
  23. nc_gcode_interpreter-0.1.8/examples/if_statement.mpf +0 -13
  24. nc_gcode_interpreter-0.1.8/examples/loop.csv +0 -321
  25. nc_gcode_interpreter-0.1.8/examples/multiple_m_codes.csv +0 -10
  26. nc_gcode_interpreter-0.1.8/examples/simple.csv +0 -6
  27. nc_gcode_interpreter-0.1.8/examples/tool.csv +0 -2
  28. nc_gcode_interpreter-0.1.8/ggroups/generate_modal_ggroups.py +0 -21
  29. nc_gcode_interpreter-0.1.8/python/nc_gcode_interpreter/__init__.py +0 -127
  30. nc_gcode_interpreter-0.1.8/python/tests/test_expected_output.py +0 -40
  31. nc_gcode_interpreter-0.1.8/src/modal_groups.rs +0 -57
  32. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/.github/workflows/build-and-release.yml +0 -0
  33. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/.gitignore +0 -0
  34. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/CONTRIBUTING.md +0 -0
  35. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/Development.md +0 -0
  36. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/LICENSE +0 -0
  37. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/TODO.md +0 -0
  38. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/arrays.csv +0 -0
  39. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/arrays.mpf +0 -0
  40. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/basic_math.csv +0 -0
  41. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/basic_math.mpf +0 -0
  42. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/custom_vars.csv +0 -0
  43. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/custom_vars.mpf +0 -0
  44. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/defaults.csv +0 -0
  45. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/defaults.mpf +0 -0
  46. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/for_loop.csv +0 -0
  47. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/for_loop.mpf +0 -0
  48. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/function_calls.mpf +0 -0
  49. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/if_statement.csv +0 -0
  50. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/increment.csv +0 -0
  51. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/increment.mpf +0 -0
  52. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/loop.mpf +0 -0
  53. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/multiple_m_codes.mpf +0 -0
  54. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/simple.mpf +0 -0
  55. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/tool.mpf +0 -0
  56. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/trans.csv +0 -0
  57. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/trans.mpf +0 -0
  58. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/variables.csv +0 -0
  59. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/examples/variables.mpf +0 -0
  60. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/ggroups/generate_pest.py +0 -0
  61. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/ggroups/ggroups.pest +0 -0
  62. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/python/example/minimal.py +0 -0
  63. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/python/nc_gcode_interpreter/ggroups.json +0 -0
  64. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/python/nc_gcode_interpreter/py.typed +0 -0
  65. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/python/tests/test_g_groups.py +0 -0
  66. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/rustfmt.toml +0 -0
  67. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/errors.rs +0 -0
  68. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/grammar.pest +0 -0
  69. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/state.rs +0 -0
  70. {nc_gcode_interpreter-0.1.8 → nc_gcode_interpreter-0.1.9}/src/types.rs +0 -0
@@ -724,7 +724,7 @@ dependencies = [
724
724
 
725
725
  [[package]]
726
726
  name = "nc-gcode-interpreter"
727
- version = "0.1.8"
727
+ version = "0.1.9"
728
728
  dependencies = [
729
729
  "clap",
730
730
  "csv",
@@ -819,9 +819,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
819
819
 
820
820
  [[package]]
821
821
  name = "pest"
822
- version = "2.7.13"
822
+ version = "2.7.14"
823
823
  source = "registry+https://github.com/rust-lang/crates.io-index"
824
- checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9"
824
+ checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442"
825
825
  dependencies = [
826
826
  "memchr",
827
827
  "thiserror",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "nc-gcode-interpreter"
3
- version = "0.1.8"
3
+ version = "0.1.9"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nc-gcode-interpreter
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -9,7 +9,7 @@ Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Operating System :: OS Independent
10
10
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
11
11
  Requires-Dist: maturin >=1.7.4
12
- Requires-Dist: polars >=1.9.0
12
+ Requires-Dist: polars[pyarrow] >=1.9.0
13
13
  Requires-Dist: jupyter >=1.1.1 ; extra == 'dev'
14
14
  Requires-Dist: pytest >=8.3.3 ; extra == 'test'
15
15
  Requires-Dist: mypy ; extra == 'test'
@@ -26,44 +26,42 @@ Project-URL: Documentation, https://github.com/CEAD-group/nc-gcode-interpreter/b
26
26
 
27
27
  # NC-GCode-Interpreter
28
28
 
29
- A robust interpreter tailored for processing Sinumerik-flavored NC G-code, designed to convert MPF files into CSV outputs or Polars dataframes when used with Python bindings.
29
+ A robust interpreter designed for processing Sinumerik-flavored NC G-code, capable of converting MPF files into CSV outputs or Polars DataFrames via Python bindings.
30
30
 
31
31
  ## Overview
32
32
 
33
- The NC-GCode-Interpreter provides a streamlined and efficient solution for interpreting G-code specifically designed with Sinumerik specifications in mind. This tool caters to both CLI users and those preferring a Python environment, ensuring versatility and ease of use in processing NC programming commands into structured formats like CSV files or Polars dataframes.
33
+ The **NC-GCode-Interpreter** offers a streamlined and efficient solution for interpreting G-code specifically tailored to Sinumerik specifications. This tool caters to both command-line interface (CLI) users and those preferring a Python environment, ensuring versatility and ease of use in processing NC programming commands into structured formats like CSV files or Polars DataFrames.
34
34
 
35
35
  ## Features
36
36
 
37
37
  ### Supported G-code Features
38
38
 
39
- - **G Group Commands**: Recognizes G-code groups and modal gcode commands.
40
- - **Global Translations**: Supports commands like TRANS and ATRANS for adjusting coordinates globally.
41
- - **Looping Constructs**: Handles loops using WHILE and FOR statements.
39
+ - **G Group Commands**: Recognizes G-code groups and modal G-code commands.
40
+ - **Global Transformations**: Supports commands like `TRANS` and `ATRANS` for adjusting coordinates globally.
41
+ - **Looping Constructs**: Handles loops using `WHILE` and `FOR` statements.
42
42
  - **Variable Handling**: Supports definition and manipulation of local variables.
43
- - **Conditional Logic**: Implements conditional execution with IF, ELSE, and ENDIF.
44
- - **Arithmetic Operations**: Basic operations such as addition, subtraction, multiplication, and division are supported.
43
+ - **Conditional Logic**: Implements conditional execution with `IF`, `ELSE`, and `ENDIF`.
44
+ - **Arithmetic Operations**: Supports basic operations such as addition, subtraction, multiplication, and division.
45
45
  - **Array Operations**: Manages arrays and allows operations on them.
46
- - **Incremental Changes**: Facilitates incremental changes in axes positions like X=IC(2).
46
+ - **Incremental Changes**: Facilitates incremental changes in axes positions like `X=IC(2)`.
47
47
 
48
48
  ### Additional Functionality
49
49
 
50
- - **Custom Axes**: Allows users to define additional axes beyond the standard X, Y, Z.
50
+ - **Custom Axes**: Allows users to define additional axes beyond the standard `X`, `Y`, `Z`.
51
51
  - **Initial State Configuration**: Enables the use of an initial state MPF file to set default values for multiple runs.
52
- - **CLI Options**: Numerous command-line options to customize the processing like axis overriding, loop limits, and more.
53
-
54
-
52
+ - **CLI Options**: Numerous command-line options to customize the processing, such as axis overriding, loop limits, and more.
55
53
 
56
54
  ## Example Usage
57
55
 
58
-
59
56
  Consider this example program to generate a square in two layers:
57
+
60
58
  ```scheme
61
- ;Example.MPF
62
- DEF INT n_layers = 2, layer=1
63
- DEF REAL size = 100 ;size of the square
64
- DEF REAL layer_height = 4 ;size of the square
65
- TRANS Z = 0.5 ; move up all z coordinates by 0.5
66
- G1 F=1000; Set feed rate in millimeters per minute
59
+ ; Example.MPF
60
+ DEF INT n_layers = 2, layer = 1
61
+ DEF REAL size = 100 ; size of the square
62
+ DEF REAL layer_height = 4 ; height of each layer
63
+ TRANS Z = 0.5 ; move up all Z coordinates by 0.5
64
+ G1 F=1000 ; Set feed rate in millimeters per minute
67
65
  G1 X0 Y500 Z0 ; move to the starting point
68
66
  WHILE (layer <= n_layers)
69
67
  X=IC(size)
@@ -72,13 +70,12 @@ WHILE (layer <= n_layers)
72
70
  Y=IC(-size) Z=IC(layer_height)
73
71
  layer = layer + 1
74
72
  ENDWHILE
75
- M31; end of program
76
- ```
73
+ M31 ; end of program
77
74
 
78
75
 
79
76
  ### CLI Usage
80
77
  ```bash
81
- > cargo run -- --help
78
+ $ cargo run -- --help
82
79
  A G-code interpreter
83
80
 
84
81
  Usage: nc-gcode-interpreter [OPTIONS] <input>
@@ -89,13 +86,13 @@ Arguments:
89
86
  Options:
90
87
  -a, --axes <AXIS> Override default axis identifiers (comma-separated, e.g., "X,Y,Z")
91
88
  -e, --extra-axes <EXTRA_AXIS> Add extra axis identifiers (comma-separated, e.g., "RA1,RA2")
92
- -i, --initial_state <INITIAL_STATE> Optional initial_state file to initialize state
89
+ -i, --initial_state <INITIAL_STATE> Optional initial state file to e.g. define global variables or set axis positions
93
90
  -l, --iteration_limit <LIMIT> Maximum number of iterations for loops [default: 10000]
94
91
  -f, --disable-forward-fill Disable forward-filling of null values in axes columns
95
92
  -h, --help Print help
96
93
  -V, --version Print version
97
94
 
98
- > cargo run -- Example.MPF
95
+ $ cargo run -- Example.MPF
99
96
  ```
100
97
 
101
98
  ```csv
@@ -119,6 +116,13 @@ X ,Y ,Z ,F ,M ,gg01_motion ,comment
119
116
 
120
117
  ### python example
121
118
 
119
+ To install the Python bindings, run:
120
+ ```bash
121
+ pip install nc-gcode-interpreter
122
+ ```
123
+
124
+ Then, you can use the Python bindings to convert an MPF file to a DataFrame:
125
+
122
126
  ```bash
123
127
  python -c "\
124
128
  from nc_gcode_interpreter import nc_to_dataframe; \
@@ -145,6 +149,17 @@ shape: (14, 7)
145
149
  └───────┴───────┴──────┴────────┴───────────┴─────────────┴─────────────────────────────────┘
146
150
  ```
147
151
 
152
+ The Python bindings also return the state of the program after execution, which can be used for inspection.
153
+
154
+ Additionally, conversion from a Polars DataFrame back to an MPF (NC) program is also supported:
155
+
156
+ ```bash
157
+ python -c "\
158
+ from nc_gcode_interpreter import nc_to_dataframe, dataframe_to_nc; \
159
+ from pathlib import Path; \
160
+ df, state = nc_to_dataframe(Path('Example.MPF').open(), extra_axes=['ELX']); \
161
+ dataframe_to_nc(df, Path('Example_out.MPF').open('w'))"
162
+ ```
148
163
 
149
164
  ```bash
150
165
  target/release/nc-gcode-interpreter --help
@@ -167,7 +182,7 @@ Options:
167
182
 
168
183
  ## Why?
169
184
 
170
- The Sinumerik NC programming guide is extensive, and some of it's functionality can be very convenient for making on the fly improvements to cde. However to better uderstand, visualize and simulate the code, it is often necessary to convert it to a more structured format like CSV or a dataframe. This tool aims to provide a simple and efficient way to convert Sinumerik-flavored G-code to a structured format, making it easier to analyze and visualize the code.
185
+ The Sinumerik NC programming guide is extensive, and some of its functionality can be very convenient for making on-the-fly improvements to code. However, to better understand, visualize, and simulate the code, it is often necessary to convert it to a more structured format like CSV or a DataFrame. This tool aims to provide a simple and efficient way to convert Sinumerik-flavored G-code to a structured format, making it easier to analyze and visualize.
171
186
 
172
187
  Only a limited subset is supported, but the tool is designed to be easily extensible to support more features in the future.
173
188
 
@@ -1,43 +1,41 @@
1
1
  # NC-GCode-Interpreter
2
2
 
3
- A robust interpreter tailored for processing Sinumerik-flavored NC G-code, designed to convert MPF files into CSV outputs or Polars dataframes when used with Python bindings.
3
+ A robust interpreter designed for processing Sinumerik-flavored NC G-code, capable of converting MPF files into CSV outputs or Polars DataFrames via Python bindings.
4
4
 
5
5
  ## Overview
6
6
 
7
- The NC-GCode-Interpreter provides a streamlined and efficient solution for interpreting G-code specifically designed with Sinumerik specifications in mind. This tool caters to both CLI users and those preferring a Python environment, ensuring versatility and ease of use in processing NC programming commands into structured formats like CSV files or Polars dataframes.
7
+ The **NC-GCode-Interpreter** offers a streamlined and efficient solution for interpreting G-code specifically tailored to Sinumerik specifications. This tool caters to both command-line interface (CLI) users and those preferring a Python environment, ensuring versatility and ease of use in processing NC programming commands into structured formats like CSV files or Polars DataFrames.
8
8
 
9
9
  ## Features
10
10
 
11
11
  ### Supported G-code Features
12
12
 
13
- - **G Group Commands**: Recognizes G-code groups and modal gcode commands.
14
- - **Global Translations**: Supports commands like TRANS and ATRANS for adjusting coordinates globally.
15
- - **Looping Constructs**: Handles loops using WHILE and FOR statements.
13
+ - **G Group Commands**: Recognizes G-code groups and modal G-code commands.
14
+ - **Global Transformations**: Supports commands like `TRANS` and `ATRANS` for adjusting coordinates globally.
15
+ - **Looping Constructs**: Handles loops using `WHILE` and `FOR` statements.
16
16
  - **Variable Handling**: Supports definition and manipulation of local variables.
17
- - **Conditional Logic**: Implements conditional execution with IF, ELSE, and ENDIF.
18
- - **Arithmetic Operations**: Basic operations such as addition, subtraction, multiplication, and division are supported.
17
+ - **Conditional Logic**: Implements conditional execution with `IF`, `ELSE`, and `ENDIF`.
18
+ - **Arithmetic Operations**: Supports basic operations such as addition, subtraction, multiplication, and division.
19
19
  - **Array Operations**: Manages arrays and allows operations on them.
20
- - **Incremental Changes**: Facilitates incremental changes in axes positions like X=IC(2).
20
+ - **Incremental Changes**: Facilitates incremental changes in axes positions like `X=IC(2)`.
21
21
 
22
22
  ### Additional Functionality
23
23
 
24
- - **Custom Axes**: Allows users to define additional axes beyond the standard X, Y, Z.
24
+ - **Custom Axes**: Allows users to define additional axes beyond the standard `X`, `Y`, `Z`.
25
25
  - **Initial State Configuration**: Enables the use of an initial state MPF file to set default values for multiple runs.
26
- - **CLI Options**: Numerous command-line options to customize the processing like axis overriding, loop limits, and more.
27
-
28
-
26
+ - **CLI Options**: Numerous command-line options to customize the processing, such as axis overriding, loop limits, and more.
29
27
 
30
28
  ## Example Usage
31
29
 
32
-
33
30
  Consider this example program to generate a square in two layers:
31
+
34
32
  ```scheme
35
- ;Example.MPF
36
- DEF INT n_layers = 2, layer=1
37
- DEF REAL size = 100 ;size of the square
38
- DEF REAL layer_height = 4 ;size of the square
39
- TRANS Z = 0.5 ; move up all z coordinates by 0.5
40
- G1 F=1000; Set feed rate in millimeters per minute
33
+ ; Example.MPF
34
+ DEF INT n_layers = 2, layer = 1
35
+ DEF REAL size = 100 ; size of the square
36
+ DEF REAL layer_height = 4 ; height of each layer
37
+ TRANS Z = 0.5 ; move up all Z coordinates by 0.5
38
+ G1 F=1000 ; Set feed rate in millimeters per minute
41
39
  G1 X0 Y500 Z0 ; move to the starting point
42
40
  WHILE (layer <= n_layers)
43
41
  X=IC(size)
@@ -46,13 +44,12 @@ WHILE (layer <= n_layers)
46
44
  Y=IC(-size) Z=IC(layer_height)
47
45
  layer = layer + 1
48
46
  ENDWHILE
49
- M31; end of program
50
- ```
47
+ M31 ; end of program
51
48
 
52
49
 
53
50
  ### CLI Usage
54
51
  ```bash
55
- > cargo run -- --help
52
+ $ cargo run -- --help
56
53
  A G-code interpreter
57
54
 
58
55
  Usage: nc-gcode-interpreter [OPTIONS] <input>
@@ -63,13 +60,13 @@ Arguments:
63
60
  Options:
64
61
  -a, --axes <AXIS> Override default axis identifiers (comma-separated, e.g., "X,Y,Z")
65
62
  -e, --extra-axes <EXTRA_AXIS> Add extra axis identifiers (comma-separated, e.g., "RA1,RA2")
66
- -i, --initial_state <INITIAL_STATE> Optional initial_state file to initialize state
63
+ -i, --initial_state <INITIAL_STATE> Optional initial state file to e.g. define global variables or set axis positions
67
64
  -l, --iteration_limit <LIMIT> Maximum number of iterations for loops [default: 10000]
68
65
  -f, --disable-forward-fill Disable forward-filling of null values in axes columns
69
66
  -h, --help Print help
70
67
  -V, --version Print version
71
68
 
72
- > cargo run -- Example.MPF
69
+ $ cargo run -- Example.MPF
73
70
  ```
74
71
 
75
72
  ```csv
@@ -93,6 +90,13 @@ X ,Y ,Z ,F ,M ,gg01_motion ,comment
93
90
 
94
91
  ### python example
95
92
 
93
+ To install the Python bindings, run:
94
+ ```bash
95
+ pip install nc-gcode-interpreter
96
+ ```
97
+
98
+ Then, you can use the Python bindings to convert an MPF file to a DataFrame:
99
+
96
100
  ```bash
97
101
  python -c "\
98
102
  from nc_gcode_interpreter import nc_to_dataframe; \
@@ -119,6 +123,17 @@ shape: (14, 7)
119
123
  └───────┴───────┴──────┴────────┴───────────┴─────────────┴─────────────────────────────────┘
120
124
  ```
121
125
 
126
+ The Python bindings also return the state of the program after execution, which can be used for inspection.
127
+
128
+ Additionally, conversion from a Polars DataFrame back to an MPF (NC) program is also supported:
129
+
130
+ ```bash
131
+ python -c "\
132
+ from nc_gcode_interpreter import nc_to_dataframe, dataframe_to_nc; \
133
+ from pathlib import Path; \
134
+ df, state = nc_to_dataframe(Path('Example.MPF').open(), extra_axes=['ELX']); \
135
+ dataframe_to_nc(df, Path('Example_out.MPF').open('w'))"
136
+ ```
122
137
 
123
138
  ```bash
124
139
  target/release/nc-gcode-interpreter --help
@@ -141,7 +156,7 @@ Options:
141
156
 
142
157
  ## Why?
143
158
 
144
- The Sinumerik NC programming guide is extensive, and some of it's functionality can be very convenient for making on the fly improvements to cde. However to better uderstand, visualize and simulate the code, it is often necessary to convert it to a more structured format like CSV or a dataframe. This tool aims to provide a simple and efficient way to convert Sinumerik-flavored G-code to a structured format, making it easier to analyze and visualize the code.
159
+ The Sinumerik NC programming guide is extensive, and some of its functionality can be very convenient for making on-the-fly improvements to code. However, to better understand, visualize, and simulate the code, it is often necessary to convert it to a more structured format like CSV or a DataFrame. This tool aims to provide a simple and efficient way to convert Sinumerik-flavored G-code to a structured format, making it easier to analyze and visualize.
145
160
 
146
161
  Only a limited subset is supported, but the tool is designed to be easily extensible to support more features in the future.
147
162
 
@@ -0,0 +1,3 @@
1
+ gg01_motion,X,function_call
2
+ ,,SETAL(12345)
3
+ G1,1.000,
@@ -0,0 +1,13 @@
1
+ DEF INT aa=1
2
+ IF TRUE
3
+ X1
4
+ ELSE
5
+ IF aa
6
+ X5
7
+ ELSE
8
+ X3
9
+ Y32
10
+ ENDIF
11
+ ENDIF
12
+
13
+
@@ -0,0 +1,321 @@
1
+ gg01_motion,gg06_plane_select,gg08_work_offset,gg14_wp_measure_mode,X,Y,Z,F,M,comment
2
+ ,,,,,,,,,; Initialize the program
3
+ ,,,G90,,,,,,; Set to absolute positioning mode
4
+ ,G17,,G90,,,,,,
5
+ ,G17,G54,G90,,,,,,
6
+ ,G17,G54,G90,,,,,,; Define the raster pattern parameters
7
+ ,G17,G54,G90,,,,,,; Spacing between raster lines
8
+ ,G17,G54,G90,,,,,M0,
9
+ G1,G17,G54,G90,,,,5000.000,,; Set feed rate in millimeters per minute
10
+ G1,G17,G54,G90,920.000,950.000,1250.000,5000.000,,
11
+ G1,G17,G54,G90,920.000,950.000,1250.000,5000.000,M0,
12
+ G1,G17,G54,G90,1250.000,1050.000,1250.000,5000.000,,
13
+ G1,G17,G54,G90,1250.000,1050.000,1250.000,5000.000,,; Loop through rows
14
+ G1,G17,G54,G90,920.000,950.000,1250.000,5000.000,,
15
+ G1,G17,G54,G90,920.000,950.000,1250.000,250.000,,; Set feed rate in millimeters per minute
16
+ G1,G17,G54,G90,920.000,950.000,1250.000,250.000,M0,
17
+ G1,G17,G54,G90,1250.000,950.000,1250.000,250.000,,
18
+ G1,G17,G54,G90,1250.000,950.000,1250.000,250.000,,; Move up one row
19
+ G1,G17,G54,G90,1250.000,951.000,1250.000,250.000,,
20
+ G1,G17,G54,G90,920.000,951.000,1250.000,250.000,,
21
+ G1,G17,G54,G90,920.000,951.000,1250.000,250.000,,; Move up one row
22
+ G1,G17,G54,G90,920.000,952.000,1250.000,250.000,,
23
+ G1,G17,G54,G90,1250.000,952.000,1250.000,250.000,,
24
+ G1,G17,G54,G90,1250.000,952.000,1250.000,250.000,,; Move up one row
25
+ G1,G17,G54,G90,1250.000,953.000,1250.000,250.000,,
26
+ G1,G17,G54,G90,920.000,953.000,1250.000,250.000,,
27
+ G1,G17,G54,G90,920.000,953.000,1250.000,250.000,,; Move up one row
28
+ G1,G17,G54,G90,920.000,954.000,1250.000,250.000,,
29
+ G1,G17,G54,G90,1250.000,954.000,1250.000,250.000,,
30
+ G1,G17,G54,G90,1250.000,954.000,1250.000,250.000,,; Move up one row
31
+ G1,G17,G54,G90,1250.000,955.000,1250.000,250.000,,
32
+ G1,G17,G54,G90,920.000,955.000,1250.000,250.000,,
33
+ G1,G17,G54,G90,920.000,955.000,1250.000,250.000,,; Move up one row
34
+ G1,G17,G54,G90,920.000,956.000,1250.000,250.000,,
35
+ G1,G17,G54,G90,1250.000,956.000,1250.000,250.000,,
36
+ G1,G17,G54,G90,1250.000,956.000,1250.000,250.000,,; Move up one row
37
+ G1,G17,G54,G90,1250.000,957.000,1250.000,250.000,,
38
+ G1,G17,G54,G90,920.000,957.000,1250.000,250.000,,
39
+ G1,G17,G54,G90,920.000,957.000,1250.000,250.000,,; Move up one row
40
+ G1,G17,G54,G90,920.000,958.000,1250.000,250.000,,
41
+ G1,G17,G54,G90,1250.000,958.000,1250.000,250.000,,
42
+ G1,G17,G54,G90,1250.000,958.000,1250.000,250.000,,; Move up one row
43
+ G1,G17,G54,G90,1250.000,959.000,1250.000,250.000,,
44
+ G1,G17,G54,G90,920.000,959.000,1250.000,250.000,,
45
+ G1,G17,G54,G90,920.000,959.000,1250.000,250.000,,; Move up one row
46
+ G1,G17,G54,G90,920.000,960.000,1250.000,250.000,,
47
+ G1,G17,G54,G90,1250.000,960.000,1250.000,250.000,,
48
+ G1,G17,G54,G90,1250.000,960.000,1250.000,250.000,,; Move up one row
49
+ G1,G17,G54,G90,1250.000,961.000,1250.000,250.000,,
50
+ G1,G17,G54,G90,920.000,961.000,1250.000,250.000,,
51
+ G1,G17,G54,G90,920.000,961.000,1250.000,250.000,,; Move up one row
52
+ G1,G17,G54,G90,920.000,962.000,1250.000,250.000,,
53
+ G1,G17,G54,G90,1250.000,962.000,1250.000,250.000,,
54
+ G1,G17,G54,G90,1250.000,962.000,1250.000,250.000,,; Move up one row
55
+ G1,G17,G54,G90,1250.000,963.000,1250.000,250.000,,
56
+ G1,G17,G54,G90,920.000,963.000,1250.000,250.000,,
57
+ G1,G17,G54,G90,920.000,963.000,1250.000,250.000,,; Move up one row
58
+ G1,G17,G54,G90,920.000,964.000,1250.000,250.000,,
59
+ G1,G17,G54,G90,1250.000,964.000,1250.000,250.000,,
60
+ G1,G17,G54,G90,1250.000,964.000,1250.000,250.000,,; Move up one row
61
+ G1,G17,G54,G90,1250.000,965.000,1250.000,250.000,,
62
+ G1,G17,G54,G90,920.000,965.000,1250.000,250.000,,
63
+ G1,G17,G54,G90,920.000,965.000,1250.000,250.000,,; Move up one row
64
+ G1,G17,G54,G90,920.000,966.000,1250.000,250.000,,
65
+ G1,G17,G54,G90,1250.000,966.000,1250.000,250.000,,
66
+ G1,G17,G54,G90,1250.000,966.000,1250.000,250.000,,; Move up one row
67
+ G1,G17,G54,G90,1250.000,967.000,1250.000,250.000,,
68
+ G1,G17,G54,G90,920.000,967.000,1250.000,250.000,,
69
+ G1,G17,G54,G90,920.000,967.000,1250.000,250.000,,; Move up one row
70
+ G1,G17,G54,G90,920.000,968.000,1250.000,250.000,,
71
+ G1,G17,G54,G90,1250.000,968.000,1250.000,250.000,,
72
+ G1,G17,G54,G90,1250.000,968.000,1250.000,250.000,,; Move up one row
73
+ G1,G17,G54,G90,1250.000,969.000,1250.000,250.000,,
74
+ G1,G17,G54,G90,920.000,969.000,1250.000,250.000,,
75
+ G1,G17,G54,G90,920.000,969.000,1250.000,250.000,,; Move up one row
76
+ G1,G17,G54,G90,920.000,970.000,1250.000,250.000,,
77
+ G1,G17,G54,G90,1250.000,970.000,1250.000,250.000,,
78
+ G1,G17,G54,G90,1250.000,970.000,1250.000,250.000,,; Move up one row
79
+ G1,G17,G54,G90,1250.000,971.000,1250.000,250.000,,
80
+ G1,G17,G54,G90,920.000,971.000,1250.000,250.000,,
81
+ G1,G17,G54,G90,920.000,971.000,1250.000,250.000,,; Move up one row
82
+ G1,G17,G54,G90,920.000,972.000,1250.000,250.000,,
83
+ G1,G17,G54,G90,1250.000,972.000,1250.000,250.000,,
84
+ G1,G17,G54,G90,1250.000,972.000,1250.000,250.000,,; Move up one row
85
+ G1,G17,G54,G90,1250.000,973.000,1250.000,250.000,,
86
+ G1,G17,G54,G90,920.000,973.000,1250.000,250.000,,
87
+ G1,G17,G54,G90,920.000,973.000,1250.000,250.000,,; Move up one row
88
+ G1,G17,G54,G90,920.000,974.000,1250.000,250.000,,
89
+ G1,G17,G54,G90,1250.000,974.000,1250.000,250.000,,
90
+ G1,G17,G54,G90,1250.000,974.000,1250.000,250.000,,; Move up one row
91
+ G1,G17,G54,G90,1250.000,975.000,1250.000,250.000,,
92
+ G1,G17,G54,G90,920.000,975.000,1250.000,250.000,,
93
+ G1,G17,G54,G90,920.000,975.000,1250.000,250.000,,; Move up one row
94
+ G1,G17,G54,G90,920.000,976.000,1250.000,250.000,,
95
+ G1,G17,G54,G90,1250.000,976.000,1250.000,250.000,,
96
+ G1,G17,G54,G90,1250.000,976.000,1250.000,250.000,,; Move up one row
97
+ G1,G17,G54,G90,1250.000,977.000,1250.000,250.000,,
98
+ G1,G17,G54,G90,920.000,977.000,1250.000,250.000,,
99
+ G1,G17,G54,G90,920.000,977.000,1250.000,250.000,,; Move up one row
100
+ G1,G17,G54,G90,920.000,978.000,1250.000,250.000,,
101
+ G1,G17,G54,G90,1250.000,978.000,1250.000,250.000,,
102
+ G1,G17,G54,G90,1250.000,978.000,1250.000,250.000,,; Move up one row
103
+ G1,G17,G54,G90,1250.000,979.000,1250.000,250.000,,
104
+ G1,G17,G54,G90,920.000,979.000,1250.000,250.000,,
105
+ G1,G17,G54,G90,920.000,979.000,1250.000,250.000,,; Move up one row
106
+ G1,G17,G54,G90,920.000,980.000,1250.000,250.000,,
107
+ G1,G17,G54,G90,1250.000,980.000,1250.000,250.000,,
108
+ G1,G17,G54,G90,1250.000,980.000,1250.000,250.000,,; Move up one row
109
+ G1,G17,G54,G90,1250.000,981.000,1250.000,250.000,,
110
+ G1,G17,G54,G90,920.000,981.000,1250.000,250.000,,
111
+ G1,G17,G54,G90,920.000,981.000,1250.000,250.000,,; Move up one row
112
+ G1,G17,G54,G90,920.000,982.000,1250.000,250.000,,
113
+ G1,G17,G54,G90,1250.000,982.000,1250.000,250.000,,
114
+ G1,G17,G54,G90,1250.000,982.000,1250.000,250.000,,; Move up one row
115
+ G1,G17,G54,G90,1250.000,983.000,1250.000,250.000,,
116
+ G1,G17,G54,G90,920.000,983.000,1250.000,250.000,,
117
+ G1,G17,G54,G90,920.000,983.000,1250.000,250.000,,; Move up one row
118
+ G1,G17,G54,G90,920.000,984.000,1250.000,250.000,,
119
+ G1,G17,G54,G90,1250.000,984.000,1250.000,250.000,,
120
+ G1,G17,G54,G90,1250.000,984.000,1250.000,250.000,,; Move up one row
121
+ G1,G17,G54,G90,1250.000,985.000,1250.000,250.000,,
122
+ G1,G17,G54,G90,920.000,985.000,1250.000,250.000,,
123
+ G1,G17,G54,G90,920.000,985.000,1250.000,250.000,,; Move up one row
124
+ G1,G17,G54,G90,920.000,986.000,1250.000,250.000,,
125
+ G1,G17,G54,G90,1250.000,986.000,1250.000,250.000,,
126
+ G1,G17,G54,G90,1250.000,986.000,1250.000,250.000,,; Move up one row
127
+ G1,G17,G54,G90,1250.000,987.000,1250.000,250.000,,
128
+ G1,G17,G54,G90,920.000,987.000,1250.000,250.000,,
129
+ G1,G17,G54,G90,920.000,987.000,1250.000,250.000,,; Move up one row
130
+ G1,G17,G54,G90,920.000,988.000,1250.000,250.000,,
131
+ G1,G17,G54,G90,1250.000,988.000,1250.000,250.000,,
132
+ G1,G17,G54,G90,1250.000,988.000,1250.000,250.000,,; Move up one row
133
+ G1,G17,G54,G90,1250.000,989.000,1250.000,250.000,,
134
+ G1,G17,G54,G90,920.000,989.000,1250.000,250.000,,
135
+ G1,G17,G54,G90,920.000,989.000,1250.000,250.000,,; Move up one row
136
+ G1,G17,G54,G90,920.000,990.000,1250.000,250.000,,
137
+ G1,G17,G54,G90,1250.000,990.000,1250.000,250.000,,
138
+ G1,G17,G54,G90,1250.000,990.000,1250.000,250.000,,; Move up one row
139
+ G1,G17,G54,G90,1250.000,991.000,1250.000,250.000,,
140
+ G1,G17,G54,G90,920.000,991.000,1250.000,250.000,,
141
+ G1,G17,G54,G90,920.000,991.000,1250.000,250.000,,; Move up one row
142
+ G1,G17,G54,G90,920.000,992.000,1250.000,250.000,,
143
+ G1,G17,G54,G90,1250.000,992.000,1250.000,250.000,,
144
+ G1,G17,G54,G90,1250.000,992.000,1250.000,250.000,,; Move up one row
145
+ G1,G17,G54,G90,1250.000,993.000,1250.000,250.000,,
146
+ G1,G17,G54,G90,920.000,993.000,1250.000,250.000,,
147
+ G1,G17,G54,G90,920.000,993.000,1250.000,250.000,,; Move up one row
148
+ G1,G17,G54,G90,920.000,994.000,1250.000,250.000,,
149
+ G1,G17,G54,G90,1250.000,994.000,1250.000,250.000,,
150
+ G1,G17,G54,G90,1250.000,994.000,1250.000,250.000,,; Move up one row
151
+ G1,G17,G54,G90,1250.000,995.000,1250.000,250.000,,
152
+ G1,G17,G54,G90,920.000,995.000,1250.000,250.000,,
153
+ G1,G17,G54,G90,920.000,995.000,1250.000,250.000,,; Move up one row
154
+ G1,G17,G54,G90,920.000,996.000,1250.000,250.000,,
155
+ G1,G17,G54,G90,1250.000,996.000,1250.000,250.000,,
156
+ G1,G17,G54,G90,1250.000,996.000,1250.000,250.000,,; Move up one row
157
+ G1,G17,G54,G90,1250.000,997.000,1250.000,250.000,,
158
+ G1,G17,G54,G90,920.000,997.000,1250.000,250.000,,
159
+ G1,G17,G54,G90,920.000,997.000,1250.000,250.000,,; Move up one row
160
+ G1,G17,G54,G90,920.000,998.000,1250.000,250.000,,
161
+ G1,G17,G54,G90,1250.000,998.000,1250.000,250.000,,
162
+ G1,G17,G54,G90,1250.000,998.000,1250.000,250.000,,; Move up one row
163
+ G1,G17,G54,G90,1250.000,999.000,1250.000,250.000,,
164
+ G1,G17,G54,G90,920.000,999.000,1250.000,250.000,,
165
+ G1,G17,G54,G90,920.000,999.000,1250.000,250.000,,; Move up one row
166
+ G1,G17,G54,G90,920.000,1000.000,1250.000,250.000,,
167
+ G1,G17,G54,G90,1250.000,1000.000,1250.000,250.000,,
168
+ G1,G17,G54,G90,1250.000,1000.000,1250.000,250.000,,; Move up one row
169
+ G1,G17,G54,G90,1250.000,1001.000,1250.000,250.000,,
170
+ G1,G17,G54,G90,920.000,1001.000,1250.000,250.000,,
171
+ G1,G17,G54,G90,920.000,1001.000,1250.000,250.000,,; Move up one row
172
+ G1,G17,G54,G90,920.000,1002.000,1250.000,250.000,,
173
+ G1,G17,G54,G90,1250.000,1002.000,1250.000,250.000,,
174
+ G1,G17,G54,G90,1250.000,1002.000,1250.000,250.000,,; Move up one row
175
+ G1,G17,G54,G90,1250.000,1003.000,1250.000,250.000,,
176
+ G1,G17,G54,G90,920.000,1003.000,1250.000,250.000,,
177
+ G1,G17,G54,G90,920.000,1003.000,1250.000,250.000,,; Move up one row
178
+ G1,G17,G54,G90,920.000,1004.000,1250.000,250.000,,
179
+ G1,G17,G54,G90,1250.000,1004.000,1250.000,250.000,,
180
+ G1,G17,G54,G90,1250.000,1004.000,1250.000,250.000,,; Move up one row
181
+ G1,G17,G54,G90,1250.000,1005.000,1250.000,250.000,,
182
+ G1,G17,G54,G90,920.000,1005.000,1250.000,250.000,,
183
+ G1,G17,G54,G90,920.000,1005.000,1250.000,250.000,,; Move up one row
184
+ G1,G17,G54,G90,920.000,1006.000,1250.000,250.000,,
185
+ G1,G17,G54,G90,1250.000,1006.000,1250.000,250.000,,
186
+ G1,G17,G54,G90,1250.000,1006.000,1250.000,250.000,,; Move up one row
187
+ G1,G17,G54,G90,1250.000,1007.000,1250.000,250.000,,
188
+ G1,G17,G54,G90,920.000,1007.000,1250.000,250.000,,
189
+ G1,G17,G54,G90,920.000,1007.000,1250.000,250.000,,; Move up one row
190
+ G1,G17,G54,G90,920.000,1008.000,1250.000,250.000,,
191
+ G1,G17,G54,G90,1250.000,1008.000,1250.000,250.000,,
192
+ G1,G17,G54,G90,1250.000,1008.000,1250.000,250.000,,; Move up one row
193
+ G1,G17,G54,G90,1250.000,1009.000,1250.000,250.000,,
194
+ G1,G17,G54,G90,920.000,1009.000,1250.000,250.000,,
195
+ G1,G17,G54,G90,920.000,1009.000,1250.000,250.000,,; Move up one row
196
+ G1,G17,G54,G90,920.000,1010.000,1250.000,250.000,,
197
+ G1,G17,G54,G90,1250.000,1010.000,1250.000,250.000,,
198
+ G1,G17,G54,G90,1250.000,1010.000,1250.000,250.000,,; Move up one row
199
+ G1,G17,G54,G90,1250.000,1011.000,1250.000,250.000,,
200
+ G1,G17,G54,G90,920.000,1011.000,1250.000,250.000,,
201
+ G1,G17,G54,G90,920.000,1011.000,1250.000,250.000,,; Move up one row
202
+ G1,G17,G54,G90,920.000,1012.000,1250.000,250.000,,
203
+ G1,G17,G54,G90,1250.000,1012.000,1250.000,250.000,,
204
+ G1,G17,G54,G90,1250.000,1012.000,1250.000,250.000,,; Move up one row
205
+ G1,G17,G54,G90,1250.000,1013.000,1250.000,250.000,,
206
+ G1,G17,G54,G90,920.000,1013.000,1250.000,250.000,,
207
+ G1,G17,G54,G90,920.000,1013.000,1250.000,250.000,,; Move up one row
208
+ G1,G17,G54,G90,920.000,1014.000,1250.000,250.000,,
209
+ G1,G17,G54,G90,1250.000,1014.000,1250.000,250.000,,
210
+ G1,G17,G54,G90,1250.000,1014.000,1250.000,250.000,,; Move up one row
211
+ G1,G17,G54,G90,1250.000,1015.000,1250.000,250.000,,
212
+ G1,G17,G54,G90,920.000,1015.000,1250.000,250.000,,
213
+ G1,G17,G54,G90,920.000,1015.000,1250.000,250.000,,; Move up one row
214
+ G1,G17,G54,G90,920.000,1016.000,1250.000,250.000,,
215
+ G1,G17,G54,G90,1250.000,1016.000,1250.000,250.000,,
216
+ G1,G17,G54,G90,1250.000,1016.000,1250.000,250.000,,; Move up one row
217
+ G1,G17,G54,G90,1250.000,1017.000,1250.000,250.000,,
218
+ G1,G17,G54,G90,920.000,1017.000,1250.000,250.000,,
219
+ G1,G17,G54,G90,920.000,1017.000,1250.000,250.000,,; Move up one row
220
+ G1,G17,G54,G90,920.000,1018.000,1250.000,250.000,,
221
+ G1,G17,G54,G90,1250.000,1018.000,1250.000,250.000,,
222
+ G1,G17,G54,G90,1250.000,1018.000,1250.000,250.000,,; Move up one row
223
+ G1,G17,G54,G90,1250.000,1019.000,1250.000,250.000,,
224
+ G1,G17,G54,G90,920.000,1019.000,1250.000,250.000,,
225
+ G1,G17,G54,G90,920.000,1019.000,1250.000,250.000,,; Move up one row
226
+ G1,G17,G54,G90,920.000,1020.000,1250.000,250.000,,
227
+ G1,G17,G54,G90,1250.000,1020.000,1250.000,250.000,,
228
+ G1,G17,G54,G90,1250.000,1020.000,1250.000,250.000,,; Move up one row
229
+ G1,G17,G54,G90,1250.000,1021.000,1250.000,250.000,,
230
+ G1,G17,G54,G90,920.000,1021.000,1250.000,250.000,,
231
+ G1,G17,G54,G90,920.000,1021.000,1250.000,250.000,,; Move up one row
232
+ G1,G17,G54,G90,920.000,1022.000,1250.000,250.000,,
233
+ G1,G17,G54,G90,1250.000,1022.000,1250.000,250.000,,
234
+ G1,G17,G54,G90,1250.000,1022.000,1250.000,250.000,,; Move up one row
235
+ G1,G17,G54,G90,1250.000,1023.000,1250.000,250.000,,
236
+ G1,G17,G54,G90,920.000,1023.000,1250.000,250.000,,
237
+ G1,G17,G54,G90,920.000,1023.000,1250.000,250.000,,; Move up one row
238
+ G1,G17,G54,G90,920.000,1024.000,1250.000,250.000,,
239
+ G1,G17,G54,G90,1250.000,1024.000,1250.000,250.000,,
240
+ G1,G17,G54,G90,1250.000,1024.000,1250.000,250.000,,; Move up one row
241
+ G1,G17,G54,G90,1250.000,1025.000,1250.000,250.000,,
242
+ G1,G17,G54,G90,920.000,1025.000,1250.000,250.000,,
243
+ G1,G17,G54,G90,920.000,1025.000,1250.000,250.000,,; Move up one row
244
+ G1,G17,G54,G90,920.000,1026.000,1250.000,250.000,,
245
+ G1,G17,G54,G90,1250.000,1026.000,1250.000,250.000,,
246
+ G1,G17,G54,G90,1250.000,1026.000,1250.000,250.000,,; Move up one row
247
+ G1,G17,G54,G90,1250.000,1027.000,1250.000,250.000,,
248
+ G1,G17,G54,G90,920.000,1027.000,1250.000,250.000,,
249
+ G1,G17,G54,G90,920.000,1027.000,1250.000,250.000,,; Move up one row
250
+ G1,G17,G54,G90,920.000,1028.000,1250.000,250.000,,
251
+ G1,G17,G54,G90,1250.000,1028.000,1250.000,250.000,,
252
+ G1,G17,G54,G90,1250.000,1028.000,1250.000,250.000,,; Move up one row
253
+ G1,G17,G54,G90,1250.000,1029.000,1250.000,250.000,,
254
+ G1,G17,G54,G90,920.000,1029.000,1250.000,250.000,,
255
+ G1,G17,G54,G90,920.000,1029.000,1250.000,250.000,,; Move up one row
256
+ G1,G17,G54,G90,920.000,1030.000,1250.000,250.000,,
257
+ G1,G17,G54,G90,1250.000,1030.000,1250.000,250.000,,
258
+ G1,G17,G54,G90,1250.000,1030.000,1250.000,250.000,,; Move up one row
259
+ G1,G17,G54,G90,1250.000,1031.000,1250.000,250.000,,
260
+ G1,G17,G54,G90,920.000,1031.000,1250.000,250.000,,
261
+ G1,G17,G54,G90,920.000,1031.000,1250.000,250.000,,; Move up one row
262
+ G1,G17,G54,G90,920.000,1032.000,1250.000,250.000,,
263
+ G1,G17,G54,G90,1250.000,1032.000,1250.000,250.000,,
264
+ G1,G17,G54,G90,1250.000,1032.000,1250.000,250.000,,; Move up one row
265
+ G1,G17,G54,G90,1250.000,1033.000,1250.000,250.000,,
266
+ G1,G17,G54,G90,920.000,1033.000,1250.000,250.000,,
267
+ G1,G17,G54,G90,920.000,1033.000,1250.000,250.000,,; Move up one row
268
+ G1,G17,G54,G90,920.000,1034.000,1250.000,250.000,,
269
+ G1,G17,G54,G90,1250.000,1034.000,1250.000,250.000,,
270
+ G1,G17,G54,G90,1250.000,1034.000,1250.000,250.000,,; Move up one row
271
+ G1,G17,G54,G90,1250.000,1035.000,1250.000,250.000,,
272
+ G1,G17,G54,G90,920.000,1035.000,1250.000,250.000,,
273
+ G1,G17,G54,G90,920.000,1035.000,1250.000,250.000,,; Move up one row
274
+ G1,G17,G54,G90,920.000,1036.000,1250.000,250.000,,
275
+ G1,G17,G54,G90,1250.000,1036.000,1250.000,250.000,,
276
+ G1,G17,G54,G90,1250.000,1036.000,1250.000,250.000,,; Move up one row
277
+ G1,G17,G54,G90,1250.000,1037.000,1250.000,250.000,,
278
+ G1,G17,G54,G90,920.000,1037.000,1250.000,250.000,,
279
+ G1,G17,G54,G90,920.000,1037.000,1250.000,250.000,,; Move up one row
280
+ G1,G17,G54,G90,920.000,1038.000,1250.000,250.000,,
281
+ G1,G17,G54,G90,1250.000,1038.000,1250.000,250.000,,
282
+ G1,G17,G54,G90,1250.000,1038.000,1250.000,250.000,,; Move up one row
283
+ G1,G17,G54,G90,1250.000,1039.000,1250.000,250.000,,
284
+ G1,G17,G54,G90,920.000,1039.000,1250.000,250.000,,
285
+ G1,G17,G54,G90,920.000,1039.000,1250.000,250.000,,; Move up one row
286
+ G1,G17,G54,G90,920.000,1040.000,1250.000,250.000,,
287
+ G1,G17,G54,G90,1250.000,1040.000,1250.000,250.000,,
288
+ G1,G17,G54,G90,1250.000,1040.000,1250.000,250.000,,; Move up one row
289
+ G1,G17,G54,G90,1250.000,1041.000,1250.000,250.000,,
290
+ G1,G17,G54,G90,920.000,1041.000,1250.000,250.000,,
291
+ G1,G17,G54,G90,920.000,1041.000,1250.000,250.000,,; Move up one row
292
+ G1,G17,G54,G90,920.000,1042.000,1250.000,250.000,,
293
+ G1,G17,G54,G90,1250.000,1042.000,1250.000,250.000,,
294
+ G1,G17,G54,G90,1250.000,1042.000,1250.000,250.000,,; Move up one row
295
+ G1,G17,G54,G90,1250.000,1043.000,1250.000,250.000,,
296
+ G1,G17,G54,G90,920.000,1043.000,1250.000,250.000,,
297
+ G1,G17,G54,G90,920.000,1043.000,1250.000,250.000,,; Move up one row
298
+ G1,G17,G54,G90,920.000,1044.000,1250.000,250.000,,
299
+ G1,G17,G54,G90,1250.000,1044.000,1250.000,250.000,,
300
+ G1,G17,G54,G90,1250.000,1044.000,1250.000,250.000,,; Move up one row
301
+ G1,G17,G54,G90,1250.000,1045.000,1250.000,250.000,,
302
+ G1,G17,G54,G90,920.000,1045.000,1250.000,250.000,,
303
+ G1,G17,G54,G90,920.000,1045.000,1250.000,250.000,,; Move up one row
304
+ G1,G17,G54,G90,920.000,1046.000,1250.000,250.000,,
305
+ G1,G17,G54,G90,1250.000,1046.000,1250.000,250.000,,
306
+ G1,G17,G54,G90,1250.000,1046.000,1250.000,250.000,,; Move up one row
307
+ G1,G17,G54,G90,1250.000,1047.000,1250.000,250.000,,
308
+ G1,G17,G54,G90,920.000,1047.000,1250.000,250.000,,
309
+ G1,G17,G54,G90,920.000,1047.000,1250.000,250.000,,; Move up one row
310
+ G1,G17,G54,G90,920.000,1048.000,1250.000,250.000,,
311
+ G1,G17,G54,G90,1250.000,1048.000,1250.000,250.000,,
312
+ G1,G17,G54,G90,1250.000,1048.000,1250.000,250.000,,; Move up one row
313
+ G1,G17,G54,G90,1250.000,1049.000,1250.000,250.000,,
314
+ G1,G17,G54,G90,920.000,1049.000,1250.000,250.000,,
315
+ G1,G17,G54,G90,920.000,1049.000,1250.000,250.000,,; Move up one row
316
+ G1,G17,G54,G90,920.000,1050.000,1250.000,250.000,,
317
+ G1,G17,G54,G90,1250.000,1050.000,1250.000,250.000,,
318
+ G1,G17,G54,G90,1250.000,1050.000,1250.000,250.000,,; Move up one row
319
+ G1,G17,G54,G90,1250.000,1051.000,1250.000,250.000,,
320
+ G1,G17,G54,G90,1250.000,1051.000,1250.000,250.000,,; End the program
321
+ G1,G17,G54,G90,1250.000,1051.000,1250.000,250.000,M2,; End of program