Index: read.c =================================================================== --- read.c (revision 36979) +++ read.c (revision 36980) @@ -1155,8 +1155,8 @@ } if (box != NULL) { - Ptr->hidlib.size_x = box->X2; - Ptr->hidlib.size_y = box->Y2; + Ptr->hidlib.dwg.X2 = box->X2; + Ptr->hidlib.dwg.Y2 = box->Y2; } else rnd_message(RND_MSG_ERROR, "Can not determine board extents - empty board?\n"); Index: write.c =================================================================== --- write.c (revision 36979) +++ write.c (revision 36980) @@ -221,7 +221,7 @@ TODO("add checks for thermals: only gnd/pwr can have them, warn for others") rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %d %.0ml 1 %d\r\n", - x+dx, PCB->hidlib.size_y - (y+dy), w, h, + x+dx, PCB->hidlib.dwg.Y2 - (y+dy), w, h, ashape, drill_dia, alayer); fputs(name, ctx->f); @@ -247,7 +247,7 @@ static int wrax_line(wctx_t *ctx, pcb_line_t *line, rnd_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) { int user_routed = 1; - rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", line->Point1.X+dx, PCB->hidlib.size_y - (line->Point1.Y+dy), line->Point2.X+dx, PCB->hidlib.size_y - (line->Point2.Y+dy), line->Thickness, layer, user_routed); + rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", line->Point1.X+dx, PCB->hidlib.dwg.Y2 - (line->Point1.Y+dy), line->Point2.X+dx, PCB->hidlib.dwg.Y2 - (line->Point2.Y+dy), line->Thickness, layer, user_routed); return 0; } @@ -255,7 +255,7 @@ static int wrax_pline_segment(wctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t Thickness, rnd_cardinal_t layer) { int user_routed = 1; - rnd_fprintf(ctx->f, "FT\r\n%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", x1, PCB->hidlib.size_y - y1, x2, PCB->hidlib.size_y - y2, Thickness, layer, user_routed); + rnd_fprintf(ctx->f, "FT\r\n%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", x1, PCB->hidlib.dwg.Y2 - y1, x2, PCB->hidlib.dwg.Y2 - y2, Thickness, layer, user_routed); return 0; } @@ -340,7 +340,7 @@ else { radius = arc->Width; } - rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %d %.0ml %d\r\n", arc->X+dx, PCB->hidlib.size_y - (arc->Y+dy), radius, pcb_rnd_arc_to_autotrax_segments(arc->StartAngle, arc->Delta), arc->Thickness, current_layer); + rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %d %.0ml %d\r\n", arc->X+dx, PCB->hidlib.dwg.Y2 - (arc->Y+dy), radius, pcb_rnd_arc_to_autotrax_segments(arc->StartAngle, arc->Delta), arc->Thickness, current_layer); return 0; } @@ -479,7 +479,7 @@ else if (direction == 0) /*normal text */ rotation = 0; - rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %d %.0ml %d\r\n", text->X+dx, PCB->hidlib.size_y - (text->Y+dy), textHeight, rotation + autotrax_mirrored, strokeThickness, current_layer); + rnd_fprintf(ctx->f, "%.0ml %.0ml %.0ml %d %.0ml %d\r\n", text->X+dx, PCB->hidlib.dwg.Y2 - (text->Y+dy), textHeight, rotation + autotrax_mirrored, strokeThickness, current_layer); for(index = 0; index < 32; index++) { if (text->TextString[index] == '\0') index = 32; @@ -516,7 +516,7 @@ TODO("rename these variables to something more expressive") TODO("instead of hardwiring coords, just read existing dyntex coords") xPos = (box->X1 + box->X2) / 2; - yPos = PCB->hidlib.size_y - (box->Y1 - text_offset); + yPos = PCB->hidlib.dwg.Y2 - (box->Y1 - text_offset); yPos2 = yPos - RND_MIL_TO_COORD(200); yPos3 = yPos2 - RND_MIL_TO_COORD(200); @@ -590,7 +590,7 @@ if (maxy < polygon->Points[i].Y) maxy = polygon->Points[i].Y; } - rnd_fprintf(ctx->f, "%cF\r\n%.0ml %.0ml %.0ml %.0ml %d\r\n", (in_subc ? 'C' : 'F'), minx+dx, PCB->hidlib.size_y - (miny+dy), maxx+dx, PCB->hidlib.size_y - (maxy+dy), current_layer); + rnd_fprintf(ctx->f, "%cF\r\n%.0ml %.0ml %.0ml %.0ml %d\r\n", (in_subc ? 'C' : 'F'), minx+dx, PCB->hidlib.dwg.Y2 - (miny+dy), maxx+dx, PCB->hidlib.dwg.Y2 - (maxy+dy), current_layer); local_flag |= 1; /* here we need to test for non rectangular polygons to flag imperfect export to easy/autotrax @@ -695,7 +695,7 @@ fputs("PCB FILE 4\r\n", FP); /*autotrax header */ /* we sort out if the layout dimensions exceed the autotrax maxima */ - if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > max_width_mil || RND_COORD_TO_MIL(PCB->hidlib.size_y) > max_height_mil) { + if (RND_COORD_TO_MIL(PCB->hidlib.dwg.X2) > max_width_mil || RND_COORD_TO_MIL(PCB->hidlib.dwg.Y2) > max_height_mil) { rnd_message(RND_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); return -1; }