Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 30906) +++ trunk/src/buffer.c (revision 30907) @@ -381,7 +381,7 @@ /* finally the origin and the bounding box */ PCB_COORD_ROTATE90(Buffer->X, Buffer->Y, Buffer->X, Buffer->Y, Number); - pcb_box_rotate90(&Buffer->BoundingBox, Buffer->X, Buffer->Y, Number); + rnd_box_rotate90(&Buffer->BoundingBox, Buffer->X, Buffer->Y, Number); pcb_undo_unfreeze_add(); pcb_undo_unfreeze_serial(); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 30906) +++ trunk/src/crosshair.c (revision 30907) @@ -671,7 +671,7 @@ */ static void onpoint_work(pcb_crosshair_t * crosshair, rnd_coord_t X, rnd_coord_t Y) { - pcb_box_t SearchBox = pcb_point_box(X, Y); + pcb_box_t SearchBox = rnd_point_box(X, Y); struct onpoint_search_info info; int i; rnd_bool redraw = pcb_false; Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30906) +++ trunk/src/data.c (revision 30907) @@ -240,7 +240,7 @@ { pcb_pstk_bbox(padstack); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, padstack)) - pcb_box_bump_box(out, &padstack->BoundingBox); + rnd_box_bump_box(out, &padstack->BoundingBox); } PCB_END_LOOP; PCB_SUBC_LOOP(Data); @@ -247,7 +247,7 @@ { pcb_subc_bbox(subc); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, subc)) - pcb_box_bump_box(out, &subc->BoundingBox); + rnd_box_bump_box(out, &subc->BoundingBox); } PCB_END_LOOP; PCB_LINE_ALL_LOOP(Data); @@ -254,7 +254,7 @@ { pcb_line_bbox(line); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, line)) - pcb_box_bump_box(out, &line->BoundingBox); + rnd_box_bump_box(out, &line->BoundingBox); } PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Data); @@ -261,7 +261,7 @@ { pcb_arc_bbox(arc); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, arc)) - pcb_box_bump_box(out, &arc->BoundingBox); + rnd_box_bump_box(out, &arc->BoundingBox); } PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Data); @@ -268,7 +268,7 @@ { pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, text)) - pcb_box_bump_box(out, &text->BoundingBox); + rnd_box_bump_box(out, &text->BoundingBox); } PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Data); @@ -275,7 +275,7 @@ { pcb_poly_bbox(polygon); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, polygon)) - pcb_box_bump_box(out, &polygon->BoundingBox); + rnd_box_bump_box(out, &polygon->BoundingBox); } PCB_ENDALL_LOOP; return (pcb_data_is_empty(Data) ? NULL : out); @@ -292,7 +292,7 @@ { pcb_pstk_bbox(padstack); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, padstack)) - pcb_box_bump_box(out, &padstack->bbox_naked); + rnd_box_bump_box(out, &padstack->bbox_naked); } PCB_END_LOOP; PCB_SUBC_LOOP(Data); @@ -299,7 +299,7 @@ { pcb_subc_bbox(subc); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, subc)) - pcb_box_bump_box(out, &subc->bbox_naked); + rnd_box_bump_box(out, &subc->bbox_naked); } PCB_END_LOOP; PCB_LINE_ALL_LOOP(Data); @@ -306,7 +306,7 @@ { pcb_line_bbox(line); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, line)) - pcb_box_bump_box(out, &line->bbox_naked); + rnd_box_bump_box(out, &line->bbox_naked); } PCB_ENDALL_LOOP; PCB_ARC_ALL_LOOP(Data); @@ -313,7 +313,7 @@ { pcb_arc_bbox(arc); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, arc)) - pcb_box_bump_box(out, &arc->bbox_naked); + rnd_box_bump_box(out, &arc->bbox_naked); } PCB_ENDALL_LOOP; PCB_TEXT_ALL_LOOP(Data); @@ -320,7 +320,7 @@ { pcb_text_bbox(pcb_font(PCB, text->fid, 1), text); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, text)) - pcb_box_bump_box(out, &text->bbox_naked); + rnd_box_bump_box(out, &text->bbox_naked); } PCB_ENDALL_LOOP; PCB_POLY_ALL_LOOP(Data); @@ -327,7 +327,7 @@ { pcb_poly_bbox(polygon); if (!ignore_floaters || !PCB_FLAG_TEST(PCB_FLAG_FLOATER, polygon)) - pcb_box_bump_box(out, &polygon->bbox_naked); + rnd_box_bump_box(out, &polygon->bbox_naked); } PCB_ENDALL_LOOP; return (pcb_data_is_empty(Data) ? NULL : out); Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 30906) +++ trunk/src/intersect.c (revision 30907) @@ -69,7 +69,7 @@ /* --------------------------------------------------------------------------- * Create a sorted list of unique y coords from a BoxList. */ -static LocationList createSortedYList(pcb_box_list_t *boxlist) +static LocationList createSortedYList(rnd_box_list_t *boxlist) { LocationList yCoords; rnd_coord_t last; @@ -164,7 +164,7 @@ * etc.). * Runs in O(N ln N) time. */ -double pcb_intersect_box_box(pcb_box_list_t *boxlist) +double pcb_intersect_box_box(rnd_box_list_t *boxlist) { pcb_cardinal_t i; double area = 0.0; @@ -179,7 +179,7 @@ * Compute the area of the union of the given rectangles. * O(N ln N) time. */ -double pcb_union_box_box(pcb_box_list_t *boxlist) +double pcb_union_box_box(rnd_box_list_t *boxlist) { pcb_box_t **rectLeft, **rectRight; pcb_cardinal_t i, j; Index: trunk/src/intersect.h =================================================================== --- trunk/src/intersect.h (revision 30906) +++ trunk/src/intersect.h (revision 30907) @@ -43,7 +43,7 @@ #include -double pcb_intersect_box_box(pcb_box_list_t *boxlist); /* will sort boxlist */ -double pcb_union_box_box(pcb_box_list_t *boxlist); +double pcb_intersect_box_box(rnd_box_list_t *boxlist); /* will sort boxlist */ +double pcb_union_box_box(rnd_box_list_t *boxlist); #endif Index: trunk/src/librnd/core/box.c =================================================================== --- trunk/src/librnd/core/box.c (revision 30906) +++ trunk/src/librnd/core/box.c (revision 30907) @@ -33,7 +33,7 @@ #include #include -void pcb_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) +void rnd_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { rnd_coord_t x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; @@ -45,7 +45,7 @@ Box->Y2 = MAX(y1, y2); } -void pcb_box_enlarge(pcb_box_t *box, double xfactor, double yfactor) +void rnd_box_enlarge(pcb_box_t *box, double xfactor, double yfactor) { double w = (double)(box->X2 - box->X1) * xfactor / 2.0; double h = (double)(box->Y2 - box->Y1) * yfactor / 2.0; Index: trunk/src/librnd/core/box.h =================================================================== --- trunk/src/librnd/core/box.h (revision 30906) +++ trunk/src/librnd/core/box.h (revision 30907) @@ -40,8 +40,8 @@ /* random box-related utilities. */ -#ifndef PCB_BOX_H -#define PCB_BOX_H +#ifndef RND_BOX_H +#define RND_BOX_H #include #include @@ -49,7 +49,7 @@ #include #include -struct pcb_box_list_s { +struct rnd_box_list_s { pcb_cardinal_t BoxN, /* the number of boxes contained */ BoxMax; /* max boxes from malloc */ pcb_box_t *Box; @@ -65,11 +65,11 @@ /* rotates box 90-degrees cw */ /* that's a strange rotation! */ -#define PCB_BOX_ROTATE_CW(box) { rnd_coord_t t;\ +#define RND_BOX_ROTATE_CW(box) { rnd_coord_t t;\ t = (box).X1; (box).X1 = -(box).Y2; (box).Y2 = (box).X2;\ (box).X2 = -(box).Y1; (box).Y1 = t;\ } -#define PCB_BOX_ROTATE_TO_NORTH(box, dir) do { rnd_coord_t t;\ +#define RND_BOX_ROTATE_TO_NORTH(box, dir) do { rnd_coord_t t;\ switch(dir) {\ case PCB_EAST: \ t = (box).X1; (box).X1 = (box).Y1; (box).Y1 = -(box).X2;\ @@ -84,7 +84,7 @@ default: assert(0);\ }\ } while (0) -#define PCB_BOX_ROTATE_FROM_NORTH(box, dir) do { rnd_coord_t t;\ +#define RND_BOX_ROTATE_FROM_NORTH(box, dir) do { rnd_coord_t t;\ switch(dir) {\ case PCB_WEST: \ t = (box).X1; (box).X1 = (box).Y1; (box).Y1 = -(box).X2;\ @@ -101,19 +101,19 @@ } while (0) /* to avoid overflow, we calculate centers this way */ -#define PCB_BOX_CENTER_X(b) ((b).X1 + ((b).X2 - (b).X1)/2) -#define PCB_BOX_CENTER_Y(b) ((b).Y1 + ((b).Y2 - (b).Y1)/2) +#define RND_BOX_CENTER_X(b) ((b).X1 + ((b).X2 - (b).X1)/2) +#define RND_BOX_CENTER_Y(b) ((b).Y1 + ((b).Y2 - (b).Y1)/2) -#define PCB_MOVE_POINT(xs,ys,deltax,deltay) \ +#define RND_MOVE_POINT(xs,ys,deltax,deltay) \ do { \ ((xs) += (deltax)); \ ((ys) += (deltay)); \ } while(0) -#define PCB_BOX_MOVE_LOWLEVEL(b,dx,dy) \ +#define RND_BOX_MOVE_LOWLEVEL(b,dx,dy) \ do { \ - PCB_MOVE_POINT((b)->X1,(b)->Y1,(dx),(dy)); \ - PCB_MOVE_POINT((b)->X2,(b)->Y2,(dx),(dy)); \ + RND_MOVE_POINT((b)->X1,(b)->Y1,(dx),(dy)); \ + RND_MOVE_POINT((b)->X2,(b)->Y2,(dx),(dy)); \ } while(0) @@ -125,54 +125,54 @@ /* note that boxes are closed on top and left and open on bottom and right. */ /* this means that top-left corner is in box, *but bottom-right corner is * not*. */ -PCB_INLINE rnd_bool pcb_point_in_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) +PCB_INLINE rnd_bool rnd_point_in_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X < box->X2) && (Y < box->Y2); } -PCB_INLINE rnd_bool pcb_point_in_closed_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) +PCB_INLINE rnd_bool rnd_point_in_closed_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X <= box->X2) && (Y <= box->Y2); } -PCB_INLINE rnd_bool pcb_box_is_good(const pcb_box_t * b) +PCB_INLINE rnd_bool rnd_box_is_good(const pcb_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -PCB_INLINE rnd_bool pcb_box_intersect(const pcb_box_t * a, const pcb_box_t * b) +PCB_INLINE rnd_bool rnd_box_intersect(const pcb_box_t * a, const pcb_box_t * b) { return (a->X1 < b->X2) && (b->X1 < a->X2) && (a->Y1 < b->Y2) && (b->Y1 < a->Y2); } -PCB_INLINE pcb_cheap_point_t pcb_closest_pcb_point_in_box(const pcb_cheap_point_t * from, const pcb_box_t * box) +PCB_INLINE pcb_cheap_point_t rnd_closest_pcb_point_in_box(const pcb_cheap_point_t * from, const pcb_box_t * box) { pcb_cheap_point_t r; assert(box->X1 < box->X2 && box->Y1 < box->Y2); r.X = (from->X < box->X1) ? box->X1 : (from->X > box->X2 - 1) ? box->X2 - 1 : from->X; r.Y = (from->Y < box->Y1) ? box->Y1 : (from->Y > box->Y2 - 1) ? box->Y2 - 1 : from->Y; - assert(pcb_point_in_box(box, r.X, r.Y)); + assert(rnd_point_in_box(box, r.X, r.Y)); return r; } -PCB_INLINE rnd_bool pcb_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) +PCB_INLINE rnd_bool rnd_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } -PCB_INLINE pcb_box_t pcb_clip_box(const pcb_box_t * box, const pcb_box_t * clipbox) +PCB_INLINE pcb_box_t rnd_clip_box(const pcb_box_t * box, const pcb_box_t * clipbox) { pcb_box_t r; - assert(pcb_box_intersect(box, clipbox)); + assert(rnd_box_intersect(box, clipbox)); r.X1 = MAX(box->X1, clipbox->X1); r.X2 = MIN(box->X2, clipbox->X2); r.Y1 = MAX(box->Y1, clipbox->Y1); r.Y2 = MIN(box->Y2, clipbox->Y2); - assert(pcb_box_in_box(clipbox, &r)); + assert(rnd_box_in_box(clipbox, &r)); return r; } -PCB_INLINE pcb_box_t pcb_shrink_box(const pcb_box_t * box, rnd_coord_t amount) +PCB_INLINE pcb_box_t rnd_shrink_box(const pcb_box_t * box, rnd_coord_t amount) { pcb_box_t r = *box; r.X1 += amount; @@ -182,13 +182,13 @@ return r; } -PCB_INLINE pcb_box_t pcb_bloat_box(const pcb_box_t * box, rnd_coord_t amount) +PCB_INLINE pcb_box_t rnd_bloat_box(const pcb_box_t * box, rnd_coord_t amount) { - return pcb_shrink_box(box, -amount); + return rnd_shrink_box(box, -amount); } /* construct a minimum box that touches the input box at the center */ -PCB_INLINE pcb_box_t pcb_box_center(const pcb_box_t * box) +PCB_INLINE pcb_box_t rnd_box_center(const pcb_box_t * box) { pcb_box_t r; r.X1 = box->X1 + (box->X2 - box->X1) / 2; @@ -199,7 +199,7 @@ } /* construct a minimum box that touches the input box at the corner */ -PCB_INLINE pcb_box_t pcb_box_corner(const pcb_box_t * box) +PCB_INLINE pcb_box_t rnd_box_corner(const pcb_box_t * box) { pcb_box_t r; r.X1 = box->X1; @@ -210,7 +210,7 @@ } /* construct a box that holds a single point */ -PCB_INLINE pcb_box_t pcb_point_box(rnd_coord_t X, rnd_coord_t Y) +PCB_INLINE pcb_box_t rnd_point_box(rnd_coord_t X, rnd_coord_t Y) { pcb_box_t r; r.X1 = X; @@ -221,7 +221,7 @@ } /* close a bounding box by pushing its upper right corner */ -PCB_INLINE void pcb_close_box(pcb_box_t * r) +PCB_INLINE void rnd_close_box(pcb_box_t * r) { r->X2++; r->Y2++; @@ -230,15 +230,15 @@ /* return the square of the minimum distance from a point to some point * inside a box. The box is half-closed! That is, the top-left corner * is considered in the box, but the bottom-right corner is not. */ -PCB_INLINE double pcb_dist2_to_box(const pcb_cheap_point_t * p, const pcb_box_t * b) +PCB_INLINE double rnd_dist2_to_box(const pcb_cheap_point_t * p, const pcb_box_t * b) { - pcb_cheap_point_t r = pcb_closest_pcb_point_in_box(p, b); + pcb_cheap_point_t r = rnd_closest_pcb_point_in_box(p, b); return pcb_distance(r.X, r.Y, p->X, p->Y); } /* Modify dst to include src */ -PCB_INLINE void pcb_box_bump_box(pcb_box_t *dst, const pcb_box_t *src) +PCB_INLINE void rnd_box_bump_box(pcb_box_t *dst, const pcb_box_t *src) { if (src->X1 < dst->X1) dst->X1 = src->X1; if (src->Y1 < dst->Y1) dst->Y1 = src->Y1; @@ -247,7 +247,7 @@ } /* Modify dst to include src */ -PCB_INLINE void pcb_box_bump_point(pcb_box_t *dst, rnd_coord_t x, rnd_coord_t y) +PCB_INLINE void rnd_box_bump_point(pcb_box_t *dst, rnd_coord_t x, rnd_coord_t y) { if (x < dst->X1) dst->X1 = x; if (y < dst->Y1) dst->Y1 = y; @@ -256,9 +256,9 @@ } /* rotates a box in 90 degree steps */ -void pcb_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void rnd_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); /* Enlarge a box by adding current width,height multiplied by xfactor,yfactor */ -void pcb_box_enlarge(pcb_box_t *box, double xfactor, double yfactor); +void rnd_box_enlarge(pcb_box_t *box, double xfactor, double yfactor); #endif /* __BOX_H_INCLUDED__ */ Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30906) +++ trunk/src/librnd/core/global_typedefs.h (revision 30907) @@ -43,7 +43,7 @@ typedef struct pcb_point_s pcb_point_t; typedef struct pcb_box_s pcb_box_t; -typedef struct pcb_box_list_s pcb_box_list_t; +typedef struct rnd_box_list_s rnd_box_list_t; typedef struct pcb_polyarea_s pcb_polyarea_t; typedef struct pcb_rtree_s pcb_rtree_t; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30906) +++ trunk/src/librnd/pcb_compat.h (revision 30907) @@ -78,3 +78,30 @@ #define pcb_attrib_compat_set_intconn rnd_attrib_compat_set_intconn #define base64_write_right rnd_base64_write_right #define base64_parse_grow rnd_base64_parse_grow +#define pcb_box_list_s rnd_box_list_s +#define pcb_box_list_t rnd_box_list_t +#define PCB_BOX_ROTATE_CW RND_BOX_ROTATE_CW +#define PCB_BOX_ROTATE_TO_NORTH RND_BOX_ROTATE_TO_NORTH +#define PCB_BOX_ROTATE_FROM_NORTH RND_BOX_ROTATE_FROM_NORTH +#define PCB_BOX_CENTER_X RND_BOX_CENTER_X +#define PCB_BOX_CENTER_Y RND_BOX_CENTER_Y +#define PCB_MOVE_POINT RND_MOVE_POINT +#define PCB_BOX_MOVE_LOWLEVEL RND_BOX_MOVE_LOWLEVEL +#define pcb_point_in_box rnd_point_in_box +#define pcb_point_in_closed_box rnd_point_in_closed_box +#define pcb_box_is_good rnd_box_is_good +#define pcb_box_intersect rnd_box_intersect +#define pcb_closest_pcb_point_in_box rnd_closest_pcb_point_in_box +#define pcb_box_in_box rnd_box_in_box +#define pcb_clip_box rnd_clip_box +#define pcb_shrink_box rnd_shrink_box +#define pcb_bloat_box rnd_bloat_box +#define pcb_box_center rnd_box_center +#define pcb_box_corner rnd_box_corner +#define pcb_point_box rnd_point_box +#define pcb_close_box rnd_close_box +#define pcb_dist2_to_box rnd_dist2_to_box +#define pcb_box_bump_box rnd_box_bump_box +#define pcb_box_bump_point rnd_box_bump_point +#define pcb_box_rotate90 rnd_box_rotate90 +#define pcb_box_enlarge rnd_box_enlarge Index: trunk/src/librnd/poly/polyarea.c =================================================================== --- trunk/src/librnd/poly/polyarea.c (revision 30906) +++ trunk/src/librnd/poly/polyarea.c (revision 30907) @@ -3512,7 +3512,7 @@ pbx.X2 = pl->xmax; pbx.Y2 = pl->ymax; /* if there's no overlap in bounding boxes, don't do any expensive calc */ - if (!(pcb_box_intersect(&cbx, &pbx))) + if (!(rnd_box_intersect(&cbx, &pbx))) return pcb_false; if (pl->tree == NULL) Index: trunk/src/netlist_geo.c =================================================================== --- trunk/src/netlist_geo.c (revision 30906) +++ trunk/src/netlist_geo.c (revision 30907) @@ -422,7 +422,7 @@ farx = curr.o2x; fary = curr.o2y; } - if (o_in_poly && pcb_point_in_box(&o_in_poly->BoundingBox, farx, fary) && pcb_poly_is_point_in_p_ignore_holes(x, y, (pcb_poly_t *)poly)) { + if (o_in_poly && rnd_point_in_box(&o_in_poly->BoundingBox, farx, fary) && pcb_poly_is_point_in_p_ignore_holes(x, y, (pcb_poly_t *)poly)) { curr.o1x = curr.o2x = x; curr.o1y = curr.o2y = y; curr.dist2 = 0; Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 30906) +++ trunk/src/obj_arc.c (revision 30907) @@ -165,7 +165,7 @@ res.X2 += width; res.Y1 -= width; res.Y2 += width; - pcb_close_box(&res); + rnd_close_box(&res); return res; } Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 30906) +++ trunk/src/obj_arc.h (revision 30907) @@ -108,9 +108,9 @@ do { \ rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_arc_t *__a__ = (a); \ - PCB_MOVE_POINT((__a__)->X,(__a__)->Y,__dx__,__dy__); \ - PCB_BOX_MOVE_LOWLEVEL(&((__a__)->BoundingBox),__dx__,__dy__); \ - PCB_BOX_MOVE_LOWLEVEL(&((__a__)->bbox_naked),__dx__,__dy__); \ + RND_MOVE_POINT((__a__)->X,(__a__)->Y,__dx__,__dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__a__)->BoundingBox),__dx__,__dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__a__)->bbox_naked),__dx__,__dy__); \ } while(0) #define PCB_ARC_LOOP(element) do { \ Index: trunk/src/obj_arc_ui.c =================================================================== --- trunk/src/obj_arc_ui.c (revision 30906) +++ trunk/src/obj_arc_ui.c (revision 30907) @@ -139,7 +139,7 @@ int *end_pt = Ptr3; rnd_coord_t ex, ey; pcb_arc_get_end(arc, (end_pt != pcb_arc_start_ptr), &ex, &ey); - *res = pcb_point_box(ex, ey); + *res = rnd_point_box(ex, ey); return 0; } Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 30906) +++ trunk/src/obj_gfx.c (revision 30907) @@ -103,7 +103,7 @@ pcb_box_t res = {0}; int n; for(n = 0; n < 4; n++) - pcb_box_bump_point(&res, gfx->cox[n], gfx->coy[n]); + rnd_box_bump_point(&res, gfx->cox[n], gfx->coy[n]); return res; } @@ -370,9 +370,9 @@ do { \ rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_gfx_t *__g__ = (g); \ - PCB_MOVE_POINT((__g__)->cx, (__g__)->cy,__dx__,__dy__); \ - PCB_BOX_MOVE_LOWLEVEL(&((__g__)->BoundingBox),__dx__,__dy__); \ - PCB_BOX_MOVE_LOWLEVEL(&((__g__)->bbox_naked),__dx__,__dy__); \ + RND_MOVE_POINT((__g__)->cx, (__g__)->cy,__dx__,__dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__g__)->BoundingBox),__dx__,__dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__g__)->bbox_naked),__dx__,__dy__); \ pcb_gfx_update(__g__); \ } while(0) Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 30906) +++ trunk/src/obj_line.c (revision 30907) @@ -353,7 +353,7 @@ dst->X2 = MAX(Line->Point1.X, Line->Point2.X) + width; dst->Y1 = MIN(Line->Point1.Y, Line->Point2.Y) - width; dst->Y2 = MAX(Line->Point1.Y, Line->Point2.Y) + width; - pcb_close_box(dst); + rnd_close_box(dst); } /* sets the bounding box of a line */ @@ -670,7 +670,7 @@ pcb_line_invalidate_erase(Line); pcb_poly_restore_to_poly(ctx->move.pcb->Data, PCB_OBJ_LINE, Layer, Line); pcb_r_delete_entry(Layer->line_tree, &Line->BoundingBox); - PCB_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); + RND_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_line_bbox(Line); pcb_r_insert_entry(Layer->line_tree, &Line->BoundingBox); pcb_poly_clear_from_poly(ctx->move.pcb->Data, PCB_OBJ_LINE, Layer, Line); @@ -683,7 +683,7 @@ if (ctx->move.pcb->RatOn) pcb_rat_invalidate_erase((pcb_rat_t *) Line); pcb_r_delete_entry(ctx->move.pcb->Data->rat_tree, &Line->BoundingBox); - PCB_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); + RND_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_line_bbox(Line); pcb_r_insert_entry(ctx->move.pcb->Data->rat_tree, &Line->BoundingBox); if (ctx->move.pcb->RatOn) Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 30906) +++ trunk/src/obj_line.h (revision 30907) @@ -124,8 +124,8 @@ do { \ rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_line_t *__l__ = (l); \ - PCB_MOVE_POINT((__l__)->Point1.X,(__l__)->Point1.Y,(__dx__),(__dy__)); \ - PCB_MOVE_POINT((__l__)->Point2.X,(__l__)->Point2.Y,(__dx__),(__dy__)); \ + RND_MOVE_POINT((__l__)->Point1.X,(__l__)->Point1.Y,(__dx__),(__dy__)); \ + RND_MOVE_POINT((__l__)->Point2.X,(__l__)->Point2.Y,(__dx__),(__dy__)); \ pcb_line_bbox(__l__); \ } while(0) Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30906) +++ trunk/src/obj_poly.c (revision 30907) @@ -394,8 +394,8 @@ } /* boxes don't include the lower right corner */ - pcb_close_box(&Polygon->bbox_naked); - pcb_close_box(&Polygon->BoundingBox); + rnd_close_box(&Polygon->bbox_naked); + rnd_close_box(&Polygon->BoundingBox); } int pcb_poly_eq(const pcb_host_trans_t *tr1, const pcb_poly_t *p1, const pcb_host_trans_t *tr2, const pcb_poly_t *p2) @@ -801,11 +801,11 @@ { PCB_POLY_POINT_LOOP(Polygon); { - PCB_MOVE_POINT(point->X, point->Y, DX, DY); + RND_MOVE_POINT(point->X, point->Y, DX, DY); } PCB_END_LOOP; - PCB_BOX_MOVE_LOWLEVEL(&Polygon->BoundingBox, DX, DY); - PCB_BOX_MOVE_LOWLEVEL(&Polygon->bbox_naked, DX, DY); + RND_BOX_MOVE_LOWLEVEL(&Polygon->BoundingBox, DX, DY); + RND_BOX_MOVE_LOWLEVEL(&Polygon->bbox_naked, DX, DY); } /* moves a polygon */ @@ -851,7 +851,7 @@ pcb_poly_invalidate_erase(Polygon); } pcb_r_delete_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); - PCB_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); + RND_MOVE_POINT(Point->X, Point->Y, ctx->move.dx, ctx->move.dy); pcb_poly_bbox(Polygon); pcb_r_insert_entry(Layer->polygon_tree, (pcb_box_t *) Polygon); pcb_poly_remove_excess_points(Layer, Polygon); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30906) +++ trunk/src/obj_pstk.c (revision 30907) @@ -172,7 +172,7 @@ switch(shape->shape) { case PCB_PSSH_POLY: for(n = 0; n < shape->data.poly.len; n++) - pcb_box_bump_point(dst, shape->data.poly.x[n] + ps->x, shape->data.poly.y[n] + ps->y); + rnd_box_bump_point(dst, shape->data.poly.x[n] + ps->x, shape->data.poly.y[n] + ps->y); break; case PCB_PSSH_LINE: line.Point1.X = shape->data.line.x1 + ps->x; @@ -183,11 +183,11 @@ line.Clearance = 0; line.Flags = pcb_flag_make(shape->data.line.square ? PCB_FLAG_SQUARE : 0); pcb_line_bbox(&line); - pcb_box_bump_box(dst, &line.BoundingBox); + rnd_box_bump_box(dst, &line.BoundingBox); break; case PCB_PSSH_CIRC: - pcb_box_bump_point(dst, ps->x - shape->data.circ.dia/2, ps->y - shape->data.circ.dia/2); - pcb_box_bump_point(dst, ps->x + shape->data.circ.dia/2, ps->y + shape->data.circ.dia/2); + rnd_box_bump_point(dst, ps->x - shape->data.circ.dia/2, ps->y - shape->data.circ.dia/2); + rnd_box_bump_point(dst, ps->x + shape->data.circ.dia/2, ps->y + shape->data.circ.dia/2); break; case PCB_PSSH_HSHADOW: break; @@ -203,11 +203,11 @@ if (proto->hdia != 0) { /* corner case: no copper around the hole all 360 deg - let the hole stick out */ - pcb_box_bump_point(dst, ps->x - proto->hdia/2, ps->y - proto->hdia/2); - pcb_box_bump_point(dst, ps->x + proto->hdia/2, ps->y + proto->hdia/2); + rnd_box_bump_point(dst, ps->x - proto->hdia/2, ps->y - proto->hdia/2); + rnd_box_bump_point(dst, ps->x + proto->hdia/2, ps->y + proto->hdia/2); } - pcb_close_box(dst); + rnd_close_box(dst); } void pcb_pstk_bbox(pcb_pstk_t *ps) Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 30906) +++ trunk/src/obj_subc.c (revision 30907) @@ -84,7 +84,7 @@ static void pcb_box_bump_box_noflt(pcb_box_t *dst, pcb_box_t *src) { if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, ((pcb_any_obj_t *)(src)))) - pcb_box_bump_box(dst, src); + rnd_box_bump_box(dst, src); } /* update cached values: e.g. looking up refdes in attributes each time the @@ -1012,8 +1012,8 @@ memcpy(&sc->Flags, &src->Flags, sizeof(sc->Flags)); - pcb_close_box(&sc->BoundingBox); - pcb_close_box(&sc->bbox_naked); + rnd_close_box(&sc->BoundingBox); + rnd_close_box(&sc->bbox_naked); if (pcb != NULL) { if (!dst->subc_tree) @@ -1154,8 +1154,8 @@ } } - pcb_close_box(&sc->BoundingBox); - pcb_close_box(&sc->bbox_naked); + rnd_close_box(&sc->BoundingBox); + rnd_close_box(&sc->bbox_naked); if (pcb_data_get_top(Data) != NULL) pcb_r_insert_entry(Data->subc_tree, (pcb_box_t *)sc); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30906) +++ trunk/src/obj_text.c (revision 30907) @@ -419,9 +419,9 @@ /* calculate the axis-aligned version */ Text->bbox_naked.X1 = Text->bbox_naked.X2 = cx[0]; Text->bbox_naked.Y1 = Text->bbox_naked.Y2 = cy[0]; - pcb_box_bump_point(&Text->bbox_naked, cx[1], cy[1]); - pcb_box_bump_point(&Text->bbox_naked, cx[2], cy[2]); - pcb_box_bump_point(&Text->bbox_naked, cx[3], cy[3]); + rnd_box_bump_point(&Text->bbox_naked, cx[1], cy[1]); + rnd_box_bump_point(&Text->bbox_naked, cx[2], cy[2]); + rnd_box_bump_point(&Text->bbox_naked, cx[3], cy[3]); /* the bounding box covers the extent of influence * so it must include the clearance values too @@ -430,8 +430,8 @@ Text->BoundingBox.Y1 = Text->bbox_naked.Y1 - conf_core.design.bloat; Text->BoundingBox.X2 = Text->bbox_naked.X2 + conf_core.design.bloat; Text->BoundingBox.Y2 = Text->bbox_naked.Y2 + conf_core.design.bloat; - pcb_close_box(&Text->bbox_naked); - pcb_close_box(&Text->BoundingBox); + rnd_close_box(&Text->bbox_naked); + rnd_close_box(&Text->BoundingBox); pcb_text_free_str(Text, rendered); } Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 30906) +++ trunk/src/obj_text.h (revision 30907) @@ -111,9 +111,9 @@ do { \ rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_text_t *__t__ = (t); \ - PCB_BOX_MOVE_LOWLEVEL(&((__t__)->BoundingBox), __dx__, __dy__); \ - PCB_BOX_MOVE_LOWLEVEL(&((__t__)->bbox_naked), __dx__, __dy__); \ - PCB_MOVE_POINT((__t__)->X, (__t__)->Y, __dx__, __dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__t__)->BoundingBox), __dx__, __dy__); \ + RND_BOX_MOVE_LOWLEVEL(&((__t__)->bbox_naked), __dx__, __dy__); \ + RND_MOVE_POINT((__t__)->X, (__t__)->Y, __dx__, __dy__); \ } while(0) /* Determines if text is actually visible */ Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30906) +++ trunk/src/polygon.c (revision 30907) @@ -783,10 +783,10 @@ info.layer = Layer; info.polygon = polygon; if (here) - region = pcb_clip_box(here, &polygon->BoundingBox); + region = rnd_clip_box(here, &polygon->BoundingBox); else region = polygon->BoundingBox; - region = pcb_bloat_box(®ion, expand); + region = rnd_bloat_box(®ion, expand); if (setjmp(info.env) == 0) { Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30906) +++ trunk/src/search.c (revision 30907) @@ -1319,7 +1319,7 @@ SearchBox.Y2 = Y + Radius; } else { - SearchBox = pcb_point_box(X, Y); + SearchBox = rnd_point_box(X, Y); } if (conf_core.editor.only_names) { Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 30906) +++ trunk/src/view.c (revision 30907) @@ -182,7 +182,7 @@ v->have_bbox = 1; pcb_obj_center(obj, &v->x, &v->y); memcpy(&v->bbox, &obj->BoundingBox, sizeof(obj->BoundingBox)); - pcb_box_enlarge(&v->bbox, 0.25, 0.25); + rnd_box_enlarge(&v->bbox, 0.25, 0.25); return; } } @@ -194,7 +194,7 @@ obj = pcb_idpath2obj_in(data, idp); if (obj != NULL) { v->have_bbox = 1; - pcb_box_bump_box(&b, &obj->BoundingBox); + rnd_box_bump_box(&b, &obj->BoundingBox); } } } @@ -203,7 +203,7 @@ v->x = (b.X1 + b.X2)/2; v->y = (b.Y1 + b.Y2)/2; memcpy(&v->bbox, &b, sizeof(b)); - pcb_box_enlarge(&v->bbox, 0.25, 0.25); + rnd_box_enlarge(&v->bbox, 0.25, 0.25); } } Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 30906) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30907) @@ -129,7 +129,7 @@ #define STEP_POINT 100 /* get next slot for a box, allocates memory if necessary */ -static pcb_box_t *pcb_box_new(pcb_box_list_t *Boxes) +static pcb_box_t *pcb_box_new(rnd_box_list_t *Boxes) { pcb_box_t *box = Boxes->Box; @@ -144,11 +144,11 @@ } /* frees memory used by a box list */ -static void pcb_box_free(pcb_box_list_t *Boxlist) +static void pcb_box_free(rnd_box_list_t *Boxlist) { if (Boxlist) { free(Boxlist->Box); - memset(Boxlist, 0, sizeof(pcb_box_list_t)); + memset(Boxlist, 0, sizeof(rnd_box_list_t)); } } @@ -200,7 +200,7 @@ #if 0 /* only for debugging box lists */ /* makes a line on the solder layer surrounding all boxes in blist */ -static void showboxes(pcb_box_list_t *blist) +static void showboxes(rnd_box_list_t *blist) { pcb_cardinal_t i; pcb_layer_t *SLayer = &(PCB->Data->Layer[pcb_solder_silk_layer]); @@ -234,7 +234,7 @@ { struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; pcb_box_t query = *region; - PCB_BOX_ROTATE_TO_NORTH(query, ni->search_dir); + RND_BOX_ROTATE_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ * \ / |__| query rect. * \__________/ __ trap.y2 @@ -251,7 +251,7 @@ struct r_neighbor_info *ni = (struct r_neighbor_info *) cl; pcb_box_t query = *box; int r; - PCB_BOX_ROTATE_TO_NORTH(query, ni->search_dir); + RND_BOX_ROTATE_TO_NORTH(query, ni->search_dir); /* ______________ __ trap.y1 __ * \ / |__| query rect. * \__________/ __ trap.y2 @@ -283,8 +283,8 @@ bbox.X2 = PCB->hidlib.size_x; bbox.Y2 = PCB->hidlib.size_y; /* rotate so that we can use the 'north' case for everything */ - PCB_BOX_ROTATE_TO_NORTH(bbox, search_direction); - PCB_BOX_ROTATE_TO_NORTH(ni.trap, search_direction); + RND_BOX_ROTATE_TO_NORTH(bbox, search_direction); + RND_BOX_ROTATE_TO_NORTH(ni.trap, search_direction); /* shift Y's such that trap contains full bounds of trapezoid */ ni.trap.Y2 = ni.trap.Y1; ni.trap.Y1 = bbox.Y1; @@ -320,9 +320,9 @@ rnd_coord_t minx, maxx, miny, maxy; rnd_bool allpads, allsameside; pcb_cardinal_t thegroup; - pcb_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ - pcb_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ - pcb_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ + rnd_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ + rnd_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ + rnd_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ { @@ -380,7 +380,7 @@ /* two lists for solder side / component side. */ PCB_SUBC_LOOP(PCB->Data); { - pcb_box_list_t *thisside, *otherside; + rnd_box_list_t *thisside, *otherside; pcb_box_t *box, *lastbox = NULL; rnd_coord_t clearance; pcb_any_obj_t *o; Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 30906) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30907) @@ -576,13 +576,13 @@ static inline pcb_cheap_point_t closest_point_in_routebox(const pcb_cheap_point_t * from, const routebox_t * rb) { - return pcb_closest_pcb_point_in_box(from, &rb->sbox); + return rnd_closest_pcb_point_in_box(from, &rb->sbox); } static inline rnd_bool point_in_shrunk_box(const routebox_t * box, rnd_coord_t X, rnd_coord_t Y) { pcb_box_t b = shrink_routebox(box); - return pcb_point_in_box(&b, X, Y); + return rnd_point_in_box(&b, X, Y); } /*--------------------------------------------------------------------- @@ -800,7 +800,7 @@ if (rb->flags.nonstraight) return PCB_R_DIR_NOT_FOUND; - sb = pcb_shrink_box(&rb->box, rb->style->Clearance); + sb = rnd_shrink_box(&rb->box, rb->style->Clearance); if (inf->query.X1 >= sb.X2 || inf->query.X2 <= sb.X1 || inf->query.Y1 >= sb.Y2 || inf->query.Y2 <= sb.Y1) return PCB_R_DIR_NOT_FOUND; inf->winner = rb; @@ -814,7 +814,7 @@ { struct rb_info info; info.winner = NULL; - info.query = pcb_point_box(X, Y); + info.query = rnd_point_box(X, Y); if (setjmp(info.env) == 0) pcb_r_search(rd->layergrouptree[layergroup], &info.query, NULL, __found_one_on_lg, &info, NULL); return info.winner; @@ -1304,7 +1304,7 @@ */ static pcb_cost_t pcb_cost_to_layerless_box(const pcb_cheap_point_t * p, pcb_cardinal_t point_layer, const pcb_box_t * b) { - pcb_cheap_point_t p2 = pcb_closest_pcb_point_in_box(p, b); + pcb_cheap_point_t p2 = rnd_closest_pcb_point_in_box(p, b); register pcb_cost_t c1, c2; c1 = p2.X - p->X; @@ -1326,8 +1326,8 @@ nextpoint->Y = target->parent.pin->Y; return pcb_true; }*/ - nextpoint->X = PCB_BOX_CENTER_X(target->sbox); - nextpoint->Y = PCB_BOX_CENTER_Y(target->sbox); + nextpoint->X = RND_BOX_CENTER_X(target->sbox); + nextpoint->Y = RND_BOX_CENTER_Y(target->sbox); return pcb_false; } @@ -1368,7 +1368,7 @@ * the two required clearances plus half the track width. */ clearance = MAX(AutoRouteParameters.style->Clearance, rb->style->Clearance); - r = pcb_bloat_box(&rb->sbox, clearance + HALF_THICK(AutoRouteParameters.style->Thick)); + r = rnd_bloat_box(&rb->sbox, clearance + HALF_THICK(AutoRouteParameters.style->Thick)); return r; } @@ -1645,7 +1645,7 @@ thisbox = edge_to_box(rb, expand_dir); prevcost = previous_edge->cost_point; /* find point closest to target */ - thiscost = pcb_closest_pcb_point_in_box(&prevcost, &thisbox); + thiscost = rnd_closest_pcb_point_in_box(&prevcost, &thisbox); /* compute cost-to-point */ d = pcb_cost_to_point_on_layer(&prevcost, &thiscost, rb->group); /* add in jog penalty */ @@ -1671,7 +1671,7 @@ scale[1] = AutoRouteParameters.LastConflictPenalty; scale[2] = AutoRouteParameters.ConflictPenalty; - assert(pcb_box_is_good(area)); + assert(rnd_box_is_good(area)); assert(AutoRouteParameters.with_conflicts || (to_site_conflict == NO_CONFLICT && through_site_conflict == NO_CONFLICT)); rb = CreateExpansionArea(area, group, parent, pcb_true, previous_edge); rb->flags.is_via = 1; @@ -1684,12 +1684,12 @@ routebox_t *target; pcb_cheap_point_t pnt; /* find a target near this via box */ - pnt.X = PCB_BOX_CENTER_X(*area); - pnt.Y = PCB_BOX_CENTER_Y(*area); + pnt.X = RND_BOX_CENTER_X(*area); + pnt.Y = RND_BOX_CENTER_Y(*area); target = minpcb_cost_target_to_point(&pnt, rb->group, targets, previous_edge->minpcb_cost_target); /* now find point near the target */ - pnt.X = PCB_BOX_CENTER_X(target->box); - pnt.Y = PCB_BOX_CENTER_Y(target->box); + pnt.X = RND_BOX_CENTER_X(target->box); + pnt.Y = RND_BOX_CENTER_Y(target->box); costpoint = closest_point_in_routebox(&pnt, rb); /* we moved from the previous cost point through the plane which is free travel */ d = (scale[through_site_conflict] * pcb_cost_to_point(&costpoint, group, &costpoint, previous_edge->rb->group)); @@ -1739,7 +1739,7 @@ /* use the caller's idea of what this box should be */ rb = CreateExpansionArea(interior_edge, previous_edge->rb->group, previous_edge->rb, pcb_true, previous_edge); path_conflicts(rb, container, pcb_true); /* crucial! */ - costpoint = pcb_closest_pcb_point_in_box(&previous_edge->cost_point, interior_edge); + costpoint = rnd_closest_pcb_point_in_box(&previous_edge->cost_point, interior_edge); d = pcb_cost_to_point_on_layer(&costpoint, &previous_edge->cost_point, previous_edge->rb->group); d *= cost_penalty_to_box; d += previous_edge->pcb_cost_to_point; @@ -1821,8 +1821,8 @@ origbox = *original; breakbox = bloat_routebox(breaker); - PCB_BOX_ROTATE_TO_NORTH(origbox, which_edge); - PCB_BOX_ROTATE_TO_NORTH(breakbox, which_edge); + RND_BOX_ROTATE_TO_NORTH(origbox, which_edge); + RND_BOX_ROTATE_TO_NORTH(breakbox, which_edge); result.right.Y1 = result.center.Y1 = result.left.Y1 = origbox.Y1; result.right.Y2 = result.center.Y2 = result.left.Y2 = origbox.Y1 + 1; /* validity of breaker is not important because the boxes are marked invalid */ @@ -1841,9 +1841,9 @@ result.is_valid_center = (result.center.X1 < result.center.X2); result.is_valid_right = (result.right.X1 < result.right.X2); /* rotate back */ - PCB_BOX_ROTATE_FROM_NORTH(result.left, which_edge); - PCB_BOX_ROTATE_FROM_NORTH(result.center, which_edge); - PCB_BOX_ROTATE_FROM_NORTH(result.right, which_edge); + RND_BOX_ROTATE_FROM_NORTH(result.left, which_edge); + RND_BOX_ROTATE_FROM_NORTH(result.center, which_edge); + RND_BOX_ROTATE_FROM_NORTH(result.right, which_edge); /* done */ return result; } @@ -1883,12 +1883,12 @@ pcb_box_t b1 = rb->sbox, b2 = parent->sbox; b1.X1--;b1.Y1--;b1.X2++;b1.Y2++; b2.X1--;b2.Y1--;b2.X2++;b2.Y2++; - assert(relax_edge_requirements ? pcb_box_intersect(&b1, &b2) + assert(relax_edge_requirements ? rnd_box_intersect(&b1, &b2) : share_edge(&rb->sbox, &parent->sbox)); } #endif rb->parent.expansion_area = route_parent(parent); - rb->cost_point = pcb_closest_pcb_point_in_box(&rb->parent.expansion_area->cost_point, area); + rb->cost_point = rnd_closest_pcb_point_in_box(&rb->parent.expansion_area->cost_point, area); rb->cost = rb->parent.expansion_area->cost + pcb_cost_to_point_on_layer(&rb->parent.expansion_area->cost_point, &rb->cost_point, rb->group); @@ -1956,7 +1956,7 @@ } else { if (rb->style->Clearance > res->keep) - rbox = pcb_bloat_box(&rb->sbox, rb->style->Clearance - res->keep); + rbox = rnd_bloat_box(&rb->sbox, rb->style->Clearance - res->keep); else rbox = rb->sbox; @@ -1988,7 +1988,7 @@ if (rb->type == PLANE) { /* expanding inside a plane is not good */ if (rbox.X1 < res->orig.X1 && rbox.X2 > res->orig.X2 && rbox.Y1 < res->orig.Y1 && rbox.Y2 > res->orig.Y2) { - res->inflated = pcb_bloat_box(&res->orig, res->bloat); + res->inflated = rnd_bloat_box(&res->orig, res->bloat); return PCB_R_DIR_FOUND_CONTINUE; } } @@ -2211,9 +2211,9 @@ { pcb_box_t b = rb->sbox; if (rb->style->Clearance > AutoRouteParameters.style->Clearance) - b = pcb_bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); - b = pcb_clip_box(&b, box); - assert(pcb_box_is_good(&b)); + b = rnd_bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); + b = rnd_clip_box(&b, box); + assert(rnd_box_is_good(&b)); /* we want to look at the blockers clockwise around the box */ switch (dir) { /* we need to use the other coordinate fraction to resolve @@ -2253,7 +2253,7 @@ rb->group = parent->group; rb->type = EXPANSION_AREA; rb->came_from = dir; - rb->cost_point = pcb_closest_pcb_point_in_box(&parent->cost_point, area); + rb->cost_point = rnd_closest_pcb_point_in_box(&parent->cost_point, area); rb->cost = parent->cost + pcb_cost_to_point_on_layer(&parent->cost_point, &rb->cost_point, rb->group); rb->parent.expansion_area = route_parent(parent); if (rb->parent.expansion_area->flags.homeless) @@ -2278,7 +2278,7 @@ routeone_state_t *s, pcb_rtree_t * tree, vector_t * area_vec) { pcb_box_t b; - assert(pcb_box_is_good(box)); + assert(rnd_box_is_good(box)); b = *box; /* for the cardinal directions, move the box to overlap the * the parent by 1 unit. Corner expansions overlap more @@ -2354,8 +2354,8 @@ */ if (dir == PCB_NE || dir == PCB_SE || dir == PCB_SW || dir == PCB_NW) { pcb_cheap_point_t p; - p = pcb_closest_pcb_point_in_box(&nrb->cost_point, &e->minpcb_cost_target->sbox); - p = pcb_closest_pcb_point_in_box(&p, &b); + p = rnd_closest_pcb_point_in_box(&nrb->cost_point, &e->minpcb_cost_target->sbox); + p = rnd_closest_pcb_point_in_box(&p, &b); nrb->cost += pcb_cost_to_point_on_layer(&p, &nrb->cost_point, nrb->group); nrb->cost_point = p; } @@ -2385,7 +2385,7 @@ default: assert(0); } - if (!pcb_box_is_good(&b)) + if (!rnd_box_is_good(&b)) return; /* how did this happen ? */ nrb = CreateBridge(&b, rb, dir); pcb_r_insert_entry(tree, &nrb->box); @@ -2394,7 +2394,7 @@ /* mark this one as conflicted */ path_conflicts(nrb, blocker, pcb_true); /* and make an expansion edge */ - nrb->cost_point = pcb_closest_pcb_point_in_box(&nrb->cost_point, &blocker->sbox); + nrb->cost_point = rnd_closest_pcb_point_in_box(&nrb->cost_point, &blocker->sbox); nrb->cost += pcb_cost_to_point_on_layer(&nrb->parent.expansion_area->cost_point, &nrb->cost_point, nrb->group) * CONFLICT_PENALTY(blocker); @@ -2420,8 +2420,8 @@ else if (blocker->flags.target) { routebox_t *nrb; edge_t *ne; - b = pcb_bloat_box(&b, 1); - if (!pcb_box_intersect(&b, &blocker->sbox)) { + b = rnd_bloat_box(&b, 1); + if (!rnd_box_intersect(&b, &blocker->sbox)) { /* if the expansion edge stopped before touching, expand the bridge */ switch (dir) { case PCB_NORTH: @@ -2440,8 +2440,8 @@ assert(0); } } - assert(pcb_box_intersect(&b, &blocker->sbox)); - b = pcb_shrink_box(&b, 1); + assert(rnd_box_intersect(&b, &blocker->sbox)); + b = rnd_shrink_box(&b, 1); nrb = CreateBridge(&b, rb, dir); pcb_r_insert_entry(tree, &nrb->box); vector_append(area_vec, nrb); @@ -2472,7 +2472,7 @@ return PCB_R_DIR_NOT_FOUND; b = rb->sbox; if (rb->style->Clearance > AutoRouteParameters.style->Clearance) - b = pcb_bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); + b = rnd_bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); if (b.X2 <= bi->box.X1 || b.X1 >= bi->box.X2 || b.Y1 >= bi->box.Y2 || b.Y2 <= bi->box.Y1) return PCB_R_DIR_NOT_FOUND; if (blocker_to_heap(bi->heap, rb, &bi->box, bi->dir)) @@ -2565,7 +2565,7 @@ /* don't break the edge we came from */ if (e->expand_dir != ((dir + 2) % 4)) { heap[dir] = pcb_heap_create(); - bi.box = pcb_bloat_box(&rb->sbox, bloat); + bi.box = rnd_bloat_box(&rb->sbox, bloat); bi.heap = heap[dir]; bi.dir = dir; /* convert to edge */ @@ -2808,7 +2808,7 @@ /* if (rb->type == EXPANSION_AREA && !rb->flags.is_via)*/ /* return PCB_R_DIR_NOT_FOUND; */ rbox = bloat_routebox(rb); - if (!pcb_box_intersect(&rbox, foib->box)) + if (!rnd_box_intersect(&rbox, foib->box)) return PCB_R_DIR_NOT_FOUND; /* this is an intersector! */ foib->intersect = (routebox_t *) box; @@ -2850,11 +2850,11 @@ switch (rbox->type) { case TERM: case VIA_SHADOW: - sq = pcb_shrink_box(&ti->query, rbox->style->Diameter); - if (!pcb_box_intersect(&sb, &sq)) + sq = rnd_shrink_box(&ti->query, rbox->style->Diameter); + if (!rnd_box_intersect(&sb, &sq)) return PCB_R_DIR_NOT_FOUND; - sb.X1 = PCB_BOX_CENTER_X(sb); - sb.Y1 = PCB_BOX_CENTER_Y(sb); + sb.X1 = RND_BOX_CENTER_X(sb); + sb.Y1 = RND_BOX_CENTER_Y(sb); break; default: assert(0); @@ -3084,8 +3084,8 @@ return pcb_true; } /* find where knee belongs */ - if (pcb_point_in_box(box1, end.X, start.Y) - || pcb_point_in_box(box2, end.X, start.Y)) { + if (rnd_point_in_box(box1, end.X, start.Y) + || rnd_point_in_box(box2, end.X, start.Y)) { knee.X = end.X; knee.Y = start.Y; } @@ -3093,13 +3093,13 @@ knee.X = start.X; knee.Y = end.Y; } - if ((knee.X == end.X && !last_was_x) && (pcb_point_in_box(box1, start.X, end.Y) - || pcb_point_in_box(box2, start.X, end.Y))) { + if ((knee.X == end.X && !last_was_x) && (rnd_point_in_box(box1, start.X, end.Y) + || rnd_point_in_box(box2, start.X, end.Y))) { knee.X = start.X; knee.Y = end.Y; } - assert(AutoRouteParameters.is_smoothing || pcb_point_in_closed_box(box1, knee.X, knee.Y) - || pcb_point_in_closed_box(box2, knee.X, knee.Y)); + assert(AutoRouteParameters.is_smoothing || rnd_point_in_closed_box(box1, knee.X, knee.Y) + || rnd_point_in_closed_box(box2, knee.X, knee.Y)); if (1 || !AutoRouteParameters.is_smoothing) { /* draw standard manhattan paths */ @@ -3192,13 +3192,13 @@ * is where we're utlimately headed on this path. However, it * must reside in the plane as well as the via area too. */ - nextpoint.X = PCB_BOX_CENTER_X(path->sbox); - nextpoint.Y = PCB_BOX_CENTER_Y(path->sbox); + nextpoint.X = RND_BOX_CENTER_X(path->sbox); + nextpoint.Y = RND_BOX_CENTER_Y(path->sbox); if (path->parent.expansion_area->flags.is_via) { TargetPoint(&nextpoint, rb_source(path)); /* nextpoint is the middle of the source terminal now */ - b = pcb_clip_box(&path->sbox, &path->parent.expansion_area->sbox); - nextpoint = pcb_closest_pcb_point_in_box(&nextpoint, &b); + b = rnd_clip_box(&path->sbox, &path->parent.expansion_area->sbox); + nextpoint = rnd_closest_pcb_point_in_box(&nextpoint, &b); /* now it's in the via and plane near the source */ } else { /* no via coming, target must have been a pin */ @@ -3206,20 +3206,20 @@ assert(target->type == TERM); TargetPoint(&nextpoint, target); } - assert(pcb_point_in_box(&path->sbox, nextpoint.X, nextpoint.Y)); + assert(rnd_point_in_box(&path->sbox, nextpoint.X, nextpoint.Y)); RD_DrawThermal(rd, nextpoint.X, nextpoint.Y, path->group, path->layer, subnet, is_bad); } else { /* start from best place of target box */ - lastpoint.X = PCB_BOX_CENTER_X(target->sbox); - lastpoint.Y = PCB_BOX_CENTER_Y(target->sbox); + lastpoint.X = RND_BOX_CENTER_X(target->sbox); + lastpoint.Y = RND_BOX_CENTER_Y(target->sbox); TargetPoint(&lastpoint, target); - if (AutoRouteParameters.last_smooth && pcb_box_in_box(&path->sbox, &target->sbox)) + if (AutoRouteParameters.last_smooth && rnd_box_in_box(&path->sbox, &target->sbox)) path = path->parent.expansion_area; b = path->sbox; if (path->flags.circular) - b = pcb_shrink_box(&b, MIN(b.X2 - b.X1, b.Y2 - b.Y1) / 5); - nextpoint = pcb_closest_pcb_point_in_box(&lastpoint, &b); + b = rnd_shrink_box(&b, MIN(b.X2 - b.X1, b.Y2 - b.Y1) / 5); + nextpoint = rnd_closest_pcb_point_in_box(&lastpoint, &b); if (AutoRouteParameters.last_smooth) RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, pcb_true); else @@ -3240,11 +3240,11 @@ path = path->parent.expansion_area; b = path->sbox; if (path->flags.circular) - b = pcb_shrink_box(&b, MIN(b.X2 - b.X1, b.Y2 - b.Y1) / 5); + b = rnd_shrink_box(&b, MIN(b.X2 - b.X1, b.Y2 - b.Y1) / 5); assert(b.X1 != b.X2 && b.Y1 != b.Y2); /* need someplace to put line! */ /* find point on path perimeter closest to last point */ /* if source terminal, try to hit a good place */ - nextpoint = pcb_closest_pcb_point_in_box(&lastpoint, &b); + nextpoint = rnd_closest_pcb_point_in_box(&lastpoint, &b); #if 0 /* leave more clearance if this is a smoothing pass */ if (AutoRouteParameters.is_smoothing && (nextpoint.X != lastpoint.X || nextpoint.Y != lastpoint.Y)) @@ -3252,8 +3252,8 @@ #endif if (path->flags.source && path->type != PLANE) TargetPoint(&nextpoint, path); - assert(pcb_point_in_box(&lastpath->box, lastpoint.X, lastpoint.Y)); - assert(pcb_point_in_box(&path->box, nextpoint.X, nextpoint.Y)); + assert(rnd_point_in_box(&lastpath->box, lastpoint.X, lastpoint.Y)); + assert(rnd_point_in_box(&path->box, nextpoint.X, nextpoint.Y)); #if defined(ROUTE_DEBUG_VERBOSE) printf("TRACEPATH: "); DumpRouteBox(path); @@ -3273,7 +3273,7 @@ #ifdef ROUTE_VERBOSE printf(" (vias)"); #endif - assert(pcb_point_in_box(&path->box, nextpoint.X, nextpoint.Y)); + assert(rnd_point_in_box(&path->box, nextpoint.X, nextpoint.Y)); RD_DrawVia(rd, nextpoint.X, nextpoint.Y, radius, subnet, is_bad); } @@ -3413,7 +3413,7 @@ rnd_coord_t radius, clearance; vetting_t *work; pcb_box_t region = shrink_routebox(within); - pcb_shrink_box(®ion, shrink); + rnd_shrink_box(®ion, shrink); radius = HALF_THICK(AutoRouteParameters.style->Diameter); clearance = AutoRouteParameters.style->Clearance; @@ -3463,10 +3463,10 @@ continue; } /* answers are bloated by radius + clearance */ - cliparea = pcb_shrink_box(area, radius + clearance); - pcb_close_box(&cliparea); + cliparea = rnd_shrink_box(area, radius + clearance); + rnd_close_box(&cliparea); free(area); - assert(pcb_box_is_good(&cliparea)); + assert(rnd_box_is_good(&cliparea)); count++; for (j = 0; j < pcb_max_group(PCB); j++) { edge_t *ne; @@ -3719,11 +3719,11 @@ /* may expand in all directions from source; center edge cost point. */ /* note that planes shouldn't really expand, but we need an edge */ - cp.X = PCB_BOX_CENTER_X(b); - cp.Y = PCB_BOX_CENTER_Y(b); + cp.X = RND_BOX_CENTER_X(b); + cp.Y = RND_BOX_CENTER_Y(b); e = CreateEdge(p, cp.X, cp.Y, 0, NULL, PCB_ANY_DIR, targets); - cp = pcb_closest_pcb_point_in_box(&cp, &e->minpcb_cost_target->sbox); - cp = pcb_closest_pcb_point_in_box(&cp, &b); + cp = rnd_closest_pcb_point_in_box(&cp, &e->minpcb_cost_target->sbox); + cp = rnd_closest_pcb_point_in_box(&cp, &b); e->cost_point = cp; p->cost_point = cp; source_conflicts(rd->layergrouptree[p->group], p); @@ -3839,7 +3839,7 @@ routebox_t *nrb; pcb_box_t b = shrink_routebox(e->rb); /* limit via region to that inside the plane */ - pcb_clip_box(&b, &intersecting->sbox); + rnd_clip_box(&b, &intersecting->sbox); nrb = CreateExpansionArea(&b, e->rb->group, e->rb, pcb_true, e); nrb->flags.is_thermal = 1; ne = CreateEdge2(nrb, e->expand_dir, e, NULL, intersecting); @@ -3949,22 +3949,22 @@ switch (e->rb->came_from) { case PCB_NORTH: b.Y2 = b.Y1 + 1; - b.X1 = PCB_BOX_CENTER_X(b); + b.X1 = RND_BOX_CENTER_X(b); b.X2 = b.X1 + 1; break; case PCB_EAST: b.X1 = b.X2 - 1; - b.Y1 = PCB_BOX_CENTER_Y(b); + b.Y1 = RND_BOX_CENTER_Y(b); b.Y2 = b.Y1 + 1; break; case PCB_SOUTH: b.Y1 = b.Y2 - 1; - b.X1 = PCB_BOX_CENTER_X(b); + b.X1 = RND_BOX_CENTER_X(b); b.X2 = b.X1 + 1; break; case PCB_WEST: b.X2 = b.X1 + 1; - b.Y1 = PCB_BOX_CENTER_Y(b); + b.Y1 = RND_BOX_CENTER_Y(b); b.Y2 = b.Y1 + 1; break; default: @@ -3975,11 +3975,11 @@ * adjacent blockers. */ else if (e->rb->flags.source) - b = pcb_box_center(&e->rb->sbox); + b = rnd_box_center(&e->rb->sbox); else b = e->rb->sbox; ans = Expand(rd->layergrouptree[e->rb->group], e, &b); - if (!pcb_box_intersect(&ans->inflated, &ans->orig)) + if (!rnd_box_intersect(&ans->inflated, &ans->orig)) goto dontexpand; #if 0 /* skip if it didn't actually expand */ @@ -3988,7 +3988,7 @@ goto dontexpand; #endif - if (!pcb_box_is_good(&ans->inflated)) + if (!rnd_box_is_good(&ans->inflated)) goto dontexpand; nrb = CreateExpansionArea(&ans->inflated, e->rb->group, e->rb, pcb_true, e); pcb_r_insert_entry(rd->layergrouptree[nrb->group], &nrb->box); @@ -4515,7 +4515,7 @@ /* flip coordinates, if bl_to_ur */ b = p->sbox; total_wire_length += sqrt((b.X2 - b.X1 - th) * (b.X2 - b.X1 - th) + (b.Y2 - b.Y1 - th) * (b.Y2 - b.Y1 - th)); - b = pcb_shrink_box(&b, halfwidth); + b = rnd_shrink_box(&b, halfwidth); if (b.X2 == b.X1 + 1) b.X2 = b.X1; if (b.Y2 == b.Y1 + 1) Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 30906) +++ trunk/src_plugins/autoroute/mtspace.c (revision 30907) @@ -89,12 +89,12 @@ mtspacebox_t *mtspace_create_box(const pcb_box_t * box, rnd_coord_t clearance) { mtspacebox_t *mtsb; - assert(pcb_box_is_good(box)); + assert(rnd_box_is_good(box)); mtsb = (mtspacebox_t *) malloc(sizeof(*mtsb)); /* the box was sent to us pre-bloated by the clearance amount */ *((pcb_box_t *) & mtsb->box) = *box; mtsb->clearance = clearance; - assert(pcb_box_is_good(&mtsb->box)); + assert(rnd_box_is_good(&mtsb->box)); return mtsb; } @@ -176,7 +176,7 @@ cl.clearance = clearance; cl.box = *box; cl.tree = which_tree(mtspace, which); - small_search = pcb_box_center(box); + small_search = rnd_box_center(box); if (setjmp(cl.env) == 0) { pcb_r_search(cl.tree, &small_search, NULL, mts_remove_one, &cl, NULL); assert(0); /* didn't find it?? */ @@ -197,7 +197,7 @@ { pcb_cheap_point_t p = *desired; assert(desired); - pcb_closest_pcb_point_in_box(&p, newone); + rnd_closest_pcb_point_in_box(&p, newone); pcb_heap_insert(heap, PCB_ABS(p.X - desired->X) + (p.Y - desired->Y), newone); } @@ -225,7 +225,7 @@ pcb_box_t b1 = *qc->cbox, b2 = mtsb->box; b1.X1--;b1.Y1--;b1.X2++;b1.Y2++; b2.X1--;b2.Y1--;b2.X2++;b2.Y2++; - assert(pcb_box_intersect(&b1, &b2)); + assert(rnd_box_intersect(&b1, &b2)); } #endif @@ -321,7 +321,7 @@ while (!(qc->desired ? pcb_heap_is_empty(qc->checking.h) : vector_is_empty(qc->checking.v))) { cbox = qc->desired ? (pcb_box_t *) pcb_heap_remove_smallest(qc->checking.h) : (pcb_box_t *) vector_remove_last(qc->checking.v); if (setjmp(qc->env) == 0) { - assert(pcb_box_is_good(cbox)); + assert(rnd_box_is_good(cbox)); qc->cbox = cbox; pcb_r_search(tree, cbox, NULL, query_one, qc, &n); assert(n == 0); @@ -404,7 +404,7 @@ if (region) { pcb_box_t *cbox; assert(work == NULL); - assert(pcb_box_is_good(region)); + assert(rnd_box_is_good(region)); assert(vector_is_empty(free_space_vec)); assert(vector_is_empty(lo_conflict_space_vec)); assert(vector_is_empty(hi_conflict_space_vec)); @@ -412,7 +412,7 @@ work->clearance = clearance; work->radius = radius; cbox = (pcb_box_t *) malloc(sizeof(pcb_box_t)); - *cbox = pcb_bloat_box(region, clearance + radius); + *cbox = rnd_bloat_box(region, clearance + radius); if (desired) { work->untested.h = pcb_heap_create(); work->no_fix.h = pcb_heap_create(); Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30906) +++ trunk/src_plugins/export_xy/xy.c (revision 30907) @@ -226,7 +226,7 @@ if (!(pcb_layer_flags_(ly) & PCB_LYT_COPPER)) continue; } - pcb_box_bump_box(&box, &o->bbox_naked); + rnd_box_bump_box(&box, &o->bbox_naked); } } } Index: trunk/src_plugins/hid_lesstif/wt_preview.c =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30906) +++ trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30907) @@ -181,7 +181,7 @@ pb.Y1 = prv->y1; pb.X2 = prv->x2; pb.Y2 = prv->y2; - if (pcb_box_intersect(screen, &pb)) + if (rnd_box_intersect(screen, &pb)) pcb_ltf_preview_redraw(prv); } else Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30906) +++ trunk/src_plugins/io_dsn/read.c (revision 30907) @@ -217,7 +217,7 @@ y = COORD(ctx, src); else y = COORDY(ctx, src); - pcb_box_bump_point(dst, x, y); + rnd_box_bump_point(dst, x, y); return 0; err:; @@ -288,7 +288,7 @@ ly = y; } else - pcb_box_bump_point(&ctx->bbox, x, y); + rnd_box_bump_point(&ctx->bbox, x, y); } if (!do_bbox && (x != fx) && (y != fy)) /* close the boundary */ boundary_line(oly, lx, ly, x, y, aper); @@ -312,7 +312,7 @@ boundary_line(oly, box.X1, box.Y2, box.X1, box.Y1, 0); } else - pcb_box_bump_box(&ctx->bbox, &box); + rnd_box_bump_box(&ctx->bbox, &box); } } return 0; Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 30906) +++ trunk/src_plugins/io_kicad/write.c (revision 30907) @@ -586,7 +586,7 @@ bx.X1 = bx.X2 = shape->data.poly.x[0]; bx.Y1 = bx.Y2 = shape->data.poly.y[0]; for(i = 1; i < shape->data.poly.len; i++) - pcb_box_bump_point(&bx, shape->data.poly.x[i], shape->data.poly.y[i]); + rnd_box_bump_point(&bx, shape->data.poly.x[i], shape->data.poly.y[i]); w = (bx.X2 - bx.X1); h = (bx.Y2 - bx.Y1); shape_str = "rect"; Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 30906) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 30907) @@ -476,7 +476,7 @@ bx.X1 = bx.X2 = shape->data.poly.x[0]; bx.Y1 = bx.Y2 = shape->data.poly.y[0]; for(i = 1; i < shape->data.poly.len; i++) - pcb_box_bump_point(&bx, shape->data.poly.x[i], shape->data.poly.y[i]); + rnd_box_bump_point(&bx, shape->data.poly.x[i], shape->data.poly.y[i]); w = (bx.X2 - bx.X1); h = (bx.Y2 - bx.Y1); cx = (bx.X1 + bx.X2)/2; Index: trunk/src_plugins/lib_gtk_common/wt_preview.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30906) +++ trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30907) @@ -595,7 +595,7 @@ pb.Y1 = prv->view.y0; pb.X2 = prv->view.x0 + prv->view.width; pb.Y2 = prv->view.y0 + prv->view.height; - if (pcb_box_intersect(screen, &pb)) { + if (rnd_box_intersect(screen, &pb)) { prv->redrawing = 1; ghid_preview_expose(GTK_WIDGET(prv), NULL); prv->redrawing = 0; Index: trunk/src_plugins/lib_hid_pcbui/util.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.c (revision 30906) +++ trunk/src_plugins/lib_hid_pcbui/util.c (revision 30907) @@ -43,7 +43,7 @@ if (!PCB_FLAG_TEST(flg, o)) continue; cnt++; - pcb_box_bump_box(dst, &o->BoundingBox); + rnd_box_bump_box(dst, &o->BoundingBox); } return cnt; } Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30906) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30907) @@ -172,7 +172,7 @@ e->x2 = x2; e->y2 = y2; - pcb_box_bump_box(&dst->bbox, b); + rnd_box_bump_box(&dst->bbox, b); pcb_r_insert_entry(dst->edge_tree, (pcb_box_t *)e); } Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30906) +++ trunk/src_plugins/millpath/toolpath.c (revision 30907) @@ -254,11 +254,11 @@ continue; for(line = (pcb_line_t *)pcb_r_first(l->line_tree, &it); line != NULL; line = (pcb_line_t *)pcb_r_next(&it)) - pcb_box_bump_box(&otlbb, (pcb_box_t *)line); + rnd_box_bump_box(&otlbb, (pcb_box_t *)line); pcb_r_end(&it); for(arc = (pcb_arc_t *)pcb_r_first(l->arc_tree, &it); arc != NULL; arc = (pcb_arc_t *)pcb_r_next(&it)) - pcb_box_bump_box(&otlbb, (pcb_box_t *)arc); + rnd_box_bump_box(&otlbb, (pcb_box_t *)arc); pcb_r_end(&it); } result->fill = pcb_poly_new_from_rectangle(result->res_ply, otlbb.X1, otlbb.Y1, otlbb.X2, otlbb.Y2, 0, pcb_flag_make(PCB_FLAG_FULLPOLY));