Root/labsw/modules/dip.fpd

Source at commit 51106cf9b34d773e72aa00385c80a9abb76b28df created 5 years 9 months ago.
By Werner Almesberger, ircstat/ML: update for 11/2013
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 .
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 @
74

Archive Download this file

Branches:
master



interactive