Date:2012-06-19 05:19:37 (7 years 3 months ago)
Author:Adam Wang
Commit:f5392aef5b0656891dab511d6818c15bc4b75230
Message:generic header through hole type header.fpd: copied from Werner Almesberger - HDR-${C}x${R}-$P from http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/ma ster/labsw/modules/header.fpd

Files: modules/header.fpd (1 diff)

Change Details

modules/header.fpd
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
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/2-1mm
68measx pin.__3 -> pin.__1 (R-0.5)*P+1mm

Archive Download the corresponding diff file

Branches:
master



interactive