5 # PCB, interactive printed circuit board design
6 # Copyright (C) 2003, 2005 Dan McMahill
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 # Bourns Specific Footprints
27 # Surface mount trim pots, such as the 3224 series.
32 # $4: pin 1,3 width (1/100 mm) width is in the direction parallel to the
33 # $5: pin 1,3 length (1/100 mm) line which intersects pins 1 and 3
34 # $6: pin 2 width (1/100 mm)
35 # $7: pin 2 length (1/100 mm)
36 # $8: spacing from pad center to pad center between 2 and 1,3 (1/100 mm)
37 # $9: spacing from pad center to pad center between 1 and 3 (1/100 mm)
38 # $10: package width (1/100 mm)
40 define(`PKG_BOURNS_GENERIC_POT',
42 # pin 1,3 width, length (1/100 mm)
46 # pin 2 width, length (1/100 mm)
50 # spacing from pad center to pad center between 2 and 1,3 (1/100 mm)
52 # spacing from pad center to pad center between 1 and 3 (1/100 mm)
55 # package width (1/100 mm)
56 define(`WIDTH', `$10')
58 # silkscreen width (mils)
61 # how much space to leave around the part before the
64 # lower right corner for silk screen (mil)
65 ifelse(eval(L2 > L13), 1
66 define(`SILKX', `eval((S12+L2)*50/254 + SILKS + SILKW/2)'),
67 define(`SILKX', `eval((S12+L13)*50/254 + SILKS + SILKW/2)')
69 define(`SILKY', `eval((WIDTH/2)*100/254 + SILKS + SILKW/2)')
71 # refdes text size (mil)
72 define(`TEXTSIZE', 100)
73 # x,y coordinates for refdes label (mil)
74 define(`TEXTX', -SILKX)
75 define(`TEXTY', `eval(-SILKY - 10 - TEXTSIZE/2)')
77 Element(0x00 "$1" "`$2'" "$3" TEXTX TEXTY 0 TEXTSIZE 0x00)
81 ifelse(0, eval(W13>L13),
82 # Pads which have the perpendicular pad dimension less
83 # than or equal to the parallel pad dimension
84 Pad(eval( (S12 - L13 + W13)*50/254) eval( S13*50/254)
85 eval( (S12 + L13 - W13)*50/254) eval( S13*50/254) eval(W13*100/254) "1" 0x100)
87 # Pads which have the perpendicular pad dimension greater
88 # than or equal to the parallel pad dimension
89 Pad(eval( (S12 + L13)*50/254) eval((-S13 - W13 + L13)*50/254)
90 eval( (S12 + L13)*50/254) eval((-S13 + W13 - L13)*50/254) eval(L13*100/254) "1" 0x100)
94 ifelse(0, eval(W2>L2),
95 # Pads which have the perpendicular pad dimension less
96 # than or equal to the parallel pad dimension
97 Pad(eval( (-S12 - L2 + W2)*50/254) 0
98 eval( (-S12 + L2 - W2)*50/254) 0 eval(W2*100/254) "2" 0x100)
100 # Pads which have the Y (width) pad dimension greater
101 # than or equal to the X (length) pad dimension
102 Pad(eval( -S12*50/254) eval((- W2 + L2)*50/254)
103 eval( -S12*50/254) eval(( W2 - L2)*50/254) eval(L2*100/254) "2" 0x100)
107 ifelse(0, eval(W13>L13),
108 # Pads which have the perpendicular pad dimension less
109 # than or equal to the parallel pad dimension
110 Pad(eval( (S12 - L13 + W13)*50/254) eval(-S13*50/254)
111 eval( (S12 + L13 - W13)*50/254) eval(-S13*50/254) eval(W13*100/254) "3" 0x100)
113 # Pads which have the perpendicular pad dimension greater
114 # than or equal to the parallel pad dimension
115 Pad(eval( (S12 + L13)*50/254) eval((-S13 - W13 + L13)*50/254)
116 eval( (S12 + L13)*50/254) eval((-S13 + W13 - L13)*50/254) eval(L13*100/254) "3" 0x100)
119 # Silk screen around package
120 ElementLine( SILKX SILKY SILKX -SILKY SILKW)
121 ElementLine( SILKX -SILKY -SILKX -SILKY SILKW)
122 ElementLine(-SILKX -SILKY -SILKX SILKY SILKW)
123 ElementLine(-SILKX SILKY SILKX SILKY SILKW)
125 # Mark at the center of the part
129 # -------------------------------------------------------------------
135 ## Bourns 3224 Series SMT Trim Pot
138 define(`PKG_BOURNS_3224G', `PKG_BOURNS_GENERIC_POT(`$1',`$2',`$3',
139 `127', `127', `200', `127', `520', `230', `480')')
140 define(`PKG_BOURNS_3224J', `PKG_BOURNS_GENERIC_POT(`$1',`$2',`$3',
141 `130', `200', `200', `200', `400', `230', `480')')
142 define(`PKG_BOURNS_3224W', `PKG_BOURNS_GENERIC_POT(`$1',`$2',`$3',
143 `130', `160', `200', `160', `290', `254', `480')')
144 define(`PKG_BOURNS_3224X', `PKG_BOURNS_GENERIC_POT(`$1',`$2',`$3',
145 `132', `190', `200', `190', `510', `254', `480')')