File: 192.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 (92 lines) | stat: -rw-r--r-- 4,591 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
<html>
<head>
<title>EAGLE Help: UL_SMD</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>UL_SMD</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>dx[layer], dy[layer]</tt>   </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (size)</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>SMD_FLAG_...</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>layer</tt>        </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (see note)</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>SMD_NAME_LENGTH</tt>)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>roundness</tt>    </font></td><td valign=top><font face=Helvetica,Arial><a href=156.htm>int</a> (see note)</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>SMD_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>SMD_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>SMD_FLAG_CREAM</tt>            </font></td><td valign=top><font face=Helvetica,Arial>generate cream mask</font></td></tr>
</table>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>SMD_NAME_LENGTH</tt>   </font></td><td valign=top><font face=Helvetica,Arial>max. recommended length of an smd 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=182.htm>UL_PAD</a>
<p>
<b>Note</b>
<p>
The parameters of the smd depend on the context in which it is accessed:
<ul>
<li>if the smd is derived from a UL_LIBRARY context, the coordinates (<tt>x, y</tt>), <tt>angle</tt>, <tt>layer</tt> and <tt>roundness</tt> of the smd 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>
If the <tt>dx</tt> and <tt>dy</tt> data members are called with an optional layer index,
the data for that layer is returned according to the <a href=127.htm>Design Rules</a>.
Valid <a href=178.htm>layers</a> are LAYER_TOP, LAYER_TSTOP and LAYER_TCREAM for a via in the Top layer, and
LAYER_BOTTOM, LAYER_BSTOP and LAYER_BCREAM for a via in the Bottom layer, respectively.
<p>
<tt>angle</tt> defines how many degrees the smd is rotated counterclockwise
around its center.
<p>
The value returned by <tt>flags</tt> must be masked with the <tt>SMD_FLAG_...</tt>
constants to determine the individual flag settings, as in
<pre>
if (smd.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>dx[]</tt> and <tt>dy[]</tt> members will return
the proper data; for instance, if <tt>SMD_FLAG_STOP</tt> is set, <tt>dx[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.smd)
         printf("Smd: '%s', (%d %d), dx=%d, dy=%d\n",
                 C.name, C.smd.x, C.smd.y, C.smd.dx, C.smd.dy);
      }
    }
  }
</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>