Root/modules/sw-spdt-smt.fpd

Source at commit 18ed84d8318543385b7db15b115dfef8fd715fb6 created 8 years 4 months ago.
By Werner Almesberger, add C&K JS102011SAQN SPDT SMT switch (symbol and footprint)
1/* MACHINE-GENERATED ! */
2
3frame knob {
4    table
5        { x }
6        { -tx/2 }
7        { tx/2 }
8
9    __0: vec @(x, -oy/2)
10    __1: vec .(0mm, -ky)
11    __2: vec .(-kx/2, 0mm)
12    __3: vec .(0mm, ky*0.75)
13    line . __2 w
14    __4: vec __1(kx/2, 0mm)
15    line __2 . w
16    __5: vec .(0mm, ky*0.75)
17    line . __4 w
18}
19
20frame holes {
21    table
22        { x }
23        { -hx/2 }
24        { hx/2 }
25
26    __0: vec @(x, 0mm)
27    __1: vec .(hr, hr)
28    __2: vec __0(-hr, -hr)
29    hole . __1
30}
31
32frame pads {
33    set x = e*(i-2)
34
35    loop i = 1, 3
36
37    __0: vec @(x, hy)
38    __1: vec .(-px/2, 0mm)
39    __2: vec .(px, py)
40    pad "$i" __1 .
41}
42
43frame outline {
44    table
45        { x }
46        { -ox/2 }
47        { ox/2 }
48
49    __0: vec @(x, -oy/2)
50    __1: vec .(0mm, oy)
51    line __0 . w
52}
53
54package "SW-${type}"
55unit mm
56
57table
58    { type, px, py, e, hx, hy, hr, ox, oy, kx, ky, tx }
59    { "JS102011SAQN", 1.2mm, 2.5mm, 2.5mm, 6.8mm, 4mm-py, 0.9mm/2, 9mm, 3.6mm, 1.5mm, 2mm, 2mm }
60
61set w = 5mil
62
63frame outline @
64frame pads @
65frame holes @
66frame knob @
67measx outline.__0 >> outline.__0 -2.5mm-ky
68measx holes.__0 >> holes.__0 -3.5mm-ky
69measx holes.__2 -> holes.__1 2*hr+0.5mm
70measy pads.__1 -> pads.__2 0.5mm
71measx pads.__1 -> pads.__2 py+0.5mm
72measy outline.__0 -> outline.__1 1mm
73measx pads.__0 -> pads.__0 -0.5mm
74measy pads.__0 << holes.__0 -2mm
75measy pads.__2 << holes.__0 -3mm
76measx knob.__1 >> knob.__1 ky
77measy knob.__2 -> knob.__0 0.5mm
78measx knob.__2 -> knob.__4 -0.7mm
79

Archive Download this file

Branches:
master



interactive