Root/modules/qfn.fpd

Source at commit 424ddce9756cb5ead3e86ec27e767b4e25596ed6 created 9 years 8 months ago.
By Werner Almesberger, ants/: Passive board for antenna testing.
1/* MACHINE-GENERATED ! */
2
3frame center {
4    set pin = pins+1
5
6    set x = D2+0.1mm
7
8    set y = E2+0.1mm
9
10    __0: vec @(x/2, y/2)
11    __1: vec @(-x/2, -y/2)
12    pad "$pin" . __0
13}
14
15frame pad {
16    set px = (dx*X1+dy*Y1)/2
17
18    set py = (dy*X1+dx*Y1)/2
19
20    set pin = side*pins/4+i+1
21
22    __0: vec @(px, py)
23    __1: vec @(-px, -py)
24    pad "$pin" __0 .
25}
26
27frame side {
28    set pos = i-(pins/4-1)/2
29
30    loop i = 0, pins/4-1
31
32    __0: vec @(E*pos*dx, E*pos*dy)
33    frame pad .
34}
35
36frame pads {
37    table
38        { side, dx, dy }
39        { 0, 0, -1 }
40        { 1, 1, 0 }
41        { 2, 0, 1 }
42        { 3, -1, 0 }
43
44    __0: vec @(dy*C1/2, -dx*C2/2)
45    frame side .
46}
47
48frame index {
49}
50
51frame outline {
52    table
53        { index, dx, _, dy }
54        { 1, -1, 0, 0 }
55        { 0, 0, 0, -1 }
56        { 0, 1, 0, 0 }
57        { 0, 0, 0, 1 }
58
59    set mx = dx*C1/2
60
61    set my = dy*C2/2
62
63    set cx = mx+my
64
65    set cy = my-mx
66
67    set ax = -Y1/2*dx
68
69    set ay = -Y1/2*dy
70
71    set bx = -Y1/2*dy
72
73    set by = Y1/2*dx
74
75    __0: vec @(cx, cy)
76    w: vec .(ax, ay)
77    line __0 . w
78    __2: vec __0(bx, by)
79    line __0 . w
80    __1: vec .(index*(ax-bx), index*(ay-by))
81    line __2 . w
82}
83
84package "QFN$pins"
85unit mm
86
87table
88    { pins, X1, Y1, E, C1, C2, D2, E2 }
89    { 28, 0.25mm, 0.9mm, 0.5mm, 4.8mm, 4.8mm, 3.15mm, 3.15mm }
90    { 32, 0.29mm, 0.9mm, 0.5mm, 5.1mm, 5.1mm, 3.3mm, 3.3mm }
91
92set X2 = X1+(pins/4-1)*E
93
94set Y2 = X2
95
96set w = 5mil
97
98__0: vec @(D2/2, E2/2)
99frame pads @
100frame center @
101frame outline @
102

Archive Download this file



interactive