File: 182.htm

package info (click to toggle)
eagle 4.16-5
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 36,508 kB
  • sloc: sh: 82; makefile: 32
file content (115 lines) | stat: -rw-r--r-- 6,632 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<html>
<head>
<title>EAGLE Help: UL_PAD</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>UL_PAD</center></h1>
<hr>
<b>Data members</b>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>angle</tt>        </font></td><td valign=top><font face=Helvetica,Arial><a href=157.htm>real</a> (<tt>0.0</tt>...<tt>359.9</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>diameter[layer]</tt>        </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a></font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>drill</tt>        </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a></font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>drillsymbol</tt>  </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a></font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>elongation</tt>   </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a></font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>flags</tt>        </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (<tt>PAD_FLAG_...</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>name</tt>         </font></td><td valign=top><font face=Helvetica,Arial><a href=158.htm>string</a> (<tt>PAD_NAME_LENGTH</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>shape[layer]</tt> </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (<tt>PAD_SHAPE_...</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>signal</tt>       </font></td><td valign=top><font face=Helvetica,Arial><a href=158.htm>string</a></font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>x, y</tt>         </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (center point, see note)</font></td></tr>
</table>
<p>
<b>Constants</b>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_FLAG_STOP</tt>   </font></td><td valign=top><font face=Helvetica,Arial>generate stop mask</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_FLAG_THERMALS</tt>         </font></td><td valign=top><font face=Helvetica,Arial>generate thermals</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_FLAG_FIRST</tt>            </font></td><td valign=top><font face=Helvetica,Arial>use special "first pad" shape</font></td></tr>
</table>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_SQUARE</tt>   </font></td><td valign=top><font face=Helvetica,Arial>square</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_ROUND</tt>    </font></td><td valign=top><font face=Helvetica,Arial>round</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_OCTAGON</tt>  </font></td><td valign=top><font face=Helvetica,Arial>octagon</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_LONG</tt>     </font></td><td valign=top><font face=Helvetica,Arial>long</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_OFFSET</tt>   </font></td><td valign=top><font face=Helvetica,Arial>offset</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_ANNULUS</tt> </font></td><td valign=top><font face=Helvetica,Arial>annulus (only if supply layers are used)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_SHAPE_THERMAL</tt> </font></td><td valign=top><font face=Helvetica,Arial>thermal (only if supply layers are used)</font></td></tr>
</table>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>PAD_NAME_LENGTH</tt>   </font></td><td valign=top><font face=Helvetica,Arial>max. recommended length of a pad name (same as <tt>CONTACT_NAME_LENGTH</tt>)</font></td></tr>
</table>
<p>
<b>See also</b> <a href=181.htm>UL_PACKAGE</a>,
<a href=168.htm>UL_CONTACT</a>,
<a href=192.htm>UL_SMD</a>
<p>
<b>Note</b>
<p>
The parameters of the pad depend on the context in which it is accessed:
<ul>
<li>if the pad is derived from a UL_LIBRARY context, the coordinates (<tt>x, y</tt>) and <tt>angle</tt> will be the same as
defined in the package drawing
<li>in all other cases, they will have the actual values from the board
</ul>
<p>
The diameter and shape of the pad depend on the layer for which they shall be retrieved,
because they may be different in each layer depending on the <a href=127.htm>Design Rules</a>.
If one of the <a href=178.htm>layers</a> LAYER_TOP...LAYER_BOTTOM, LAYER_TSTOP or LAYER_BSTOP
is given as the index to the diameter or shape data member, the resulting value will be calculated
according to the Design Rules. If LAYER_PADS is given, the raw value as defined in the library will
be returned.
<p>
<tt>drillsymbol</tt> returns the number of the drill symbol that has been assigned
to this drill diameter (see the manual for a list of defined drill symbols).
A value of <tt>0</tt> means that no symbol has been assigned to this drill diameter.
<p>
<tt>angle</tt> defines how many degrees the pad is rotated counterclockwise
around its center.
<p>
<tt>elongation</tt> is only valid for shapes PAD_SHAPE_LONG and PAD_SHAPE_OFFSET and
defines how many percent the long side of such a pad is longer than its small side.
This member returns 0 for any other pad shapes.
<p>
The value returned by <tt>flags</tt> must be masked with the <tt>PAD_FLAG_...</tt>
constants to determine the individual flag settings, as in
<pre>
if (pad.flags &amp; PAD_FLAG_STOP) {
   ...
   }
</pre>
Note that if your ULP just wants to draw the objects, you don't need to check these
flags explicitly. The <tt>diameter[]</tt> and <tt>shape[]</tt> members will return
the proper data; for instance, if <tt>PAD_FLAG_STOP</tt> is set, <tt>diameter[LAYER_TSTOP]</tt>
will return <tt>0</tt>, which should result in nothing being drawn in that layer.
The <tt>flags</tt> member is mainly for ULPs that want to create script files that
create library objects.
<p>
<b>Example</b>
<pre>
library(L) {
  L.packages(PAC) {
    PAC.contacts(C) {
      if (C.pad)
         printf("Pad: '%s', (%d %d), d=%d\n",
                 C.name, C.pad.x, C.pad.y, C.pad.diameter[LAYER_BOTTOM]);
      }
    }
  }
</pre>

<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright &copy; 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>