From 6bf16ac7fe0376d30d111ac76eccc024b133e67d Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Thu, 1 Aug 2024 23:54:37 +0200 Subject: [PATCH] Ergogen: Add knob visualization to rotary encoder footprint --- ergogen/footprints/rotary_modified.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ergogen/footprints/rotary_modified.js b/ergogen/footprints/rotary_modified.js index 044baa1..c3ba26c 100644 --- a/ergogen/footprints/rotary_modified.js +++ b/ergogen/footprints/rotary_modified.js @@ -1,6 +1,10 @@ // Modified version of rotary.js, without the mounting legs // -------------------------------------------------------- // EC12 rotary encoder +// +// Params +// radius: radius of the knob in mm (only for visualization on User.Drawings) +// // Nets // from: corresponds to switch pin 1 (for button presses) // to: corresponds to switch pin 2 (for button presses) @@ -57,6 +61,9 @@ module.exports = { (fp_circle (center -0.12 -0.04) (end 2.88 -0.04) (layer F.SilkS) (width 0.12)) (fp_circle (center -0.12 -0.04) (end 2.88 -0.04) (layer F.Fab) (width 0.12)) + ${'' /* knob visualization */} + (fp_circle (center 0 0) (end ${p.radius} 0) (layer Dwgs.User) (width 0.1)) + ${''/* pin names */} (pad A thru_hole rect (at -7.62 -2.54 ${p.r}) (size 2 2) (drill 1) (layers *.Cu *.Mask) ${p.A}) (pad C thru_hole circle (at -7.62 -0.04) (size 2 2) (drill 1) (layers *.Cu *.Mask) ${p.C})