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

Archive Download this file

Branches:
master



interactive