samoklava/samoklava.yaml

302 lines
7.0 KiB
YAML

units:
kx: cx
ky: cy
px: 2
py: 2
points:
key:
footprints:
choc:
type: chocmini
nets:
from: =column_net
to: GND
params:
keycaps: true
reverse: true
zones:
matrix:
columns:
pinky:
origin: [ 0, -1cy ]
rotate: 28 # 19 degrees
stagger: 0 # affects distance to previous column so useless for a left pinky column
spread: 0 # affects distance to previous column so useless for a left pinky column
row_overrides:
bottom:
column_net: P21
home:
column_net: P20
top:
column_net: P19
ring:
rotate: -10
stagger: 10
spread: cx + 4
row_overrides:
bottom:
column_net: P18
home:
column_net: P15
top:
column_net: P14
middle:
origin: [ 0, -1cy ]
rotate: -18
stagger: 11.5
spread: 18
row_overrides:
bottom:
column_net: P16
home:
column_net: P10
top:
column_net: P9
index:
origin: [ 0, -1cy ]
rotate: 0
stagger: -7
spread: 23
row_overrides:
bottom:
column_net: P8
home:
column_net: P7
top:
column_net: P6
inner:
origin: [ 0, -1cy ]
rotate: 0
spread: cx
stagger: -1
row_overrides:
bottom:
column_net: P5
home:
column_net: P4
top:
column_net: P3
rows:
bottom:
padding: 1cy
home:
padding: 1cy
top:
padding: 1cy
thumbfan:
anchor:
ref: matrix_index_bottom
shift: [ -3, -22 ]
columns:
home:
spread: 19
rotate: 5
key:
column_net: P2
column_mark: R
near:
rotate: 0
spread: -19
key:
column_net: P0
column_mark: M
far:
spread: 38
rotate: 0 # 35 degrees cumulative
# origin: [-9.5, -9]
key:
column_net: P1
column_mark: P
rows:
thumb:
padding: 0
outlines:
# board dimensions according to JLCPCB: 122.28 mm x 101.05 mm
exports:
raw:
- type: keys
side: left
size: [kx + 1.01px, ky + 1py]
corner: px
thumbfan_glue:
- type: polygon
points:
- ref: matrix_inner_bottom
shift: [0.5 kx + 0.5px, -0.5 ky + 0.5 py]
- ref: thumbfan_far_thumb
shift: [0.5 kx - 0.5px, 0.5 ky + 0.5 py]
- ref: thumbfan_far_thumb
shift: [0.5 kx - 0.5px, -0.5 ky - 0.5 py]
- ref: thumbfan_near_thumb
shift: [-0.5 kx + 0.5 px, -0.5 ky - 0.5 py]
- ref: matrix_pinky_bottom
shift: [0.5 kx - 0.5 py, -0.5 ky - 0.5 py]
- ref: matrix_pinky_home
- ref: matrix_inner_home
patch_outer:
- type: polygon
points:
- ref: matrix_ring_top
- ref: matrix_ring_bottom
- ref: matrix_pinky_bottom
shift: [-0.5 (kx + px), 0]
- ref: matrix_pinky_top
shift: [-0.5 (kx + px), 0]
patch_inner:
- type: polygon
points:
- ref: matrix_inner_top
shift: [0.5 (kx + px), 0]
- ref: matrix_inner_bottom
shift: [0.5 (kx + px), 0]
- ref: matrix_index_bottom
- ref: matrix_index_top
patch_hole:
- type: polygon
points:
- ref: matrix_ring_top
- ref: matrix_index_top
- ref: matrix_index_bottom
- ref: matrix_ring_bottom
top_round:
- type: polygon
points:
- ref: matrix_pinky_top
shift: [-0.5 * (kx - px), 0.5 * (ky + py)]
- ref: matrix_ring_top
shift: [-0.5 (kx + px), 0.5 * (ky + py)]
- ref: matrix_middle_top
shift: [-0.5 (kx -px), 0.5 * (ky + py)]
- ref: matrix_index_top
shift: [ (kx), 0.5 * (ky + py)]
- ref: matrix_inner_top
shift: [0.5 (kx - px), 0.5 * (ky + py)]
- ref: matrix_index_bottom
controller_area:
main:
type: rectangle
anchor:
ref:
- matrix_inner_top
shift: [0 kx, -4.05 ky]
size: [32, 76.5]
corner: px
switches:
main:
type: keys
side: left
size: 14
bound: false
keycaps:
main:
type: keys
side: left
size: [kx, ky]
bound: false
corner: 1
keywell:
main:
type: outline
name: raw
patch_inner:
type: outline
name: patch_inner
operation: add
patch_outer:
type: outline
name: patch_outer
operation: add
thumbfan_glue:
type: outline
name: thumbfan_glue
operation: add
top_round:
type: outline
name: top_round
operation: add
patch_hole:
type: outline
name: patch_hole
operation: add
base_outline:
main:
type: outline
name: keywell
controller:
type: outline
name: controller_area
operation: add
plate:
main:
type: outline
name: keywell
switches:
type: outline
name: switches
operation: subtract
pcb:
main:
type: outline
name: base_outline
pcbs:
board:
outlines:
edge:
outline: pcb
layer: Edge.Cuts
# TODO there's a way to add stuff to the silkscreen layer
footprints:
mcu_l:
type: promicro
params:
orientation: up
anchor:
ref:
- matrix_inner_top
shift: [20, -11]
rotate: 270
mcu_r:
type: promicro
params:
orientation: down
anchor:
ref:
- matrix_inner_top
shift: [22.5, -12.25]
rotate: 270
reset:
type: button
anchor:
ref:
- matrix_inner_bottom
shift: [27, 0]
rotate: 270
params:
variant: 2_pin_th
nets:
from: GND
to: RST
info_l:
type: text
anchor:
ref:
- matrix_pinky_bottom
shift: [kx, -0.5 kx]
rotate: -25
params:
text: "Dupa\\nby KostkaBrukowa"
justify: left
info_r:
type: text
anchor:
ref:
- matrix_pinky_bottom
shift: [kx, -0.5 kx]
rotate: -25
params:
layer: B.SilkS
text: "Dupa\\nby KostkaBrukowa"
justify: right mirror