4 # PCB, interactive printed circuit board design
5 # Copyright (C) 1994,1995,1996 Thomas Nau
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 # Contact addresses for paper mail and Email:
22 # Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 # Thomas.Nau@rz.uni-ulm.de
28 # -------------------------------------------------------------------
29 # the definition of a dual-inline package N and similar types
34 # $5: package size (300, 600, 900 + 100 for socket space)
41 # retain backwards compatibility to older versions of PKG_DIL
42 # which did not have $6,$7,$8 args
45 `define(`PINSPACE', `100')'
47 `define(`PINSPACE', eval(`$6'))'
50 `define(`PADSIZE', `60')'
52 `define(`PADSIZE', `$7')'
55 `define(`DRILLSIZE', `28')'
57 `define(`DRILLSIZE', `$8')'
59 define(`MAXY', `eval(`$4' / 2 * PINSPACE)')
60 define(`MAXX', `eval(`$5' + 100)')
61 define(`CENTERX', `eval(MAXX / 2)')
62 define(`MARKY', `eval(PINSPACE / 2)')
63 Element(0x00 "$1" "`$2'" "$3" eval(CENTERX + 20) 100 3 100 0x00)
65 forloop(`i', 1, eval($4 / 2),
66 `PIN(50, eval((2*i-1) * PINSPACE/2),
67 eval(PADSIZE), eval(DRILLSIZE), i)
69 forloop(`i', 1, eval($4 / 2),
70 `PIN(eval(MAXX -50), eval(MAXY - (2*i-1) * PINSPACE/2),
71 eval(PADSIZE), eval(DRILLSIZE), eval(i + $4/2))
73 ElementLine(0 0 0 MAXY 10)
74 ElementLine(0 MAXY MAXX MAXY 10)
75 ElementLine(MAXX MAXY MAXX 0 10)
76 ElementLine(0 0 eval(CENTERX - 50) 0 10)
77 ElementLine(eval(CENTERX + 50) 0 MAXX 0 10)
78 ElementArc(CENTERX 0 50 50 0 180 10)
81 define(`PKG_J', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
82 define(`PKG_JD', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
83 define(`PKG_JG', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
84 define(`PKG_N', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
85 define(`PKG_NT', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
86 define(`PKG_P', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
88 define(`PKG_NS', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 70, 55, 28)')
90 # -------------------------------------------------------------------
91 # the definition of a dual-inline package D and DW
92 # never used by circuits, just a short-cut for others
93 # width D==244, DW==419
100 define(`COMMON_D_DW',
101 `define(`MAXY', `eval(`$4' / 2 * 50)')
104 define(`XHIGH', `eval(MAXX - 50)')
105 define(`CENTERX', `eval(MAXX / 2)')
106 Element(0x00 "$1" "`$2'" "$3" eval(CENTERX + 20) 50 3 100 0x00)
108 forloop(`i', 1, eval($4 / 2),
109 `PAD(0, eval(i * 50 -25), XLOW, eval(i * 50 -25), 20, i)
111 forloop(`i', 1, eval($4 / 2),
112 `PAD(XHIGH, eval(MAXY - i * 50 +25), MAXX, eval(MAXY - i * 50 +25), 20, eval(i + $4/2))
114 ElementLine(XLOW 0 XLOW MAXY 10)
115 ElementLine(XLOW MAXY XHIGH MAXY 10)
116 ElementLine(XHIGH MAXY XHIGH 0 10)
117 ElementLine(XLOW 0 eval(CENTERX - 25) 0 10)
118 ElementLine(eval(CENTERX + 25) 0 XHIGH 0 10)
119 ElementArc(CENTERX 0 25 25 0 180 10)
123 define(`PKG_D', `COMMON_D_DW(`$1', `$2', `$3', `$4', 244)')
124 define(`PKG_DW', `COMMON_D_DW(`$1', `$2', `$3', `$4', 419)')