samoklava/config.yaml

501 lines
12 KiB
YAML

# `U` is a predefined unit of measure that means 19.05mm, which is MX spacing
units:
# Proxy Spacing Variables for easy changing to choc/mx
kx: u
ky: u
# Padding Variables
px: kx + 1
py: ky + 1
center_x: 118.34
center_y: -121
# Defaults to M2 Screws
screwSize: 1.5
standoffSize: 2.5
# 65.9, 81
mounting_1_x: center_x-47
mounting_1_y: center_y+47
# 146.65, 81
mounting_2_x: center_x+34
mounting_2_y: center_y+47
# 158.5, 146 mm
mounting_3_x: center_x+47
mounting_3_y: center_y-19
# 125.65, 172
mounting_4_x: center_x+13
mounting_4_y: center_y-47
# 102.65, 142
mounting_5_x: center_x-15
mounting_5_y: center_y-14
# 65.9, 138
mounting_6_x: center_x-47
mounting_6_y: center_y-47
points:
zones:
matrix:
# Fix placement on KiCAD sheet.
anchor.shift: [100, -100]
key:
padding: 1ky
spread: 1kx
rotate: -12
columns:
pinky:
rows.bottom:
rotate: -90
rows.home:
rotate: 90
shift: [-1kx, -1kx]
ring.key:
stagger: 0.25kx
middle.key.stagger: 0.25kx
index.key.stagger: -0.25kx
inner:
key.stagger: -0.15kx
rows.top.rotate: 90
rows:
bottom.padding: kx
home.padding: kx
top.padding: kx
thumb:
anchor:
ref: matrix_middle_bottom
shift: [0.4kx, -1.35kx]
columns:
inner:
key.name: thumb_inner
tucky:
key:
name: thumb_tucky
stagger: -2
splay: -14
shift: [2, 0]
reachy:
key.spread: kx
key.splay: -14
key.stagger: 3
key.origin: [-0.5kx, -0.5kx]
key.shift: [3, 0]
key.rotate: 90
key.width: 1.5kx
key.name: thumb_reachy
outlines:
_thumb:
- what: rectangle
where: thumb_reachy
bound: true
size: [1.5kx, ky]
_padded_thumb:
- what: rectangle
where: thumb_reachy
bound: true
size: [1.5px, py]
_keys:
- what: rectangle
where: true
size: [kx, ky]
_padded_keys:
- what: rectangle
where: true
size: [px, py]
key_outline:
- name: _keys
- +_thumb
_expanded_key_outline:
- name: _padded_keys
- +_padded_thumb
_limits:
- what: rectangle
size: [100, 100]
adjust.shift: [center_x, center_y]
combo:
- name: _limits
- operation: stack
name: _keys
- operation: stack
name: _thumb
_pcb_outline:
- what: polygon
points:
- shift: [center_x-50, center_y+50]
- shift: [100, 0]
- shift: [0, -100]
# - shift: [-40, 0]
# - shift: [-15, 15]
# - shift: [-45, 0]
- shift: [-100, 0]
fillet: 2
pcb_outline_combo:
- name: _pcb_outline
- operation: stack
name: _keys
- operation: stack
name: _limits
_case_outline:
- what: polygon
points:
- shift: [center_x-54, center_y+53]
- shift: [112, 0]
- shift: [0, -112]
- shift: [-40, 0]
- shift: [-9, 9]
- shift: [-63, 0]
fillet: 2
_case_outline_xl:
- what: polygon
points:
- shift: [center_x-56, center_y+55]
- shift: [116, 0]
- shift: [0, -116]
- shift: [-43, 0]
- shift: [-9, 9]
- shift: [-64, 0]
fillet: 2
_mounting:
- what: circle
where.shift: [mounting_1_x, mounting_1_y]
radius: screwSize
- what: circle
where.shift: [mounting_2_x, mounting_2_y]
radius: screwSize
- what: circle
where.shift: [mounting_3_x, mounting_3_y]
radius: screwSize
- what: circle
where.shift: [mounting_4_x, mounting_4_y]
radius: screwSize
- what: circle
where.shift: [mounting_5_x, mounting_5_y]
radius: screwSize
- what: circle
where.shift: [mounting_6_x, mounting_6_y]
radius: screwSize
_standoff:
- what: circle
where.shift: [mounting_1_x, mounting_1_y]
radius: standoffSize
- what: circle
where.shift: [mounting_2_x, mounting_2_y]
radius: standoffSize
- what: circle
where.shift: [mounting_3_x, mounting_3_y]
radius: standoffSize
- what: circle
where.shift: [mounting_4_x, mounting_4_y]
radius: standoffSize
- what: circle
where.shift: [mounting_5_x, mounting_5_y]
radius: standoffSize
- what: circle
where.shift: [mounting_6_x, mounting_6_y]
radius: standoffSize
control_area:
- what: polygon
points:
- shift: [center_x-44, center_y-50]
- shift: [0, 38]
- shift: [22.5, 0]
- shift: [9, -9]
- shift: [0, -12]
- shift: [10, -2]
- shift: [5, -5]
- shift: [0, -10]
fillet: 1
plate:
- what: polygon
where: true
points:
- shift: [-6.005, 7.8]
- shift: [3.5, 0]
- shift: [0, -0.815]
- shift: [5.01, 0]
- shift: [0, 0.815]
- shift: [3.5, 0]
- shift: [0, -0.815]
- shift: [0.98, 0]
- shift: [0, -0.98]
- shift: [0.815, 0]
- shift: [0, -3.5]
- shift: [-0.815, 0]
- shift: [0, -5.01]
- shift: [0.815, 0]
- shift: [0, -3.5]
- shift: [-0.815, 0]
- shift: [0, -0.98]
- shift: [-0.98, 0]
- shift: [0, -0.815]
- shift: [-3.5, 0]
- shift: [0, 0.815]
- shift: [-5.01, 0]
- shift: [0, -0.815]
- shift: [-3.5, 0]
- shift: [0, 0.815]
- shift: [-0.98, 0]
- shift: [0, 0.98]
- shift: [-0.815, 0]
- shift: [0, 3.5]
- shift: [0.815, 0]
- shift: [0, 5.01]
- shift: [-0.815, 0]
- shift: [0, 3.5]
- shift: [0.815, 0]
- shift: [0, 0.98]
- shift: [0.98, 0]
plate_supports:
- what: rectangle
where: true
size: [15, 15]
case_outline_combo:
- name: _case_outline
- ^_case_outline_xl
- ^_pcb_outline
- ^_expanded_key_outline
- ^_mounting
- ^_standoff
- ^control_area
case_outline_bottom:
- name: _case_outline
- ^_case_outline_xl
- ^_mounting
- ^_standoff
case_outline_top:
- name: _case_outline
- ^_case_outline_xl
# - ^_pcb_outline
- ^_expanded_key_outline
- ^_mounting
- ^_standoff
- ^control_area
plate_combo:
- name: plate
- ^_case_outline
- ^_standoff
- -control_area
- ^_expanded_key_outline
plate_combo_nokeys:
- name: plate
- ^_case_outline
- ^_standoff
- -control_area
plate_supports_combo:
- name: plate_supports
- ^_case_outline
- -_standoff
- -control_area
cases:
_outline:
- name: _case_outline
extrude: 1
_xl_outline:
- name: _case_outline_xl
extrude: 1
# assuming 0.6mm pcb, this goes to half a pcb
_outerWall:
- name: _case_outline_xl
extrude: 5.3
_innerWall:
- name: _case_outline
extrude: 5.3
_wall:
- what: case
name: _outerWall
operation: add
- what: case
name: _innerWall
operation: subtract
_holes:
- name: _mounting
extrude: 4
_standoffs:
- name: _standoff
extrude: 4
bottom_case:
- what: case
name: _standoffs
operation: add
- what: case
name: _holes
operation: subtract
- what: case
name: _xl_outline
operation: add
- what: case
name: _wall
operation: add
pcbs:
board:
outlines:
edge:
outline: _pcb_outline
layer: Edge.Cuts
control_area:
outline: control_area
layer: Dwgs.User
case_outline:
outline: _case_outline
layer: Dwgs.User
case_outline_xl:
outline: _case_outline_xl
layer: Dwgs.User
footprints:
keys:
what: key-switches
where: true
params:
from: "{{name}}"
to: GND
mx: true
mx_hotswap: true
mx_reverse: true
mx_pth: false
mx_rev_pad: true
gateron_lp: true
gateron_lp_hotswap: true
gateron_lp_reverse: true
gateron_lp_pth: false
gateron_lp_rev_pad: true
gateron_lp_neg_y: true
keycaps: true
mcu:
what: promicro-pretty
where:
shift: [center_x - 32.8, center_y - 32.25]
rotate: 90
params:
P7: matrix_pinky_top
P18: matrix_ring_top
P19: matrix_middle_top
P20: matrix_index_top
P21: matrix_inner_top
P15: matrix_pinky_home
P14: matrix_ring_home
P16: matrix_middle_home
P10: matrix_index_home
P1: matrix_inner_home
P2: matrix_pinky_bottom
P3: matrix_ring_bottom
P4: matrix_middle_bottom
P5: matrix_index_bottom
P6: matrix_inner_bottom
P8: thumb_tucky
P9: thumb_reachy
RAW: RAW
trrs:
what: trrs
where:
- shift: [center_x + 48, center_y + 51.7]
params:
reverse: true
symmetric: true
A: GND
B: GND
C: trrs_data
D: VCC
reset:
what: reset_button
where:
shift: [center_x - 8, center_y - 48]
rotate: 180
params:
from: GND
to: RST
reset2:
what: b3u1000p
where:
shift: [center_x - 8, center_y - 48]
rotate: 180
params:
r1: GND
r2: RST
slider_power:
what: slider_threeway
where:
shift: [center_x - 18.15, center_y - 48.25]
rotate: 180
params:
from: Bplus
left: ''
right: RAW
reversible: true
# if the switch is verticle, reverse the left and right nets on back side
# or to just make the wiring easier
reverse_left_right: true
slider_wireless:
what: slider_threeway
where:
shift: [center_x-10, center_y - 40]
rotate: -90
params:
from: P0
left: thumb_inner
right: trrs_data
reversible: true
# if the switch is verticle, reverse the left and right nets on back side
reverse_left_right: true
wireless_marker:
what: text
where:
shift: [center_x-13.2, center_y - 38]
rotate: 90
params:
layer: "F.SilkS"
text: "wireless"
h_size: .5
v_size: .5
wireless_box:
what: text
where:
shift: [center_x-12, center_y - 38.4]
rotate: 90
params:
layer: "F.SilkS"
text: "口"
h_size: 1.5
v_size: 2.2
wired_marker:
what: text
where:
shift: [center_x-13.2, center_y - 42]
rotate: 90
params:
layer: "B.SilkS"
text: "wired"
h_size: .5
v_size: .5
wired_box:
what: text
where:
shift: [center_x-12, center_y - 41.5]
rotate: 90
params:
layer: "B.SilkS"
text: "口"
h_size: 1.5
v_size: 2.2
jst:
what: jstph_reversible
where:
shift: [center_x-18, center_y-42]
rotate: 180
params:
pos: Bplus
neg: GND
mounting_hole_1:
what: mountinghole
where.shift: [mounting_1_x, mounting_1_y]
mounting_hole_2:
what: mountinghole
where.shift: [mounting_2_x, mounting_2_y]
mounting_hole_3:
what: mountinghole
where.shift: [mounting_3_x, mounting_3_y]
mounting_hole_4:
what: mountinghole
where.shift: [mounting_4_x, mounting_4_y]
mounting_hole_5:
what: mountinghole
where.shift: [mounting_5_x, mounting_5_y]
mounting_hole_6:
what: mountinghole
where.shift: [mounting_6_x, mounting_6_y]