Root/modules/sw-spdt-smt.fpd

Source at commit 7f3f9267cb007e13eca0af273f9eedad0c6c5659 created 1 year 6 months ago.
By Werner Almesberger, components/stm32.lib: add STM32L052x6/8 in QFN32 (KxU) package
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)
13    line . __2 w
14    __4: vec __1(kx/2, 0mm)
15    line __2 . w
16    __5: vec .(0mm, ky)
17    line . __4 w
18}
19
20frame corners {
21    table
22        { pad, dx, dy }
23        { 4, -1, 1 }
24        { 5, 1, 1 }
25        { 6, 1, -1 }
26        { 7, -1, -1 }
27
28    set x = dx*(cdx+cpx)/2
29
30    set y = dy*(cdy+cpy)/2
31
32    set ?corners = 4
33
34    __0: vec @(x, y)
35    __1: vec .(cpx/2, cpy/2)
36    __2: vec __0(-cpx/2, -cpy/2)
37    pad "$pad" . __1
38}
39
40frame holes {
41    table
42        { x }
43        { -hx/2 }
44        { hx/2 }
45
46    __0: vec @(x, 0mm)
47    __1: vec .(hr, hr)
48    __2: vec __0(-hr, -hr)
49    hole . __1
50}
51
52frame pads {
53    table
54        { ?reg, pad, x }
55        { 1, 1, -e }
56        { 1, 2, 0mm }
57        { 1, 3, e }
58        { 0, 1, -1.5*e }
59        { 0, 2, 0.5*e }
60        { 0, 3, 1.5*e }
61
62    __0: vec @(x, hy)
63    __1: vec .(-px/2, 0mm)
64    __2: vec .(px, py)
65    pad "$pad" __1 .
66}
67
68frame outline {
69    table
70        { ?corners, dx, dy }
71        { 0, 0mm, 0mm }
72        { 4, (ox-cdx)/2+0.3mm, (oy-cdy)/2+0.3mm }
73
74    __0: vec @(ox/2, -oy/2)
75    __1: vec .(0mm, oy)
76    __6: vec .(0mm, -dy)
77    __2: vec @(-ox/2, -oy/2)
78    __3: vec .(0mm, oy)
79    __7: vec .(0mm, -dy)
80    __4: vec __2(dx, 0mm)
81    __5: vec __0(-dx, 0mm)
82    line __4 . w
83    __8: vec __2(0mm, dy)
84    line __7 . w
85    __9: vec __0(0mm, dy)
86    line __6 . w
87}
88
89package "SW-${type}"
90unit mm
91
92table
93    { type, px, py, e, reg, hx, hy, hr, ox, oy, kx, ky, tx, corners, cdx, cdy, cpx, cpy }
94    { "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 }
95    { "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 }
96
97set w = 5mil
98
99__0: vec @(0mm, hy)
100frame outline @
101frame pads @
102frame holes @
103frame knob @
104frame corners @
105measx holes.__0 >> holes.__0 -3.5mm-ky
106measy pads.__1 -> pads.__2 0.5mm
107measx pads.__1 -> pads.__2 -0.5mm
108measx pads.__0 -> pads.__0 py+1mm
109measy pads.__0 << holes.__0 -2mm
110measy pads.__2 << holes.__0 -3mm
111measx knob.__1 >> knob.__1 ky+1mm
112measy knob.__2 -> knob.__0 0.5mm
113measx knob.__2 -> knob.__4 -0.7mm
114measy outline.__2 >> outline.__3 2mm
115measx outline.__2 >> outline.__0 -ky-3mm
116measx pads.__0 >> pads.__0 py+1.5mm
117measx __0 -> pads.__0 py+0.5mm
118measy holes.__2 -> holes.__1 0.5mm
119measy corners.__1 -> corners.__2 cpx+0.5mm
120measy corners.__2 -> corners.__1 0.5mm
121measx corners.__2 -> corners.__1 -0.5mm
122measx corners.__1 -> corners.__2 -py-ky-1.8mm
123

Archive Download this file

Branches:
master



interactive