Index: autoroute.c =================================================================== --- autoroute.c (revision 24882) +++ autoroute.c (revision 24883) @@ -1169,8 +1169,8 @@ rd->max_keep = conf_core.design.clearance; /* create styles structures */ bbox.X1 = bbox.Y1 = 0; - bbox.X2 = PCB->MaxWidth; - bbox.Y2 = PCB->MaxHeight; + bbox.X2 = PCB->hidlib.size_x; + bbox.Y2 = PCB->hidlib.size_y; for (i = 0; i < rd->max_styles + 1; i++) { pcb_route_style_t *style = (i < rd->max_styles) ? &PCB->RouteStyle.array[i] : &rd->defaultstyle; rd->styles[i] = style; @@ -2083,8 +2083,8 @@ case PCB_ANY_DIR: ans.inflated.X1 = (e->rb->came_from == PCB_EAST ? ans.orig.X1 : 0); ans.inflated.Y1 = (e->rb->came_from == PCB_SOUTH ? ans.orig.Y1 : 0); - ans.inflated.X2 = (e->rb->came_from == PCB_WEST ? ans.orig.X2 : PCB->MaxWidth); - ans.inflated.Y2 = (e->rb->came_from == PCB_NORTH ? ans.orig.Y2 : PCB->MaxHeight); + ans.inflated.X2 = (e->rb->came_from == PCB_WEST ? ans.orig.X2 : PCB->hidlib.size_x); + ans.inflated.Y2 = (e->rb->came_from == PCB_NORTH ? ans.orig.Y2 : PCB->hidlib.size_y); if (e->rb->came_from == PCB_NORTH) ans.done = noshrink = _SOUTH; else if (e->rb->came_from == PCB_EAST) @@ -2108,7 +2108,7 @@ ans.done = _SOUTH + _WEST; noshrink = 0; ans.inflated.X1 = box->X1 - ans.bloat; - ans.inflated.X2 = PCB->MaxWidth; + ans.inflated.X2 = PCB->hidlib.size_x; ans.inflated.Y2 = box->Y2 + ans.bloat; ans.inflated.Y1 = 0; break; @@ -2118,14 +2118,14 @@ ans.inflated.Y1 = box->Y1 - ans.bloat; ans.inflated.Y2 = box->Y2 + ans.bloat; ans.inflated.X1 = box->X1; - ans.inflated.X2 = PCB->MaxWidth; + ans.inflated.X2 = PCB->hidlib.size_x; break; case PCB_SE: ans.done = _NORTH + _WEST; noshrink = 0; ans.inflated.X1 = box->X1 - ans.bloat; - ans.inflated.X2 = PCB->MaxWidth; - ans.inflated.Y2 = PCB->MaxHeight; + ans.inflated.X2 = PCB->hidlib.size_x; + ans.inflated.Y2 = PCB->hidlib.size_y; ans.inflated.Y1 = box->Y1 - ans.bloat; break; case PCB_SOUTH: @@ -2134,7 +2134,7 @@ ans.inflated.X1 = box->X1 - ans.bloat; ans.inflated.X2 = box->X2 + ans.bloat; ans.inflated.Y1 = box->Y1; - ans.inflated.Y2 = PCB->MaxHeight; + ans.inflated.Y2 = PCB->hidlib.size_y; break; case PCB_SW: ans.done = _NORTH + _EAST; @@ -2141,7 +2141,7 @@ noshrink = 0; ans.inflated.X1 = 0; ans.inflated.X2 = box->X2 + ans.bloat; - ans.inflated.Y2 = PCB->MaxHeight; + ans.inflated.Y2 = PCB->hidlib.size_y; ans.inflated.Y1 = box->Y1 - ans.bloat; break; case PCB_WEST: @@ -2176,11 +2176,11 @@ else ans.done |= _NORTH; if (ans.e && !boink_box(ans.e, &ans, PCB_EAST)) - ans.inflated.X2 = PCB->MaxWidth; + ans.inflated.X2 = PCB->hidlib.size_x; else ans.done |= _EAST; if (ans.s && !boink_box(ans.s, &ans, PCB_SOUTH)) - ans.inflated.Y2 = PCB->MaxHeight; + ans.inflated.Y2 = PCB->hidlib.size_y; else ans.done |= _SOUTH; if (ans.w && !boink_box(ans.w, &ans, PCB_WEST)) @@ -2297,13 +2297,13 @@ case PCB_EAST: b.X1 = b.X2; b.X2++; - if (b.X2 >= PCB->MaxWidth - AutoRouteParameters.bloat) + if (b.X2 >= PCB->hidlib.size_x - AutoRouteParameters.bloat) return; /* off board edge */ break; case PCB_SOUTH: b.Y1 = b.Y2; b.Y2++; - if (b.Y2 >= PCB->MaxHeight - AutoRouteParameters.bloat) + if (b.Y2 >= PCB->hidlib.size_y - AutoRouteParameters.bloat) return; /* off board edge */ break; case PCB_WEST: @@ -2313,25 +2313,25 @@ return; /* off board edge */ break; case PCB_NE: - if (b.Y1 <= AutoRouteParameters.bloat + 1 && b.X2 >= PCB->MaxWidth - AutoRouteParameters.bloat - 1) + if (b.Y1 <= AutoRouteParameters.bloat + 1 && b.X2 >= PCB->hidlib.size_x - AutoRouteParameters.bloat - 1) return; /* off board edge */ if (b.Y1 <= AutoRouteParameters.bloat + 1) dir = PCB_EAST; /* north off board edge */ - if (b.X2 >= PCB->MaxWidth - AutoRouteParameters.bloat - 1) + if (b.X2 >= PCB->hidlib.size_x - AutoRouteParameters.bloat - 1) dir = PCB_NORTH; /* east off board edge */ break; case PCB_SE: - if (b.Y2 >= PCB->MaxHeight - AutoRouteParameters.bloat - 1 && b.X2 >= PCB->MaxWidth - AutoRouteParameters.bloat - 1) + if (b.Y2 >= PCB->hidlib.size_y - AutoRouteParameters.bloat - 1 && b.X2 >= PCB->hidlib.size_x - AutoRouteParameters.bloat - 1) return; /* off board edge */ - if (b.Y2 >= PCB->MaxHeight - AutoRouteParameters.bloat - 1) + if (b.Y2 >= PCB->hidlib.size_y - AutoRouteParameters.bloat - 1) dir = PCB_EAST; /* south off board edge */ - if (b.X2 >= PCB->MaxWidth - AutoRouteParameters.bloat - 1) + if (b.X2 >= PCB->hidlib.size_x - AutoRouteParameters.bloat - 1) dir = PCB_SOUTH; /* east off board edge */ break; case PCB_SW: - if (b.Y2 >= PCB->MaxHeight - AutoRouteParameters.bloat - 1 && b.X1 <= AutoRouteParameters.bloat + 1) + if (b.Y2 >= PCB->hidlib.size_y - AutoRouteParameters.bloat - 1 && b.X1 <= AutoRouteParameters.bloat + 1) return; /* off board edge */ - if (b.Y2 >= PCB->MaxHeight - AutoRouteParameters.bloat - 1) + if (b.Y2 >= PCB->hidlib.size_y - AutoRouteParameters.bloat - 1) dir = PCB_WEST; /* south off board edge */ if (b.X1 <= AutoRouteParameters.bloat + 1) dir = PCB_SOUTH; /* west off board edge */