-
Notifications
You must be signed in to change notification settings - Fork 0
/
danns87_corne_custom.yaml
374 lines (353 loc) · 8.97 KB
/
danns87_corne_custom.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
units:
px: 2
py: 2
uc_pcb_x: 17.78
uc_pcb_y: 33.25
reset_x: 3.52
reset_y: 6
jst_x: 7.55
jst_y: 10.35
# Measured. Just the housing itself, modulo legs and plastic peg
pcm12_x: 6.7
pcm12_y: 2.75
points:
key:
padding: cy
tags:
1u: true
footprints:
choc_hotswap:
type: choc
params:
hotswap: true
reverse: true
keycaps: true
nets:
# from: P1
# to: P2
from: =colrow
to: =column_net
diode:
type: diode
nets:
# from: P3
# to: P4
from: =colrow
to: =row_net
anchor:
shift: [0, -5]
zones:
matrix:
columns:
outer:
stagger: 0 cy
spread: cx
key:
column_net: P21
bind: [0.5,0.5,0.5,1]
pinky:
stagger: 0 cy
spread: cx
key:
column_net: P20
bind: [0.5,0.5,0.5,0.5]
ring:
stagger: 0.70 cy
spread: cx
key:
column_net: P19
bind: [0.5,0.5,0.5,1]
middle:
stagger: 0.25 cy
spread: cx
key:
column_net: P18
bind: [1.4,0.5,0.5,0.5]
index:
stagger: -0.25 cy
spread: cx
key:
column_net: P15
bind: [1.6,0.5,0.5,0.5]
inner:
stagger: -0.2 cy
spread: cx
key:
column_net: P14
bind: [0.9,0.5,0.5,0.5]
rows:
bottom:
row_net: P6
home:
row_net: P5
top:
row_net: P4
thumbfan:
anchor:
ref: matrix_inner_bottom
shift: [-2 cx, -1 cy]
rows:
thumb:
row_net: P7
columns:
near:
spread: cx + 0.6
stagger: -4.7
origin: [-0.5 cx, -0.5 cy]
rotate: 15
key:
column_net: P18
bind: [0.5,0.5,0.5,1]
home:
spread: cx
stagger: 0
rotate: -15
origin: [-0.5 cx, -0.5 cy]
key:
column_net: P15
bind: [0.5,0.5,0.5,0.5]
far:
spread: cx
stagger: 0
rotate: -15
origin: [-0.5 cx, -0.5 cy]
key:
column_net: P14
bind: [0.5,1,0.5,0.5]
tags:
1u: true
15u: false
#rows:
# thumb:
# rotate: 90
outlines:
# board dimensions according to JLCPCB: 122.28 mm x 101.05 mm
exports:
keys_outline:
- type: keys
side: left
#size: [cx + px, cy + py]
size: [cx, cy]
#corner: px
##################################################
# Grafted-on PCB areas to accommodate footprints #
##################################################
thumbfan_graft:
- type: polygon
points:
- ref: matrix_index_bottom
shift: [0.5 cx, 0 cy]
- ref: thumbfan_near_thumb
shift: [0 cx, 0.5 cy]
- ref: thumbfan_near_thumb
shift: [0 cx, -0.5 cy]
- ref: thumbfan_near_thumb
shift: [0.5 cx, -0.5 cy]
- ref: thumbfan_home_thumb
shift: [-0.5 cx, -0.5 cy]
- ref: thumbfan_home_thumb
shift: [0.5 cx, -0.5 cy]
- ref: thumbfan_far_thumb
shift: [-0.5 cx, -0.5 cy]
- ref: thumbfan_far_thumb
shift: [0 cx, -0.5 cy]
- ref: thumbfan_far_thumb
shift: [0 cx, 0.5 cy]
- ref: matrix_index_bottom
shift: [1.5 cx, 0 cy]
uc_graft:
main:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0 cx - 2, 0.5 cy - 39.4 + 0.3 + 1.5 + 0.2]
rotate: 0
size: [1.80 cx - 2, 39.4 - 1.5 + 0.4]
#corner: px
# A single graft for the reset button and JST connector
reset_jst_graft:
main:
type: rectangle
anchor:
ref:
- matrix_index_bottom
shift: [0 cx - 2, -0.5 cy]
rotate: 0
size: [2.80 cx - 2, 0.5cy + 7.4]
#corner: px
#####################################################
# Outlines used for debugging/tuning the PCB cutout #
#####################################################
uc_outline_debug:
pcb:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1, 0.5 cy - uc_pcb_y - 0.5]
rotate: 0
size: [uc_pcb_x, uc_pcb_y]
magnetic_usb:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + uc_pcb_x/2 - 10.76/2, 0.5 cy - 0.5]
size: [10.76, 6.03]
jst_outline_debug:
main:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + 2.6, 0.5 cy - 2 - uc_pcb_y - jst_y]
size: [jst_x, jst_y]
reset_outline_debug:
main:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + jst_x + 3.5 + 2.6/2, 0.5 cy - 2 - uc_pcb_y - jst_y + jst_y/2 - reset_y/2]
size: [reset_x, reset_y]
pcm12_outline_debug:
main:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + uc_pcb_x/2 - pcm12_x/2, 0.5 cy + 0.5 - 5.5 - pcm12_y]
size: [pcm12_x, pcm12_y]
#####################################
# Outlines used for PCB User layers #
#####################################
keycaps1u:
main:
type: keys
side: left
size: [1cx - 0.5, 1cy - 0.5] # Choc keycaps are 17.5 x 16.5
bound: false
tags: [1u]
keycaps15u:
main:
type: keys
side: left
size: [1.5cx - 0.5, 1cy - 0.5] # Choc keycaps are 17.5 x 16.5
bound: false
tags: [15u]
keycaps_outline:
[keycaps1u, keycaps15u]
####################################
# Outlines used for PCB Cut layers #
####################################
pcb_cutout_composite:
main:
type: outline
name: keys_outline
thumbfan_graft:
type: outline
name: thumbfan_graft
operation: add
uc_graft:
type: outline
name: uc_graft
operation: add
reset_jst_graft:
type: outline
name: reset_jst_graft
operation: add
# Fillets need to be applied on an separate, composite outline
# This allows the creation of fillets on corners created from the intersection of the underlying outlines
pcb_cutout:
main:
type: outline
name: pcb_cutout_composite
fillet: 2
pcb_cutout_debug:
main:
type: outline
name: pcb_cutout
keycaps_outline:
type: outline
name: keycaps_outline
operation: subtract
fillet: px
uc_outline_debug:
type: outline
name: uc_outline_debug
operation: subtract
# PCM12 position is inaccurate
#pcm12_outline_debug:
# type: outline
# name: pcm12_outline_debug
# operation: subtract
reset_outline_debug:
type: outline
name: reset_outline_debug
operation: subtract
jst_outline_debug:
type: outline
name: jst_outline_debug
operation: subtract
pcbs:
danns87_corne_custom:
outlines:
edge:
outline: pcb_cutout
layer: Edge.Cuts
# TODO there's a way to add stuff to the silkscreen layer
keycaps:
outline: keycaps_outline
layer: Eco1.User
uc:
outline: uc_outline_debug
layer: Eco1.User
reset:
outline: reset_outline_debug
layer: Eco1.User
jst:
outline: jst_outline_debug
layer: Eco1.User
footprints:
promicro:
type: promicro_pretty
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + uc_pcb_x/2, 0.5 cy - uc_pcb_y - 0.5 + 29.7/2]
rotate: -90
pcm12:
type: pcm12
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + uc_pcb_x/2 - pcm12_x/2 + 3.35, 0.5 cy + 0.5 - 5.5 - pcm12_y + 6.425]
rotate: 180
nets:
from: pos
to: RAW
params:
reverse: true
reset:
# TODO: Make sure dimensions are correct!!
type: uxcellsmdspst
nets:
r1: RST
r2: GND
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + jst_x + 3.5 + 2.6/2 + reset_x/2, 0.5 cy - 2 - uc_pcb_y - jst_y + jst_y/2]
rotate: 90
params:
reverse: true
bat:
type: bat2p54
nets:
neg: GND
anchor:
ref:
- matrix_inner_top
shift: [0.5cx + 1 + 2.6 + jst_x/2, 0.5 cy - 2 - uc_pcb_y - jst_y]
rotate: 90