-
-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy pathschema.json
More file actions
504 lines (504 loc) · 22.4 KB
/
Copy pathschema.json
File metadata and controls
504 lines (504 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
{
"title": "Ergogen configuration schema",
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"points": {
"description": "Defines the locations of the keys",
"type": "object",
"properties": {
"zones": {
"description": "A collection of columns",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"anchor": {
"description": "Used to anchor the zone to something",
"type": "object",
"properties": {
"ref": {
"description": "Point reference",
"$ref": "#/definitions/pointRef"
},
"orient": {
"description": "Add rotation before translation",
"type": "number"
},
"shift": {
"description": "Add translation",
"$ref": "#/definitions/coordPair"
},
"rotate": {
"description": "Add rotation after translation",
"type": "number"
},
"affects": {
"description": "Affect only certain dimensions of the anchor",
"type": "string"
}
}
},
"columns": {
"description": "Columns of the layout",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"stagger": {
"description": "Extra vertical shift to the starting point of the whole column compared to the previous one",
"type": "number"
},
"spread": {
"description": "The horizontal space between this column and the next",
"type": "number"
},
"rotate": {
"description": "Column rotation around the origin",
"type": "number"
},
"origin": {
"description": "Origin relative to center of column's first key",
"$ref": "#/definitions/coordPair"
},
"rows": {
"description": "Key-specific key defs",
"$ref": "#/definitions/rowdef"
},
"key": {
"description": "Column-level key defs",
"$ref": "#/definitions/keydef"
}
}
}
},
"rows": {
"description": "Row-level key defs",
"$ref": "#/definitions/rowdef"
},
"key": {
"description": "Zone-level key defs",
"$ref": "#/definitions/keydef"
}
}
}
},
"key": {
"description": "Global key defs",
"$ref": "#/definitions/keydef"
},
"rotate": {
"description": "Global angle to all of the points",
"type": "number"
},
"mirror": {
"description": "Global mirror",
"$ref": "#/definitions/mirror"
}
}
},
"outlines": {
"description": "Create solid, continuous outlines",
"type": "object",
"properties": {
"glue": {
"description": "Glue the halves together",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"top": {
"$ref": "#/definitions/glueSide"
},
"bottom": {
"$ref": "#/definitions/glueSide"
},
"waypoints": {
"description": "Can be used to supplement the glue",
"type": "array",
"items": {
"type": "object",
"properties": {
"percent": {
"description": "The y coordinate along the centerline (going from the top intersection to the bottom intersection)",
"type": "number"
},
"width": {
"description": "The offset on the x axis",
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/definitions/coordPair"
}
]
}
}
}
},
"extra": {
"type": "array",
"items": true
}
}
}
},
"exports": {
"description": "Configure what to \"export\" as outlines from this phase",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"extends": {
"type": "string"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["add", "subtract", "intersect", "stack"]
},
"type": {
"description": "keys: the combined outline that we've just created\nrectangle: an independent primitive rectangle\ncircle: an independent circle primitive\npolygon: an independent polygon primitive\noutline: a previously defined outline",
"type": "string",
"enum": ["keys", "rectangle", "circle", "polygon", "outline"]
},
"side": {
"description": "keys: the part we want to use\nleft and right are just the appropriate side of the laid out keys, without the glue\nmiddle means an \"ideal\" version of the glue (meaning that instead of the outline.glue we defined above, we get both - left - right, so the exact middle piece we would have needed to glue everything together\nboth means both sides, held together by the glue\nglue is just the raw glue shape we defined under outline.glue",
"type": "string",
"enum": ["left", "right", "middle", "both", "glue"]
},
"tag": {
"description": "keys: optional tags to filter which points to consider in this step, where tags can be specified as key-level attributes",
"type": "array",
"items": {
"type": "string"
}
},
"glue": {
"description": "keys: the name of the glue to use, if applicable",
"type": "string"
},
"size": {
"description": "keys/rectangle: the width/height of the rectangles to lay onto the points. Note that the relative flag for the glue declaration above meant this size as the basis of the shift. So during a keys layout with a size of 18, for example, a relative shift of [.5, .5] actually means [9, 9] in mms.",
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/definitions/coordPair"
}
]
},
"corner": {
"description": "keys/rectangle: corner radius of the rectangles",
"type": "number"
},
"bevel": {
"description": "keys/rectangle: corner bevel of the rectangles, can be combined with rounding",
"type": "number"
},
"bound": {
"description": "keys: whether to use the binding declared previously",
"type": "boolean"
},
"ref": {
"description": "rectangle/circle: what position and rotation to consider as the origin",
"$ref": "#/definitions/pointRef"
},
"rotate": {
"description": "rectangle/circle: extra rotation",
"type": "number"
},
"shift": {
"description": "rectangle/circle: extra translation",
"$ref": "#/definitions/coordPair"
},
"radius": {
"description": "circle: the radius of the circle",
"type": "number"
},
"points": {
"description": "polygon: the points of the polygon",
"type": "array",
"items": {
"type": "object",
"properties": {
"ref": {
"description": "What position and rotation to consider as the origin",
"$ref": "#/definitions/pointRef"
},
"shift": {
"description": "Extra translation",
"$ref": "#/definitions/pointRef"
}
}
}
},
"name": {
"description": "outline: the name of the referenced outline",
"type": "string"
}
}
}
}
}
}
},
"cases": {
"description": "Add a basic and minimal 3D aspect to the generation process",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"outline": {
"description": "Specifies which outline to import onto the xy plane",
"type": "string"
},
"extrude": {
"description": "How much the outline should be extruded along the z axis",
"type": "number"
},
"translate": {
"$ref": "#/definitions/threeNumArray"
},
"rotate": {
"$ref": "#/definitions/threeNumArray"
},
"operation": {
"description": "How to combine the resulting object with what we have so far",
"type": "string",
"enum": ["add", "subtract", "intersect"]
}
}
}
}
},
"pcbs": {
"description": "Add a PCB to the generation process",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"outlines": {
"description": "Define the edge cut of the PCB using a previously defined outline name",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"outline": {
"type": "string"
},
"layer": {
"type": "string"
}
}
}
},
"footprints": {
"description": "PCB footprints",
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"type": {
"description": "Footprint type",
"type": "string",
"enum": ["mx", "alps", "choc", "diode", "promicro", "slider", "button", "rgb", "jstph", "pin", "hole", "pad", "reset"]
},
"anchor": {
"description": "Anchor",
"$ref": "#/definitions/glueAnchor"
},
"nets": {
"description": "Type-specific net params",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"params": {
"description": "Type-specific (non-net) footprint params",
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
}
},
"definitions": {
"coordPair": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"threeNumArray": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"fourNumArray": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4,
"maxItems": 4
},
"keydef": {
"type": "object",
"properties": {
"name": {
"description": "The unique identifier of this specific key",
"type": "string"
},
"shift": {
"description": "Key-level translation",
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"rotate": {
"description": "Key-level rotation",
"type": "number"
},
"padding": {
"description": "Amount of vertical space before moving on to the next key in the column",
"type": "number"
},
"skip": {
"description": "Signals that the point is just a \"helper\" and should not be included in the output",
"type": "boolean"
},
"asym": {
"description": "Indicate which side the key should appear on",
"type": "string",
"enum": [
"left",
"right",
"both"
]
},
"mirror": {
"description": "Key-level mirror",
"$ref": "#/definitions/mirror"
},
"bind": {
"description": "Bind the individual holes to each other",
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/definitions/coordPair"
},
{
"$ref": "#/definitions/fourNumArray"
}
]
},
"column_net": {
"type": "string"
},
"column_mark": {
"type": "string"
}
}
},
"rowdef": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"bind": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
},
"pointRef": {
"type": [
"string",
"array"
],
"items": {
"type": "string"
}
},
"mirror": {
"type": "object",
"properties": {
"axis": {
"description": "Points will be mirrored according to the axis",
"type": "number"
},
"ref": {
"$ref": "#/definitions/pointRef"
},
"distance": {
"description": "Millimeters between the referenced point and its duplicate",
"type": "number"
}
}
},
"glueAnchor": {
"type": "object",
"properties": {
"ref": {
"description": "Point reference",
"$ref": "#/definitions/pointRef"
},
"shift": {
"description": "Add translation",
"$ref": "#/definitions/coordPair"
},
"rotate": {
"description": "Add rotation",
"type": "number"
},
"relative": {
"description": "shift is interpreted in layout size units instead of mms",
"type": "boolean"
}
}
},
"glueSide": {
"type": "object",
"properties": {
"left": {
"$ref": "#/definitions/glueAnchor"
},
"right": {
"anyOf": [
{
"$ref": "#/definitions/glueAnchor"
},
{
"type": "number"
}
]
}
}
}
}
}