Index: trunk/src_plugins/rbs_routing/map.c =================================================================== --- trunk/src_plugins/rbs_routing/map.c (revision 38821) +++ trunk/src_plugins/rbs_routing/map.c (revision 38822) @@ -193,9 +193,9 @@ #define FIND_PT_DELTA 2 #define FIND_PT_DELTA2 RBSR_R2G(FIND_PT_DELTA * FIND_PT_DELTA) -grbs_point_t *rbsr_find_point_by_center(rbsr_map_t *rbs, rnd_coord_t cx_, rnd_coord_t cy_) +RND_INLINE grbs_point_t *rbsr_find_point_(rbsr_map_t *rbs, rnd_coord_t cx_, rnd_coord_t cy_, double bestd2) { - double cx = RBSR_R2G(cx_), cy = RBSR_R2G(cy_), bestd2 = FIND_PT_DELTA2+1; + double cx = RBSR_R2G(cx_), cy = RBSR_R2G(cy_); grbs_point_t *pt, *best = NULL; grbs_rtree_it_t it; grbs_rtree_box_t bbox; @@ -216,6 +216,16 @@ return best; } +grbs_point_t *rbsr_find_point_by_center(rbsr_map_t *rbs, rnd_coord_t cx, rnd_coord_t cy) +{ + return rbsr_find_point_(rbs, cx, cy, FIND_PT_DELTA2+1); +} + +grbs_point_t *rbsr_find_point(rbsr_map_t *rbs, rnd_coord_t cx, rnd_coord_t cy) +{ + return rbsr_find_point_(rbs, cx, cy, RND_COORD_MAX); +} + static int map_2nets_intermediate(rbsr_map_t *rbs, grbs_2net_t *tn, pcb_2netmap_obj_t *prev, pcb_2netmap_obj_t *obj, grbs_arc_t **prevarc, grbs_line_t **prevline) { grbs_arc_t *a; Index: trunk/src_plugins/rbs_routing/map.h =================================================================== --- trunk/src_plugins/rbs_routing/map.h (revision 38821) +++ trunk/src_plugins/rbs_routing/map.h (revision 38822) @@ -40,6 +40,10 @@ /*** utility ***/ -/* Return the point that's close enough to cx;cy or NULL if nothing is close */ +/* Return the point whose center point is close enough to cx;cy or NULL if + nothing is close */ grbs_point_t *rbsr_find_point_by_center(rbsr_map_t *rbs, rnd_coord_t cx, rnd_coord_t cy); +/* Return the point that is close enough to cx;cy or NULL if nothing is close */ +grbs_point_t *rbsr_find_point(rbsr_map_t *rbs, rnd_coord_t cx, rnd_coord_t cy); + Index: trunk/src_plugins/rbs_routing/seq.c =================================================================== --- trunk/src_plugins/rbs_routing/seq.c (revision 38821) +++ trunk/src_plugins/rbs_routing/seq.c (revision 38822) @@ -35,10 +35,14 @@ { grbs_point_t *end; - end = rbsr_find_point_by_center(&rbsq->map, tx, ty); + rnd_trace("consider: "); + + end = rbsr_find_point(&rbsq->map, tx, ty); if (end != NULL) { - + rnd_trace("found pt\n"); } + else + rnd_trace("nope\n"); return -1; }