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
30 # -------------------------------------------------------------------
31 # ThanX to Johan Andersson (johan@homemail.com), modified by Thomas Nau
32 # the definition of a plcc package for base code to make qfp package.
33 # modified for correct pad numbering by Holm Tiffe
35 # Code from plcc.inc modified by Thomas Olson to make this qfp.inc definition.
36 # Although in retrospec quad flat packs are more diverse than this algorithm will do.
37 # Many qfp are the same physical size but have more thus narrower pads.
42 # $5: additional border (will be ignored)
45 `define(`QUARTER', `eval($4 /4)')
46 define(`OFFSET', `eval((QUARTER +1) /2)')
47 define(`WIDTH', `eval((QUARTER-1) *25 +2*50)')
48 define(`CENTER', `eval(WIDTH / 2)')
49 define(`NUMPINS', `$4')
50 Element(0x00 "$1" "`$2'" "$3" 100 CENTER 0 100 0x00)
56 #define(`count', `eval(OFFSET+1)')
58 forloop(`i', 1, QUARTER,
59 `PAD(eval(X-65), Y, eval(X+5), Y, 15, count)' `define(`count', incr(count))'
60 `define(`Y', eval(Y+25))'
66 forloop(`i', 1, QUARTER,
67 `PAD(X, eval(Y+65), X, eval(Y-5), 15, count)' `define(`count', incr(count))'
68 `define(`X', eval(X+25))'
73 define(`Y', eval(WIDTH-50))
74 forloop(`i', 1, QUARTER,
75 `PAD(eval(X+65), Y, eval(X-5), Y, 15, count)' `define(`count', incr(count))'
76 `define(`Y', eval(Y-25))'
80 define(`X', eval(WIDTH-50))
82 forloop(`i', 1, QUARTER,
83 `PAD(X, eval(Y-65), X, eval(Y+5), 15, count)' `define(`count', incr(count))'
84 `ifelse(eval(count > NUMPINS), 1, `define(`count', 1)')'
85 `define(`X', eval(X-25))'
88 ElementLine(28 0 WIDTH 0 10)
89 ElementLine(WIDTH 0 WIDTH WIDTH 10)
90 ElementLine(WIDTH WIDTH 0 WIDTH 10)
91 ElementLine(0 WIDTH 0 28 10)
92 ElementLine(0 28 28 0 10)
94 ElementArc(80 80 20 20 0 360 10)
99 # -------------------------------------------------------------------