use vias for diodes

This commit is contained in:
daniel
2023-06-18 09:36:17 +02:00
parent f81ddb2e82
commit cd5b548e65
2 changed files with 8 additions and 15 deletions

View File

@@ -189,12 +189,11 @@ pcbs:
where: switch
params:
keycaps: true
reverse: true
reverse: false
hotswap: true
from: "{{column_net}}"
to: "{{colrow}}"
diode:
# TODO diode without throughhole?
what: diode
where: [switch]
params:
@@ -212,7 +211,6 @@ pcbs:
C: ENCA
D: undefined
scroll_diode:
# TODO diode without throughhole
what: diode
where: [scrollwheel]
params:

View File

@@ -2,8 +2,7 @@ module.exports = {
params: {
designator: 'D',
from: undefined,
to: undefined,
thru_holes: false
to: undefined
},
body: p => `
@@ -38,14 +37,10 @@ module.exports = {
(pad 1 smd rect (at -1.65 0 ${p.rot}) (size 0.9 1.2) (layers B.Cu B.Paste B.Mask) ${p.to.str})
(pad 2 smd rect (at 1.65 0 ${p.rot}) (size 0.9 1.2) (layers F.Cu F.Paste F.Mask) ${p.from.str})
${p.thru_holes === false
? ""
: `
${''/* THT terminals */}
(pad 1 thru_hole rect (at -3.81 0 ${p.rot}) (size 1.778 1.778) (drill 0.9906) (layers *.Cu *.Mask) ${p.to.str})
(pad 2 thru_hole circle (at 3.81 0 ${p.rot}) (size 1.905 1.905) (drill 0.9906) (layers *.Cu *.Mask) ${p.from.str})
`}
${''/* vias */}
(pad 1 thru_hole circle (at -0.75 0 ${p.rot}) (size 0.6 0.6) (drill 0.3) (layers *.Cu *.Mask) ${p.to.str})
(pad 2 thru_hole circle (at 0.75 0 ${p.rot}) (size 0.6 0.6) (drill 0.3) (layers *.Cu *.Mask) ${p.from.str})
)
`
}
`
}