Date:2012-05-22 05:34:50 (8 years 2 months ago)
Author:Adam Wang
Commit:9c6b38d1ae427cdb8dff7d22982a897c10ba65ff
Message:dip.fpd, dip4of6.fpd: copied both from /labsw/modules

Files: modules/dip.fpd (1 diff)
modules/dip4of6.fpd (1 diff)

Change Details

modules/dip.fpd
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 @
modules/dip4of6.fpd
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 @

Archive Download the corresponding diff file

Branches:
master



interactive