Add ghid_route_style_selector_empty to GHidRouteStyleSelector
[geda-pcb/whiteaudio.git] / lib / qfp2.inc
blob04f6aa2a12c742df5c5707285bba4ac4bddb5f17
2 #                             COPYRIGHT
3
4 #   PCB, interactive printed circuit board design
5 #   Copyright (C) 1994,1995,1996 Thomas Nau
6
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.
11
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.
16
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.
20
21 #   Contact addresses for paper mail and Email:
22 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 #   Thomas.Nau@rz.uni-ulm.de
24
25 #   RCS: $Id$
27 #  QFP packages
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. 
38 # $1: canonical name
39 # $2: name on PCB
40 # $3: value
41 # $4: number of pins
42 # $5: additional border (will be ignored)
44 define(`PKG_QFP2',
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)
53         # left row
54 define(`X', 0)
55 define(`Y', 50)
56 #define(`count', `eval(OFFSET+1)')
57 define(`count', 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))'
61         )
63         # bottom row
64 define(`X', 50)
65 define(`Y', WIDTH)
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))'
71         # right row
72 define(`X', WIDTH)
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))'
79         # top row
80 define(`X', eval(WIDTH-50))
81 define(`Y', 0)
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)
96         Mark(0 0)
97 )')
99 # -------------------------------------------------------------------