Root/modules/dip4of6.fpd

Source at commit 5ed16708597ccf77aca40505ca75716a6518b49e created 7 years 4 months ago.
By Werner Almesberger, modules/: add measurementes to DIP-4/6-300mil; add to catalog and Makefile
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    __2: vec @(-ratio*hole/2, ratio*hole/2)
11    __3: vec @(ratio*hole/2, -ratio*hole/2)
12    rpad "$n" __2 .
13    frame hole @
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
75
76set M = 2*side
77
78set width = 300mil
79
80set hole = 0.8mm
81
82set ratio = 2
83
84set pitch = 100mil
85
86set side = 3
87
88set populated = 2
89
90frame outline @
91frame pins @
92frame holes @
93measx hole.__1 -> hole.__0 -1mm
94measx pin.__2 -> pin.__3 -3mm
95measx outline.__1 >> outline.__0 -4mm
96measy outline.__0 >> outline.__1 1mm
97measy holes.__1 >> holes.__2 3mm
98measx pins.__2 >> pins.__2 2mm
99

Archive Download this file

Branches:
master



interactive