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
29 # -------------------------------------------------------------------
30 # the definition of a dual-inline package N and similar types
35 # $5: package size (300, 600, 900 + 100 for socket space)
42 # retain backwards compatibility to older versions of PKG_DIL
43 # which did not have $6,$7,$8 args
46 `define(`PINSPACE', `100')'
48 `define(`PINSPACE', eval(`$6'))'
51 `define(`PADSIZE', `60')'
53 `define(`PADSIZE', `$7')'
56 `define(`DRILLSIZE', `28')'
58 `define(`DRILLSIZE', `$8')'
60 define(`MAXY', `eval(`$4' / 2 * PINSPACE)')
61 define(`MAXX', `eval(`$5' + 100)')
62 define(`CENTERX', `eval(MAXX / 2)')
63 define(`MARKY', `eval(PINSPACE / 2)')
64 Element(0x00 "$1" "`$2'" "$3" eval(CENTERX + 20) 100 3 100 0x00)
66 forloop(`i', 1, eval($4 / 2),
67 `PIN(50, eval((2*i-1) * PINSPACE/2),
68 eval(PADSIZE), eval(DRILLSIZE), i)
70 forloop(`i', 1, eval($4 / 2),
71 `PIN(eval(MAXX -50), eval(MAXY - (2*i-1) * PINSPACE/2),
72 eval(PADSIZE), eval(DRILLSIZE), eval(i + $4/2))
74 ElementLine(0 0 0 MAXY 10)
75 ElementLine(0 MAXY MAXX MAXY 10)
76 ElementLine(MAXX MAXY MAXX 0 10)
77 ElementLine(0 0 eval(CENTERX - 50) 0 10)
78 ElementLine(eval(CENTERX + 50) 0 MAXX 0 10)
79 ElementArc(CENTERX 0 50 50 0 180 10)
82 define(`PKG_J', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
83 define(`PKG_JD', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
84 define(`PKG_JG', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
85 define(`PKG_N', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
86 define(`PKG_NT', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
87 define(`PKG_P', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 100, 60, 28)')
89 define(`PKG_NS', `PKG_DIL(`$1', `$2', `$3', `$4', `$5', 70, 55, 28)')
91 # -------------------------------------------------------------------
92 # the definition of a dual-inline package D and DW
93 # never used by circuits, just a short-cut for others
94 # width D==244, DW==419
101 define(`COMMON_D_DW',
102 `define(`MAXY', `eval(`$4' / 2 * 50)')
105 define(`XHIGH', `eval(MAXX - 50)')
106 define(`CENTERX', `eval(MAXX / 2)')
107 Element(0x00 "$1" "`$2'" "$3" eval(CENTERX + 20) 50 3 100 0x00)
109 forloop(`i', 1, eval($4 / 2),
110 `PAD(0, eval(i * 50 -25), XLOW, eval(i * 50 -25), 20, i)
112 forloop(`i', 1, eval($4 / 2),
113 `PAD(XHIGH, eval(MAXY - i * 50 +25), MAXX, eval(MAXY - i * 50 +25), 20, eval(i + $4/2))
115 ElementLine(XLOW 0 XLOW MAXY 10)
116 ElementLine(XLOW MAXY XHIGH MAXY 10)
117 ElementLine(XHIGH MAXY XHIGH 0 10)
118 ElementLine(XLOW 0 eval(CENTERX - 25) 0 10)
119 ElementLine(eval(CENTERX + 25) 0 XHIGH 0 10)
120 ElementArc(CENTERX 0 25 25 0 180 10)
124 define(`PKG_D', `COMMON_D_DW(`$1', `$2', `$3', `$4', 244)')
125 define(`PKG_DW', `COMMON_D_DW(`$1', `$2', `$3', `$4', 419)')