Root/modules/dip.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 pin {
4    __0: vec @(hole/2, hole/2)
5    __1: vec @(-hole/2, -hole/2)
6    hole . __0
7    __2: vec @(-ratio*hole/2, ratio*hole/2)
8    __3: vec @(ratio*hole/2, -ratio*hole/2)
9    rpad "$n" __2 . bare
10}
11
12frame pin_top {
13    set n = N-i
14
15    frame pin @
16}
17
18frame pin_bottom {
19    set n = i+1
20
21    frame pin @
22}
23
24frame pins {
25    loop i = 0, side-1
26
27    __0: vec @(pitch*(i-(side-1)/2), 0mm)
28    __1: vec .(0mm, width/2)
29    frame pin_top .
30    __2: vec __0(0mm, -width/2)
31    frame pin_bottom .
32}
33
34frame marker {
35    set r = (side*pitch-x)/2-w
36
37    set clear = 0.3mm
38
39    __0: vec @(-x/2-r-clear, -y/2+r)
40    __1: vec .(0mm, r)
41    circ __0 . w
42}
43
44frame outline {
45    set x = (side-1)*pitch+ratio*hole
46
47    set y = width-pitch
48
49    set w = 5mil
50
51    __0: vec @(x/2, y/2)
52    __1: vec @(-x/2, -y/2)
53    rect . __0 w
54    frame marker @
55}
56
57package "DIP-$N-${width}"
58unit mm
59
60set N = 2*side
61
62set width = 300mil
63
64set hole = 0.8mm
65
66set ratio = 2
67
68set pitch = 100mil
69
70loop side = 2, 20
71
72frame outline @
73frame pins @
74measx pin.__1 -> pin.__0 -1mm
75measx pin.__2 -> pin.__3 -3mm
76measy pins.__2 -> pins.__1 3mm
77measy outline.__1 >> outline.__0 -(side-1)*pitch-3mm
78measx outline.__1 >> outline.__0 -4.5mm
79measx pins.__2 -> pins.__2 2mm
80

Archive Download this file

Branches:
master



interactive