Index: rubberband.c =================================================================== --- rubberband.c (revision 6344) +++ rubberband.c (revision 6345) @@ -81,6 +81,7 @@ static void CheckPinForRubberbandConnection(rubber_ctx_t *rbnd, pcb_pin_t *); static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, pcb_bool); static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, int *, pcb_bool); +static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, pcb_bool); static void CheckPolygonForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_polygon_t *); static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_point_t *); static pcb_r_dir_t rubber_callback(const pcb_box_t *b, void *cl); @@ -443,6 +444,44 @@ } /* --------------------------------------------------------------------------- + * checks all visible lines which belong to the same group as the passed arc. + * If one of the endpoints of the line is on either of the selected arcs ends, + * the scanned line is added to the 'rubberband' list. + */ +static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, pcb_bool Exact) +{ + pcb_layergrp_id_t group; + struct rubber_info info; + pcb_coord_t t = Arc->Thickness / 2, ex, ey; + + for ( int which=0; which<=1; ++which){ + pcb_arc_get_end(Arc,which,&ex, &ey); + + /* lookup layergroup and check all visible lines in this group */ + info.radius = Exact ? -1 : MAX(Arc->Thickness / 2, 1); + info.box.X1 = ex - t; + info.box.X2 = ex + t; + info.box.Y1 = ey - t; + info.box.Y2 = ey + t; + info.line = NULL; /* used only to make sure the current object is not added - we are adding lines only and the current object is an arc */ + info.rbnd = rbnd; + info.X = ex; + info.Y = ey; + + group = pcb_layer_get_group_(Layer); + PCB_COPPER_GROUP_LOOP(PCB->Data, group); + { + /* check all visible lines of the group member */ + if (layer->On) { + info.layer = layer; + pcb_r_search(layer->line_tree, &info.box, NULL, rubber_callback, &info, NULL); + } + } + PCB_END_LOOP; + } +} + +/* --------------------------------------------------------------------------- * checks all visible lines which belong to the same group as the passed polygon. * If one of the endpoints of the line lays inside the passed polygon, * the scanned line is added to the 'rubberband' list @@ -535,6 +574,11 @@ CheckArcPointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, (int *) Ptr3, pcb_true); break; + case PCB_TYPE_ARC: + if (pcb_layer_flags(pcb_layer_id(PCB->Data, (pcb_layer_t *) Ptr1)) & PCB_LYT_COPPER) + CheckArcForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, pcb_true); + break; + case PCB_TYPE_VIA: CheckPinForRubberbandConnection(rbnd, (pcb_pin_t *) Ptr1); break;