Root/modules/pads.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 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 .
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
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    { "150x150", "C", 150mil, 150mil }
64    { "150x150", "S", 150mil, 150mil }
65
66set factor = 0.7
67
68set w = 5mil
69
70frame padC @
71frame padR @
72frame padS @
73measy padC.__1 >> padC.__0 y/2
74measy padS.__1 >> padS.__0 1mm
75measx padS.__2 >> padS.__3 1mm
76measx padC.__2 >> padC.__3 1mm
77measy padR.__1 >> padR.__0 1mm
78measx padR.__1 >> padR.__0 -1mm
79

Archive Download this file

Branches:
master



interactive