EAGLE Help

UL_PAD


Data members

diameter[layer] int
drill int
name string (PAD_NAME_LENGTH)
shape[layer] int (PAD_SHAPE_...)
signal string
x, y int (center point, see note)

Constants

PAD_SHAPE_SQUARE square
PAD_SHAPE_ROUND round
PAD_SHAPE_OCTAGON octagon
PAD_SHAPE_XLONGOCT xlongoct
PAD_SHAPE_YLONGOCT ylongoct

PAD_NAME_LENGTH max. recommended length of a pad name (same as CONTACT_NAME_LENGTH)

See also UL_PACKAGE, UL_CONTACT, UL_SMD

Note

The coordinates (x, y) of the pad depend on the context in which it is called:

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 Design Rules. If one of the layers 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.

Example


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

Index Copyright © 2002 CadSoft Computer GmbH