1
0
mirror of git://projects.qi-hardware.com/kicad-libs.git synced 2024-11-25 17:55:20 +02:00

modules/sw-spdt-smt.fpd: add SW-CUS12B (for Copal CUS-12B and C&K PCM12SMTR)

This commit is contained in:
Werner Almesberger 2014-01-07 21:07:59 -03:00
parent 065199a87e
commit fc2d104008
3 changed files with 63 additions and 16 deletions

View File

@ -11,3 +11,4 @@ BAT-BLP2032SM: MPD Surface Mount Battery Holder for CR2032
Note: data sheet has contradictory information - check against real part. Note: data sheet has contradictory information - check against real part.
BAT-LP2032SM: MPD Surface Mount Battery Holder for CR2032 BAT-LP2032SM: MPD Surface Mount Battery Holder for CR2032
Note: data sheet has contradictory information - check against real part. Note: data sheet has contradictory information - check against real part.
SW-CUS12B: Copal CUS-12B or C&K PCM12SMTR

View File

@ -410,4 +410,5 @@ Mechanical
E-SWITCH_320 E-SWITCH_320
EVQQ7 EVQQ7
SW-JS102011SAQN SW-JS102011SAQN
SW-CUS12B
TSWA-22mm TSWA-22mm

View File

@ -17,6 +17,26 @@ frame knob {
line . __4 w line . __4 w
} }
frame corners {
table
{ pad, dx, dy }
{ 4, -1, 1 }
{ 5, 1, 1 }
{ 6, 1, -1 }
{ 7, -1, -1 }
set x = dx*(cdx+cpx)/2
set y = dy*(cdy+cpy)/2
set ?corners = 4
__0: vec @(x, y)
__1: vec .(cpx/2, cpy/2)
__2: vec __0(-cpx/2, -cpy/2)
pad "$pad" . __1
}
frame holes { frame holes {
table table
{ x } { x }
@ -30,48 +50,73 @@ frame holes {
} }
frame pads { frame pads {
set x = e*(i-2) table
{ ?reg, pad, x }
loop i = 1, 3 { 1, 1, -e }
{ 1, 2, 0mm }
{ 1, 3, e }
{ 0, 1, -1.5*e }
{ 0, 2, 0.5*e }
{ 0, 3, 1.5*e }
__0: vec @(x, hy) __0: vec @(x, hy)
__1: vec .(-px/2, 0mm) __1: vec .(-px/2, 0mm)
__2: vec .(px, py) __2: vec .(px, py)
pad "$i" __1 . pad "$pad" __1 .
} }
frame outline { frame outline {
table
{ ?corners, dx, dy }
{ 0, 0mm, 0mm }
{ 4, (ox-cdx)/2+0.3mm, (oy-cdy)/2+0.3mm }
__0: vec @(ox/2, -oy/2) __0: vec @(ox/2, -oy/2)
__1: vec __0(0mm, oy) __1: vec .(0mm, oy)
line . __0 w __6: vec .(0mm, -dy)
__2: vec @(-ox/2, -oy/2) __2: vec @(-ox/2, -oy/2)
line . __0 w __3: vec .(0mm, oy)
__3: vec __2(0mm, oy) __7: vec .(0mm, -dy)
line . __2 w __4: vec __2(dx, 0mm)
__5: vec __0(-dx, 0mm)
line __4 . w
__8: vec __2(0mm, dy)
line __7 . w
__9: vec __0(0mm, dy)
line __6 . w
} }
package "SW-${type}" package "SW-${type}"
unit mm unit mm
table table
{ type, px, py, e, hx, hy, hr, ox, oy, kx, ky, tx } { type, px, py, e, reg, hx, hy, hr, ox, oy, kx, ky, tx, corners, cdx, cdy, cpx, cpy }
{ "JS102011SAQN", 1.2mm, 2.5mm, 2.5mm, 6.8mm, 4mm-py, 0.9mm/2, 9mm, 3.6mm, 1.5mm, 2mm, 2mm } { "JS102011SAQN", 1.2mm, 2.5mm, 2.5mm, 1, 6.8mm, 4mm-py, 0.9mm/2, 9mm, 3.6mm, 1.5mm, 2mm, 2mm, 0, 0mm, 0mm, 0mm, 0mm }
{ "CUS12B", 0.7mm, 1.5mm, 1.5mm, 0, 3mm, 2.5mm-py, 0.9mm/2, 6.7mm, 2.6mm, 1.3mm, 1.5mm, 1.5mm, 4, 6.3mm, 1.35mm, 1mm, 0.8mm }
set w = 5mil set w = 5mil
__0: vec @(0mm, hy)
frame outline @ frame outline @
frame pads @ frame pads @
frame holes @ frame holes @
frame knob @ frame knob @
frame corners @
measx holes.__0 >> holes.__0 -3.5mm-ky measx holes.__0 >> holes.__0 -3.5mm-ky
measx holes.__2 -> holes.__1 2*hr+0.5mm
measy pads.__1 -> pads.__2 0.5mm measy pads.__1 -> pads.__2 0.5mm
measx pads.__1 -> pads.__2 py+0.5mm measx pads.__1 -> pads.__2 -0.5mm
measx pads.__0 -> pads.__0 -0.5mm measx pads.__0 -> pads.__0 py+1mm
measy pads.__0 << holes.__0 -2mm measy pads.__0 << holes.__0 -2mm
measy pads.__2 << holes.__0 -3mm measy pads.__2 << holes.__0 -3mm
measx knob.__1 >> knob.__1 ky+1mm measx knob.__1 >> knob.__1 ky+1mm
measy knob.__2 -> knob.__0 0.5mm measy knob.__2 -> knob.__0 0.5mm
measx knob.__2 -> knob.__4 -0.7mm measx knob.__2 -> knob.__4 -0.7mm
measy outline.__2 >> outline.__3 1mm measy outline.__2 >> outline.__3 2mm
measx outline.__2 >> outline.__0 -ky-2.5mm measx outline.__2 >> outline.__0 -ky-3mm
measx pads.__0 >> pads.__0 py+1.5mm
measx __0 -> pads.__0 py+0.5mm
measy holes.__2 -> holes.__1 0.5mm
measy corners.__1 -> corners.__2 cpx+0.5mm
measy corners.__2 -> corners.__1 0.5mm
measx corners.__2 -> corners.__1 -0.5mm
measx corners.__1 -> corners.__2 -py-ky-1.8mm