Index: read.c =================================================================== --- read.c (revision 36979) +++ read.c (revision 36980) @@ -506,8 +506,8 @@ if ((ctx->bbox.X1 < 0) || (ctx->bbox.Y1 < 0)) rnd_message(RND_MSG_WARNING, "Negative coordinates on input - you may want to execute autocrop()\n"); - ctx->pcb->hidlib.size_x = ctx->bbox.X2 - ctx->bbox.X1; - ctx->pcb->hidlib.size_y = ctx->bbox.Y2 - ctx->bbox.Y1; + ctx->pcb->hidlib.dwg.X2 = ctx->bbox.X2 - ctx->bbox.X1; + ctx->pcb->hidlib.dwg.Y2 = ctx->bbox.Y2 - ctx->bbox.Y1; if (!ctx->has_pcb_boundary) { ctx->bbox.X1 = ctx->bbox.Y1 = ctx->bbox.X2 = ctx->bbox.Y2 = 0; @@ -1600,7 +1600,7 @@ if (mirror_first) { if (need_mirror) - pcb_subc_change_side(nsc, crd[1] * 2 - PCB->hidlib.size_y); + pcb_subc_change_side(nsc, crd[1] * 2 - PCB->hidlib.dwg.Y2); if (rot != 0.0) pcb_subc_rotate(nsc, crd[0], crd[1], cos(rot / RND_RAD_TO_DEG), sin(rot / RND_RAD_TO_DEG), rot); } @@ -1608,7 +1608,7 @@ if (rot != 0.0) pcb_subc_rotate(nsc, crd[0], crd[1], cos(rot / RND_RAD_TO_DEG), sin(rot / RND_RAD_TO_DEG), rot); if (need_mirror) - pcb_subc_change_side(nsc, crd[1] * 2 - PCB->hidlib.size_y); + pcb_subc_change_side(nsc, crd[1] * 2 - PCB->hidlib.dwg.Y2); } } Index: ses.c =================================================================== --- ses.c (revision 36979) +++ ses.c (revision 36980) @@ -133,8 +133,8 @@ return; (*nlines)++; if (pn > 0) { - /*pcb_line_t *line = */pcb_line_new_merge(layer, lx, PCB->hidlib.size_y - ly, - x, PCB->hidlib.size_y - y, thick, clear, pcb_flag_make(PCB_FLAG_AUTO | PCB_FLAG_CLEARLINE)); + /*pcb_line_t *line = */pcb_line_new_merge(layer, lx, PCB->hidlib.dwg.Y2 - ly, + x, PCB->hidlib.dwg.Y2 - y, thick, clear, pcb_flag_make(PCB_FLAG_AUTO | PCB_FLAG_CLEARLINE)); /* pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_LINE, layer, line);*/ /* rnd_printf("LINE: %$mm %$mm .. %$mm %$mm\n", lx, ly, x, y);*/ } @@ -199,9 +199,9 @@ } { - pcb_pstk_t *ps = pcb_pstk_new(PCB->Data, -1, l1, x, PCB->hidlib.size_y - y, clear, pcb_flag_make(PCB_FLAG_CLEARLINE | PCB_FLAG_AUTO)); + pcb_pstk_t *ps = pcb_pstk_new(PCB->Data, -1, l1, x, PCB->hidlib.dwg.Y2 - y, clear, pcb_flag_make(PCB_FLAG_CLEARLINE | PCB_FLAG_AUTO)); if (ps == NULL) - rnd_message(RND_MSG_ERROR, "import_ses: failed to create via at %$mm;%$mm with prototype %ld\n", x, PCB->hidlib.size_y - y, l1); + rnd_message(RND_MSG_ERROR, "import_ses: failed to create via at %$mm;%$mm with prototype %ld\n", x, PCB->hidlib.dwg.Y2 - y, l1); } } Index: write.c =================================================================== --- write.c (revision 36979) +++ write.c (revision 36980) @@ -94,7 +94,7 @@ /* Board coords */ #define COORD(c) (c) #define COORDX(x) (x) -#define COORDY(y) (PCB->hidlib.size_y - (y)) +#define COORDY(y) (PCB->hidlib.dwg.Y2 - (y)) /* local coords (subc or padstack context) */ #define LCOORD(c) (c) @@ -141,7 +141,7 @@ { pcb_poly_t *bp; - rnd_fprintf(wctx->f, " (boundary (rect pcb %[4] %[4] %[4] %[4]))\n", 0, 0, PCB->hidlib.size_x, PCB->hidlib.size_y); + rnd_fprintf(wctx->f, " (boundary (rect pcb %[4] %[4] %[4] %[4]))\n", PCB->hidlib.dwg.X1, PCB->hidlib.dwg.Y1, PCB->hidlib.dwg.X2, PCB->hidlib.dwg.Y2); bp = pcb_topoly_1st_outline(wctx->pcb, PCB_TOPOLY_KEEP_ORIG | PCB_TOPOLY_FLOATING); if (bp != NULL) {