-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapricorn.yaml
563 lines (549 loc) · 11.6 KB
/
capricorn.yaml
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
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
units:
# Parameters
capx: cx - 0.5 # Key cap size horizontal
capy: cy - 0.5 # Key cap size vertical
kx: cx # Key spacing horizontal
ky: cy # Key spacing vertical
angle: 24 # Angle between halves
pinkie_stagger: cy + 5
pinkie_splay: 8
pinkie_spread: 1.052kx
ring_stagger: 5
# Constants
xiao_x: 18
xiao_y: 22.5
pcm12_x: 8.8
pcm12_y: 4.55
jstph_x: 5.9
jstph_y: 7.6
visual_x: 1 # Visual representation of keycaps horizontal
visual_y: 1 # Visual representation of keycaps vertical
sf: 16 # Switch footprint (square)
points:
zones.matrix:
rotate: -angle + pinkie_splay
mirror: &mirror
ref: matrix_inner_top
distance: 42
key: &key
width: capx
height: capy
tags:
keys: true
1u: true
footprints:
choc_hotswap:
type: choc
anchor:
rotate: 180
nets:
from: =row_net
to: =column_net
params:
keycaps: true
hotswap: true
diode:
type: diode
anchor:
shift: [0, 4.7]
rotate: 180
nets:
from: =column_net
to: =column_net
via:
type: via
anchor:
shift: [-8.25, 4.7]
nets:
net: =column_net
mirror:
footprints:
choc_hotswap:
type: choc
diode:
type: diode
via:
type: via
anchor:
shift: [8.25, 4.7]
rows:
bottom.padding: ky
home.padding: ky
top.padding: ky
columns.pinkie:
spread: kx
rows:
bottom.skip: true
home:
bind: [1.25, 30, 1.25, 1.75]
row_net: P9
column_net: P4
top:
bind: [1.25, 6, 4, 1.75]
row_net: P10
column_net: P4
home.mirror:
row_net: P6
column_net: P4
top.mirror:
row_net: P5
column_net: P4
columns.ring:
spread: pinkie_spread
stagger: pinkie_stagger
rotate: -pinkie_splay
rows:
bottom:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P8
column_net: P3
home:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P9
column_net: P3
top:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P10
column_net: P3
bottom.mirror:
row_net: P7
column_net: P3
home.mirror:
row_net: P6
column_net: P3
top.mirror:
row_net: P5
column_net: P3
columns.middle:
spread: kx
stagger: ring_stagger
rows:
bottom:
bind: [1.25, 1.75, 6.25, 1.75]
row_net: P8
column_net: P2
home:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P9
column_net: P2
top:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P10
column_net: P2
bottom.mirror:
row_net: P7
column_net: P2
home.mirror:
row_net: P6
column_net: P2
top.mirror:
row_net: P5
column_net: P2
columns.index:
spread: kx
rows:
bottom:
bind: [1.25, 1.75, 2.5, 1.75]
row_net: P8
column_net: P1
home:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P9
column_net: P1
top:
bind: [1.25, 1.75, 1.25, 1.75]
row_net: P10
column_net: P1
bottom.mirror:
row_net: P7
column_net: P1
home.mirror:
row_net: P6
column_net: P1
top.mirror:
row_net: P5
column_net: P1
columns.inner:
spread: kx - 0.5
stagger: -0.5kx
row_overrides:
bottom.skip: true
home:
bind: [1.25, 1.75, 1.25, 1.75]
rotate: 90
padding: kx
row_net: P9
column_net: P0
tags:
matrix_inner: true
top:
bind: [1.25, 1.75, 1.25, 1.75]
rotate: 90
padding: kx
row_net: P10
column_net: P0
tags:
matrix_inner: true
home.mirror:
row_net: P6
column_net: P0
top.mirror:
row_net: P5
column_net: P0
zones.thumb:
anchor:
ref: matrix_index_bottom
shift: [-.25kx, -ky - 2.5]
mirror: *mirror
key: *key
columns:
far:
key:
name: thumb_far
bind: [1.25, 5.25, 1.25, 6.25]
row_net: P8
column_net: P4
tags:
15u: true
1u: false
key.mirror:
row_net: P7
column_net: P4
home:
spread: 1.25kx - 0.5
stagger: 0.25kx + 0.5
key:
name: thumb_home
bind: [1.25, 5.25, 1.25, 6.25]
rotate: 90
row_net: P8
column_net: P0
tags:
15u: true
1u: false
key.mirror:
row_net: P7
column_net: P0
zones.mcu:
anchor:
ref: [matrix_index_top, mirror_matrix_index_top]
shift: [0, 0.25kx - 0.5xiao_y + 0.05]
key:
name: mcu
footprints:
- type: xiao
anchor:
shift: [0, -6.75]
rotate: -90
zones.jstph:
anchor:
ref: mcu
shift: [-0.5xiao_x + 0.5jstph_x - 1.75, -0.5xiao_y - 0.5jstph_y + 0.5]
key:
name: jstph
footprints:
- type: jstph
anchor:
shift: [0.25, 0]
rotate: 90
nets:
pos: pos
neg: neg
zones.pcm12:
anchor:
ref: mcu
shift: [-15.25, 0.5xiao_y - 0.5jstph_x + 0.8]
key:
name: pcm12
footprints:
- type: pcm12
anchor:
shift: [0, 0]
rotate: 180
nets:
from: neg
to: neg
zones.bat:
anchor:
ref: mcu
shift: [-15.25 + 0.5jstph_y, 3.4]
key:
name: bat
footprints:
- type: bat
anchor:
shift: [0, 0]
rotate: 180
nets:
pos: pos
neg: neg
zones.battery:
anchor:
ref: mcu
shift: [0, 0]
key:
name: battery
zones.mount_bl:
anchor:
ref: matrix_index_bottom
shift: [30, 0]
key:
name: mount_bl
zones.mount_tl:
anchor:
ref: matrix_inner_top
shift: [12, 0]
key:
name: mount_tl
zones.mount_br:
anchor:
ref: mirror_matrix_index_bottom
shift: [30, 0]
key:
name: mount_br
zones.mount_tr:
anchor:
ref: mirror_matrix_inner_top
shift: [12, 0]
key:
name: mount_tr
outlines:
exports:
_keycap_outlines:
- type: keys
side: both
size: [capx, capy]
bound: false
tags: [1u]
_keycap_outlines15:
- type: keys
side: both
size: [1.5cx - 0.5, capy]
bound: false
tags: [15u]
_halves:
- type: keys
side: left
size: sf
tags: [keys]
- type: keys
side: right
size: sf
tags: [keys]
_centre:
- type: polygon
points:
- ref: matrix_index_top
shift: [0.25kx, 0.25ky + 2.75]
- ref: mirror_matrix_index_top
shift: [0.25kx, 0.25ky + 2.75]
- ref: mirror_thumb_home
shift: [-0.5kx, 1.2ky]
- ref: thumb_home
shift: [-0.5kx, 1.2ky]
_centre':
- type: polygon
points:
- ref: matrix_index_top
shift: [0.25kx, 0.25ky + 2.65]
- ref: mirror_matrix_index_top
shift: [0.25kx, 0.25ky + 2.65]
- ref: mirror_thumb_home
shift: [-0.5kx, 1.2ky]
- ref: thumb_home
shift: [-0.5kx, 1.2ky]
_mcu:
- type: rectangle
anchor:
ref: mcu
shift: [-0.5xiao_x, -0.5xiao_y]
size: [xiao_x, xiao_y]
_jstph:
- type: rectangle
anchor:
ref: jstph
shift: [-0.5jstph_y + 2.5, 0.5jstph_x - 0.5]
rotate: -90
size: [jstph_x, jstph_y]
_pcm12:
- type: rectangle
anchor:
ref: pcm12
shift: [0.5pcm12_x, 0.5pcm12_y - 0.25]
rotate: 180
size: [pcm12_x, pcm12_y]
_bat:
- type: circle
anchor:
ref: bat
shift: [0, 0.75]
radius: 0.5
- type: circle
anchor:
ref: bat
shift: [0, -0.75]
radius: 0.5
_battery:
- type: rectangle
anchor:
ref: battery
shift: [-15.5, -41.5]
size: [31, 20.5]
_mount_bl:
- type: circle
anchor:
ref: mount_bl
shift: [0, 0]
radius: 0.1
_mount_tl:
- type: circle
anchor:
ref: mount_tl
shift: [0, 0]
radius: 0.1
_mount_br:
- type: circle
anchor:
ref: mount_br
shift: [0, 0]
radius: 0.1
_mount_tr:
- type: circle
anchor:
ref: mount_tr
shift: [0, 0]
radius: 0.1
_spacer_bl:
- type: circle
anchor:
ref: mount_bl
shift: [0, 0]
radius: 2.2
_spacer_tl:
- type: circle
anchor:
ref: mount_tl
shift: [0, 0]
radius: 2.2
_spacer_br:
- type: circle
anchor:
ref: mount_br
shift: [0, 0]
radius: 2.2
_spacer_tr:
- type: circle
anchor:
ref: mount_tr
shift: [0, 0]
radius: 2.2
_hole_bl:
- type: circle
anchor:
ref: mount_bl
shift: [0, 0]
radius: 1
_hole_tl:
- type: circle
anchor:
ref: mount_tl
shift: [0, 0]
radius: 1
_hole_br:
- type: circle
anchor:
ref: mount_br
shift: [0, 0]
radius: 1
_hole_tr:
- type: circle
anchor:
ref: mount_tr
shift: [0, 0]
radius: 1
panel:
- _centre
- _halves
_middle:
- _centre'
- -_halves
_cover:
- name: _middle
fillet: 2
board:
- name: panel
fillet: 2
- ^_mount_bl
- ^_mount_tl
- ^_mount_br
- ^_mount_tr
cover:
- name: _cover
- ^_spacer_bl
- ^_spacer_tl
- ^_spacer_br
- ^_spacer_tr
- ^_hole_bl
- ^_hole_tl
- ^_hole_br
- ^_hole_tr
preview:
- board
- operation: subtract
name: _keycap_outlines
fillet: 1
- operation: subtract
name: _keycap_outlines15
fillet: 1
- ^_mcu
- ^_pcm12
- ^_jstph
- ^_bat
- ^_battery
- ^_mount_bl
- ^_mount_tl
- ^_mount_br
- ^_mount_tr
- ^cover
pcbs:
capricorn:
outlines:
main:
outline: board
cases:
battery_cover:
- type: outline
name: _cover
extrude: -1
- type: outline
name: _spacer_bl
extrude: 8
- type: outline
name: _spacer_tl
extrude: 8
- type: outline
name: _spacer_br
extrude: 8
- type: outline
name: _spacer_tr
extrude: 8
- type: outline
name: _hole_bl
extrude: 8
operation: subtract
- type: outline
name: _hole_tl
extrude: 8
operation: subtract
- type: outline
name: _hole_br
extrude: 8
operation: subtract
- type: outline
name: _hole_tr
extrude: 8
operation: subtract
pcb_outline:
- type: outline
name: panel
extrude: 1.6