Root/modules/pads.fpd

Source at commit d37268a6ba7dd08f54960a03ca755dc943e3636c created 6 years 11 months ago.
By Werner Almesberger, modules/: add PAD_S_120x120; correct classification of PAD_S_150x150
1/* MACHINE-GENERATED ! */
2
3frame padS {
4    set ?type = "S"
5
6    set x1 = x/2+2.5*w
7
8    set y1 = y/2+2.5*w
9
10    __0: vec @(x/2, y/2)
11    __1: vec @(-x/2, -y/2)
12    pad "1" __0 . bare
13    __2: vec @(-x1, y1)
14    __3: vec @(x1, -y1)
15    rect __2 . w
16}
17
18frame padR {
19    set ?type = "R"
20
21    set x1 = x/2+2*w
22
23    set y1 = y/2+2*w
24
25    __0: vec @(x/2, y/2)
26    __1: vec @(-x/2, -y/2)
27    rpad "1" . __0 bare
28    __2: vec @(-x1, y1)
29    __3: vec @(x1, -y1)
30    rect __2 . w
31}
32
33frame padC {
34    set ?type = "C"
35
36    set x1 = (x+w)/2
37
38    set y1 = (y+w)/2
39
40    __0: vec @(x/2, y/2)
41    __1: vec @(-x/2, -y/2)
42    rpad "1" . __0 bare
43    __2: vec @(-x1, y1)
44    circ @ . w
45    __3: vec @(x1, -y1)
46}
47
48package "PAD_${type}_$size"
49unit auto
50
51table
52    { size, type, x, y }
53    { "1mm", "C", 1mm, 1mm }
54    { 1mm, "S", 1mm, 1mm }
55    { "2mm", "R", 2mm, 0.5mm }
56    { "60x60", "C", 60mil, 60mil }
57    { "60x60", "S", 60mil, 60mil }
58    { "80x80", "C", 80mil, 80mil }
59    { "80x80", "S", 80mil, 80mil }
60    { "100x100", "C", 100mil, 100mil }
61    { "100x100", "S", 100mil, 100mil }
62    { "120x60", "R", 120mil, 60mil }
63    { "120x120", "S", 120mil, 120mil }
64    { "150x150", "C", 150mil, 150mil }
65    { "150x150", "S", 150mil, 150mil }
66
67set factor = 0.7
68
69set w = 5mil
70
71frame padC @
72frame padR @
73frame padS @
74measy padC.__1 >> padC.__0 y/2
75measy padS.__1 >> padS.__0 1mm
76measx padS.__2 >> padS.__3 1mm
77measx padC.__2 >> padC.__3 1mm
78measy padR.__1 >> padR.__0 1mm
79measx padR.__1 >> padR.__0 -1mm
80

Archive Download this file

Branches:
master



interactive