From 768ff7cf064c34c6b043b7b744ef003358421fde Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 7 Jul 2023 21:09:17 +0200 Subject: [PATCH] add screw holes --- ergogen/config.yaml | 42 +++++++++++++++++++++++++++++++++++++- ergogen/footprints/hole.js | 19 +++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 ergogen/footprints/hole.js diff --git a/ergogen/config.yaml b/ergogen/config.yaml index c504010..fd02870 100644 --- a/ergogen/config.yaml +++ b/ergogen/config.yaml @@ -290,4 +290,44 @@ pcbs: adjust: shift: [27, 8] rotate: 180 - + screw_hole_top_left: + what: hole + where: + ref.aggregate.parts: [matrix_ring_num, matrix_ring_top] + shift: [-11, 0] + params: + size: 4.7 + drill: 4.1 + screw_hole_top_right: + what: hole + where: + ref.aggregate.parts: [matrix_index_num, matrix_inner_num, matrix_index_top, matrix_inner_top] + shift: [0, 2] + params: + size: 4.7 + drill: 4.1 + screw_hole_bottom_left: + what: hole + where: + ref.aggregate.parts: [matrix_outer_home, matrix_outer_bottom, matrix_pinky_home, matrix_pinky_bottom] + shift: [0, 2] + params: + size: 4.7 + drill: 4.1 + screw_hole_bottom_right: + what: hole + where: + ref.aggregate.parts: [matrix_middle_mod, matrix_middle_bottom, matrix_index_mod, matrix_index_bottom] + shift: [0, 4] + params: + size: 4.7 + drill: 4.1 + screw_hole_thumb: + what: hole + where: + ref.aggregate.parts: [thumbs_layer_cluster, thumbs_space_cluster] + shift: [10, 8] + params: + size: 4.7 + drill: 4.1 + diff --git a/ergogen/footprints/hole.js b/ergogen/footprints/hole.js new file mode 100644 index 0000000..0aef79b --- /dev/null +++ b/ergogen/footprints/hole.js @@ -0,0 +1,19 @@ +module.exports = { + params: { + class: "MP", + size: 4.0, + drill: 2.2 + }, + body: (p) => { + return ` + (module Hole (layer F.Cu) (tedit 5F7666C1) + ${p.at /* parametric position */} + (fp_text reference "${p.ref}" (at 0 0.5) (layer F.SilkS) ${p.ref_hide} + (effects (font (size 1 1) (thickness 0.15))) + ) + + (pad "" np_thru_hole circle (at 0 0) (size ${p.size} ${p.size}) (drill ${p.drill}) (layers *.Cu *.Mask) (tstamp 75b224f0-3010-4e8c-bf32-f95a770c96d9)) + ) + `; + }, +};