Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 38423) +++ trunk/src/obj_arc.c (revision 38424) @@ -102,13 +102,12 @@ return pcb_arc_alloc_id(layer, pcb_create_ID_get()); } -/* computes the bounding box of an arc */ -static rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) +/* computes the centerline bounding box of an arc */ +rnd_box_t pcb_arc_bbox_cline(const pcb_arc_t *Arc) { double ca1, ca2, sa1, sa2; double minx, maxx, miny, maxy, delta; rnd_angle_t ang1, ang2; - rnd_coord_t width; rnd_box_t res; /* first normalize angles: ang1 < ang2, both angles between 0 and 720 */ @@ -155,6 +154,17 @@ res.Y1 = Arc->Y + Arc->Height * miny; res.Y2 = Arc->Y + Arc->Height * maxy; + return res; +} + +/* computes the bounding box of an arc */ +static rnd_box_t pcb_arc_bbox_(const pcb_arc_t *Arc, int mini) +{ + rnd_box_t res; + rnd_coord_t width; + + res = pcb_arc_bbox_cline(Arc); + if (!mini) { width = (Arc->Thickness + Arc->Clearance) / 2; /* Adjust for our discrete polygon approximation */ Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 38423) +++ trunk/src/obj_arc.h (revision 38424) @@ -68,8 +68,8 @@ void pcb_arc_flip_side(pcb_layer_t *layer, pcb_arc_t *arc); void pcb_arc_scale(pcb_arc_t *arc, double sx, double sy, double sth); rnd_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); +rnd_box_t pcb_arc_bbox_cline(const pcb_arc_t *Arc); /* bounding box of the centerline */ - /*** hash and eq ***/ int pcb_arc_eq(const pcb_host_trans_t *tr1, const pcb_arc_t *a1, const pcb_host_trans_t *tr2, const pcb_arc_t *a2); unsigned int pcb_arc_hash(const pcb_host_trans_t *tr, const pcb_arc_t *a);