You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,15 +48,15 @@ unit = "mm"
48
48
invert_y = true
49
49
document_start = "M3 G21\n"
50
50
layer_start = "(Start Layer)\n"
51
-
linecollection_start = "(Start Block)\n"
51
+
line_start = "(Start Block)\n"
52
52
segment_first = """G00 Z5
53
53
G00 X{x:.4f}f Y{y:.4f}
54
54
M3 S1000
55
55
G4 P0.3
56
56
G01 Z1 F3500
57
57
"""
58
58
segment = """G01 X{x:.4f} Y{y:.4f} Z1\n"""
59
-
linecollection_end = """G00 Z 5.0000
59
+
line_end = """G00 Z 5.0000
60
60
M5 S0
61
61
G4 P0.5\n"""
62
62
document_end = """M5
@@ -79,20 +79,20 @@ All of the options below default to an empty text which means no output is gener
79
79
-`layer_start`: Output to be generated before a layer is started
80
80
-`layer_end`: Output to be generated after a layer is finished.
81
81
-`layer_join`: Output to be generated between two layers.
82
-
-`linecollection_start`: Output to be generated before a linecollection is started
83
-
-`linecollection_end`: Output to be generated after a linecollection is finished.
84
-
-`linecollection_join`: Output to be generated between two linecollections.
82
+
-`line_start`: Output to be generated before a line is started
83
+
-`line_end`: Output to be generated after a line is finished.
84
+
-`line_join`: Output to be generated between two lines.
85
85
-`segment_first`: Output to be generated at the first coordinate pair.
86
86
-`segment_last`: Output to be generated at the last coordinate pair.
87
-
-`segment`: Output to be generated to all subsequent coordinate pairs of a linecollection.
87
+
-`segment`: Output to be generated to all subsequent coordinate pairs of a line.
88
88
89
89
### Segment formatting
90
90
`gwrite` uses `.format()` encoding which means that data elements must be encasulated in `{}` brackets. This provides a particular syntax token which differs from between elements.
91
91
For example every element except `layer_join` and `segment_join` accepts the value of `index`. You would encode that in the text as `{index:d}` the d denotes an integer value. If you need to have a `{` value in your text you would encode that as `{{` likewise you would encode a `}` as `}}`.
92
92
-`layer_start`: Accepts `index` the current layer number.
93
93
-`layer_end`: Accepts `index` the current layer number.
94
-
-`linecollection_start`: Accepts `index` the current linecollection number.
95
-
-`linecollection_end`: Accepts `index` the current linecollection number.
94
+
-`line_start`: Accepts `index` the current line number.
95
+
-`line_end`: Accepts `index` the current line number.
96
96
97
97
The segments accept a lot of values that may be useful statistics for various formats:
98
98
*`index`: index of the particular coordinate pair. eg `{index:d}`
@@ -117,56 +117,56 @@ The gwrite command gives you access to write to a variety of formats that fit th
117
117
```
118
118
<document_start>
119
119
<layer_start>
120
-
<linecollection_start>
120
+
<line_start>
121
121
<segment_first>
122
122
<segment>
123
123
<segment>
124
124
<segment>
125
125
<segment>
126
126
<segment_last>
127
-
<linecollection_end>
128
-
<linecollection_start>
127
+
<line_end>
128
+
<line_start>
129
129
<segment_first>
130
130
<segment>
131
131
<segment>
132
132
<segment>
133
133
<segment>
134
134
<segment_last>
135
-
<linecollection_end>
136
-
<linecollection_start>
135
+
<line_end>
136
+
<line_start>
137
137
<segment_first>
138
138
<segment>
139
139
<segment>
140
140
<segment>
141
141
<segment>
142
142
<segment_last>
143
-
<linecollection_end>
143
+
<line_end>
144
144
<layer_end>
145
145
<layer_start>
146
-
<linecollection_start>
146
+
<line_start>
147
147
<segment_first>
148
148
<segment>
149
149
<segment>
150
150
<segment>
151
151
<segment>
152
152
<segment_last>
153
-
<linecollection_end>
154
-
<linecollection_start>
153
+
<line_end>
154
+
<line_start>
155
155
<segment_first>
156
156
<segment>
157
157
<segment>
158
158
<segment>
159
159
<segment>
160
160
<segment_last>
161
-
<linecollection_end>
162
-
<linecollection_start>
161
+
<line_end>
162
+
<line_start>
163
163
<segment_first>
164
164
<segment>
165
165
<segment>
166
166
<segment>
167
167
<segment>
168
168
<segment_last>
169
-
<linecollection_end>
169
+
<line_end>
170
170
<layer_end>
171
171
<document_end>
172
172
```
@@ -230,12 +230,12 @@ The `json` profile is already bundled with this package. It is defined as follow
0 commit comments