Switch config and footprints to corney-island

This commit is contained in:
Marco Massarelli 2023-05-10 13:19:26 -04:00
parent c296ef6d37
commit eca3eb051f
5 changed files with 1829 additions and 730 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
module.exports = {
params: {
designator: 'B', // for Button
side: 'F',
from: undefined,
to: undefined
},
body: p => `
(module kbd:ResetSW (layer F.Cu) (tedit 5B9559E6) (tstamp 61905781)
(descr "Two pin through hole Tactile Switch, the same as on the Corne")
(tags "Tactile Switch")
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 2.55) (layer F.SilkS) ${p.ref_hide} (effects (font (size 1 1) (thickness 0.15))))
(fp_text value "" (at 0 -2.55) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))))
${'' /* outline */}
(fp_text user RESET (at 0 0 ${p.rot}) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))))
(fp_text user RESET (at 0.127 0 ${p.rot}) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)))
(fp_line (start 3 1.5) (end 3 1.75) (layer B.SilkS) (width 0.15))
(fp_line (start 3 1.75) (end -3 1.75) (layer B.SilkS) (width 0.15))
(fp_line (start -3 1.75) (end -3 1.5) (layer B.SilkS) (width 0.15))
(fp_line (start -3 -1.5) (end -3 -1.75) (layer B.SilkS) (width 0.15))
(fp_line (start -3 -1.75) (end 3 -1.75) (layer B.SilkS) (width 0.15))
(fp_line (start 3 -1.75) (end 3 -1.5) (layer B.SilkS) (width 0.15))
(fp_line (start -3 1.75) (end 3 1.75) (layer F.SilkS) (width 0.15))
(fp_line (start 3 1.75) (end 3 1.5) (layer F.SilkS) (width 0.15))
(fp_line (start -3 1.75) (end -3 1.5) (layer F.SilkS) (width 0.15))
(fp_line (start -3 -1.75) (end -3 -1.5) (layer F.SilkS) (width 0.15))
(fp_line (start -3 -1.75) (end 3 -1.75) (layer F.SilkS) (width 0.15))
(fp_line (start 3 -1.75) (end 3 -1.5) (layer F.SilkS) (width 0.15))
${'' /* pins */}
(pad 2 thru_hole circle (at -3.25 0 ${p.rot}) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) ${p.from.str})
(pad 1 thru_hole circle (at 3.25 0 ${p.rot}) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) ${p.to.str})
)
`
}

View File

@ -0,0 +1,58 @@
module.exports = {
params: {
designator: 'D',
from: {type: 'net', value: 'from'},
to: {type: 'net', value: 'to'}
},
body: p => `
(footprint "Diode_SMD:Nexperia_CFP3_SOD-123W"
${p.at}
(descr "Nexperia CFP3 (SOD-123W), https://assets.nexperia.com/documents/outline-drawing/SOD123W.pdf")
(tags "CFP3 SOD-123W")
(attr smd)
(fp_text reference "${p.ref}" (at 0 -2 ${p.rot}) (layer "F.SilkS") ${p.ref_hide}
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value "Nexperia_CFP3_SOD-123W" (at 0 2 ${p.rot}) (layer "F.Fab") hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -2.26 -0.95) (end -2.26 0.95) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
(fp_line (start -2.26 -0.95) (end 1.4 -0.95) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
(fp_line (start -2.26 0.95) (end 1.4 0.95) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
(fp_line (start -2.25 -1.1) (end -2.25 1.1) (stroke (width 0.05) (type solid)) (layer "F.CrtYd"))
(fp_line (start -2.25 -1.1) (end 2.25 -1.1) (stroke (width 0.05) (type solid)) (layer "F.CrtYd"))
(fp_line (start 2.25 -1.1) (end 2.25 1.1) (stroke (width 0.05) (type solid)) (layer "F.CrtYd"))
(fp_line (start 2.25 1.1) (end -2.25 1.1) (stroke (width 0.05) (type solid)) (layer "F.CrtYd"))
(fp_line (start -1.3 -0.85) (end 1.3 -0.85) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -1.3 0.85) (end -1.3 -0.85) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -0.75 0) (end -0.35 0) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -0.35 -0.55) (end -0.35 0.55) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -0.35 0) (end 0.25 -0.4) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -0.35 0) (end 0.25 0.4) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start 0.25 -0.4) (end 0.25 0.4) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start 0.75 0) (end 0.25 0) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start 1.3 -0.85) (end 1.3 0.85) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start 1.3 0.85) (end -1.3 0.85) (stroke (width 0.1) (type solid)) (layer "F.Fab"))
(fp_line (start -2.26 -0.95) (end -2.26 0.95) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
(fp_line (start -2.26 -0.95) (end 1.4 -0.95) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
(fp_line (start -2.26 0.95) (end 1.4 0.95) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
(fp_line (start -2.25 -1.1) (end -2.25 1.1) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
(fp_line (start -2.25 -1.1) (end 2.25 -1.1) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
(fp_line (start 2.25 -1.1) (end 2.25 1.1) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
(fp_line (start 2.25 1.1) (end -2.25 1.1) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
(fp_line (start -1.3 -0.85) (end 1.3 -0.85) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start -1.3 0.85) (end -1.3 -0.85) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start -0.75 0) (end -0.35 0) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start -0.35 -0.55) (end -0.35 0.55) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start -0.35 0) (end 0.25 -0.4) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start -0.35 0) (end 0.25 0.4) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start 0.25 -0.4) (end 0.25 0.4) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start 0.75 0) (end 0.25 0) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start 1.3 -0.85) (end 1.3 0.85) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(fp_line (start 1.3 0.85) (end -1.3 0.85) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
(pad "1" thru_hole rect (at -1.4 0 ${ p.rot}) (size 1.2 1.2) (drill 0.3) (layers *.Cu *.Mask) (zone_connect 2) ${p.to.str})
(pad "2" thru_hole rect (at 1.4 0 ${p.rot}) (size 1.2 1.2) (drill 0.3) (layers *.Cu *.Mask) (zone_connect 2) ${p.from.str })
)
`
}

18
input/footprints/via.js Normal file
View File

@ -0,0 +1,18 @@
// Via
// Nets
// net: the net this via should be connected to
module.exports = {
params: {
net: undefined
},
body: p => `
(via
${p.at.replace(/ [-\d]+\)$/, ')')}
(size 0.8)
(drill 0.4)
(layers "F.Cu" "B.Cu")
(net ${p.net.index})
)
`
}