Root/modules/header.fpd

Source at commit d37268a6ba7dd08f54960a03ca755dc943e3636c created 11 years 7 months ago.
By Werner Almesberger, modules/: add PAD_S_120x120; correct classification of PAD_S_150x150
1/* MACHINE-GENERATED ! */
2
3frame pin {
4    set n = col*R+row+1
5
6    __0: vec @(hole/2, hole/2)
7    __1: vec @(hole*ratio/2, -hole*ratio/2)
8    __2: vec @(-hole/2, -hole/2)
9    hole . __0
10    __3: vec @(-hole*ratio/2, hole*ratio/2)
11    rpad "$n" . __1 bare
12}
13
14frame pins {
15    loop row = 0, R-1
16
17    loop col = 0, C-1
18
19    __1: vec @(-P*(C-1)/2, -P*(R-1)/2)
20    __0: vec .(col*P, row*P)
21    frame pin .
22}
23
24frame marker {
25    set r = 0.3mm
26
27    set clear = 0.2mm
28
29    set width = 0.2mm
30
31    __0: vec @(-x/2-r-clear-width/2, -P*(R-1)/2)
32    __1: vec .(0mm, r)
33    circ __0 . width
34}
35
36frame outline {
37    set x = C*P
38
39    set y = R*P
40
41    __0: vec @(x/2, y/2)
42    __1: vec @(-x/2, -y/2)
43    rect . __0 width
44    frame marker @
45}
46
47package "HDR-${C}x${R}-$P"
48unit mm
49
50table
51    { R }
52    { 1 }
53    { 2 }
54
55table
56    { P, hole, ratio }
57    { 100mil, 0.65mm, 2.5 }
58    { 200mil, 1.1mm, 2.5 }
59
60set width = 5mil
61
62loop C = 1, 20
63
64frame pins @
65frame outline @
66measy outline.__1 >> outline.__0 1mm
67measx pin.__2 -> pin.__0 -(P-hole)/2-1mm
68measx pin.__3 -> pin.__1 -(P+ratio*hole)/2-1.5mm
69measx outline.__1 >> outline.__0 -2mm
70measx pins.__1 -> pins.__0 P/2+1mm
71

Archive Download this file

Branches:
master



interactive