Index: read.c =================================================================== --- read.c (revision 28704) +++ read.c (revision 28705) @@ -898,8 +898,9 @@ pcb_pstk_t *ps; pcb_subc_t *subc = obj; const char *name, *srot; -TODO("{smdsides} do not ignore ln, need a new {smdrot} example too, on the bottom side") - eagle_layerid_t ln = eagle_get_attrl(st, subtree, "layer", -1); +TODO("{smdsides} rot example too, on the bottom side to check if rotation inverts") + eagle_layerid_t ln; + eagle_layer_t *ly; long roundness = 0; pcb_coord_t clr; int rot = 0, onbottom = 0; @@ -906,6 +907,15 @@ assert(type == IN_SUBC); + ln = eagle_get_attrl(st, subtree, "layer", -1); + if (ln != -1) { /* can't go by layer type because there's no layer stack yet (we are in lib) */ + if (ln == 16) onbottom = 1; + else if (ln== 1) onbottom = 0; + else pcb_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (invalid layer %d)\n", ln); + } + else + pcb_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); + name = eagle_get_attrs(st, subtree, "name", NULL); x = eagle_get_attrc(st, subtree, "x", 0); y = eagle_get_attrc(st, subtree, "y", 0);