EAGLE Help

UL_SMD


Data members

angle real (0.0...359.9)
dx[layer], dy[layer] int (size)
flags int (SMD_FLAG_...)
layer int (see note)
name string (SMD_NAME_LENGTH)
roundness int (see note)
signal string
x, y int (center point, see note)

Constants

SMD_FLAG_STOP generate stop mask
SMD_FLAG_THERMALS generate thermals
SMD_FLAG_CREAM generate cream mask

SMD_NAME_LENGTH max. recommended length of an smd name (same as CONTACT_NAME_LENGTH)

See also UL_PACKAGE, UL_CONTACT, UL_PAD

Note

The parameters of the smd depend on the context in which it is accessed:

If the dx and dy data members are called with an optional layer index, the data for that layer is returned according to the Design Rules. Valid layers 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.

angle defines how many degrees the smd is rotated counterclockwise around its center.

The value returned by flags must be masked with the SMD_FLAG_... constants to determine the individual flag settings, as in

if (smd.flags & PAD_FLAG_STOP) {
   ...
   }
Note that if your ULP just wants to draw the objects, you don't need to check these flags explicitly. The dx[] and dy[] members will return the proper data; for instance, if SMD_FLAG_STOP is set, dx[LAYER_TSTOP] will return 0, which should result in nothing being drawn in that layer. The flags member is mainly for ULPs that want to create script files that create library objects.

Example

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);
      }
    }
  }

Index Copyright © 2005 CadSoft Computer GmbH