Skip to content

Commit 734666c

Browse files
committed
linecollection -> line, readme
1 parent 935ba62 commit 734666c

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ unit = "mm"
4848
invert_y = true
4949
document_start = "M3 G21\n"
5050
layer_start = "(Start Layer)\n"
51-
linecollection_start = "(Start Block)\n"
51+
line_start = "(Start Block)\n"
5252
segment_first = """G00 Z5
5353
G00 X{x:.4f}f Y{y:.4f}
5454
M3 S1000
5555
G4 P0.3
5656
G01 Z1 F3500
5757
"""
5858
segment = """G01 X{x:.4f} Y{y:.4f} Z1\n"""
59-
linecollection_end = """G00 Z 5.0000
59+
line_end = """G00 Z 5.0000
6060
M5 S0
6161
G4 P0.5\n"""
6262
document_end = """M5
@@ -79,20 +79,20 @@ All of the options below default to an empty text which means no output is gener
7979
- `layer_start`: Output to be generated before a layer is started
8080
- `layer_end`: Output to be generated after a layer is finished.
8181
- `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.
8585
- `segment_first`: Output to be generated at the first coordinate pair.
8686
- `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.
8888

8989
### Segment formatting
9090
`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.
9191
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 `}}`.
9292
- `layer_start`: Accepts `index` the current layer number.
9393
- `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.
9696

9797
The segments accept a lot of values that may be useful statistics for various formats:
9898
* `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
117117
```
118118
<document_start>
119119
<layer_start>
120-
<linecollection_start>
120+
<line_start>
121121
<segment_first>
122122
<segment>
123123
<segment>
124124
<segment>
125125
<segment>
126126
<segment_last>
127-
<linecollection_end>
128-
<linecollection_start>
127+
<line_end>
128+
<line_start>
129129
<segment_first>
130130
<segment>
131131
<segment>
132132
<segment>
133133
<segment>
134134
<segment_last>
135-
<linecollection_end>
136-
<linecollection_start>
135+
<line_end>
136+
<line_start>
137137
<segment_first>
138138
<segment>
139139
<segment>
140140
<segment>
141141
<segment>
142142
<segment_last>
143-
<linecollection_end>
143+
<line_end>
144144
<layer_end>
145145
<layer_start>
146-
<linecollection_start>
146+
<line_start>
147147
<segment_first>
148148
<segment>
149149
<segment>
150150
<segment>
151151
<segment>
152152
<segment_last>
153-
<linecollection_end>
154-
<linecollection_start>
153+
<line_end>
154+
<line_start>
155155
<segment_first>
156156
<segment>
157157
<segment>
158158
<segment>
159159
<segment>
160160
<segment_last>
161-
<linecollection_end>
162-
<linecollection_start>
161+
<line_end>
162+
<line_start>
163163
<segment_first>
164164
<segment>
165165
<segment>
166166
<segment>
167167
<segment>
168168
<segment_last>
169-
<linecollection_end>
169+
<line_end>
170170
<layer_end>
171171
<document_end>
172172
```
@@ -230,12 +230,12 @@ The `json` profile is already bundled with this package. It is defined as follow
230230
[gwrite.json]
231231
document_start = "{{"
232232
document_end = "}}\n"
233-
linecollection_join = ","
233+
line_join = ","
234234
layer_join = ","
235235
layer_start = "\n\t\"Layer\": {{"
236236
layer_end = "\t}}\n"
237-
linecollection_start = "\n\t\t\"LineCollection{index:d}\": [\n"
238-
linecollection_end = "\n\t\t]"
237+
line_start = "\n\t\t\"line{index:d}\": [\n"
238+
line_end = "\n\t\t]"
239239
segment = "\t\t{{\n\t\t\t\"X\": {ix:d},\n\t\t\t\"Y\": {iy:d}\n\t\t}},\n"
240240
segment_last = "\t\t{{\n\t\t\t\"X\": {ix:d},\n\t\t\t\"Y\": {iy:d}\n\t\t}}"
241241
```
@@ -245,7 +245,7 @@ Using this profile, you can generate JSON for the rectangle:
245245
```json
246246
{
247247
"Layer": {
248-
"LineCollection0": [
248+
"Line0": [
249249
{
250250
"X": 0,
251251
"Y": 0

0 commit comments

Comments
 (0)