Root/modules/tswa.fpd

Source at commit 3f1b978b2b49efe7eda3b369bd1a5c13dd113cc0 created 8 years 4 months ago.
By Werner Almesberger, add C&K TSWA series switch with 22 mm wheel
1/* MACHINE-GENERATED ! */
2
3frame holes {
4    set xi = 9mm
5
6    set d = 1.6mm
7
8    loop i = 0, 1
9
10    __0: vec @(xi*(i-0.5), 0mm)
11    __1: vec .(d/2, d/2)
12    __2: vec __0(-d/2, -d/2)
13    hole . __1
14}
15
16frame pins {
17    table
18        { pin, x, y }
19        { "NO", 0mm, y2-y1 }
20        { "A", -xo/2, 0mm }
21        { "B", 0mm, -y1 }
22        { "COM", xo/2, 0mm }
23
24    table
25        { xo, y1, y2 }
26        { 18.52mm, xo/2, 10.83mm }
27
28    set d = 1.3mm
29
30    __0: vec @(x, y)
31    __1: vec .(d/2, d/2)
32    __2: vec __0(-d/2, -d/2)
33    rpad "$pin" . __1
34}
35
36frame outline {
37    set w = 5mil
38
39    __0: vec @(0mm, d/2)
40    circ @ . w
41}
42
43package "TSWA-${d}"
44unit mm
45
46set d = 22mm
47
48frame pins @
49frame outline @
50frame holes @
51measx pins.__0 >> pins.__0 5mm
52measx holes.__0 >> holes.__0 4mm
53measx holes.__2 -> holes.__1 -1mm
54measx pins.__2 -> pins.__1 -1mm
55measy pins.__0 >> pins.__0 14mm
56measy pins.__0 >> holes.__0 13mm
57

Archive Download this file

Branches:
master



interactive