Index: trunk/src_plugins/rbs_routing/map.c =================================================================== --- trunk/src_plugins/rbs_routing/map.c (revision 38737) +++ trunk/src_plugins/rbs_routing/map.c (revision 38738) @@ -124,6 +124,9 @@ { int res; + if (pcb_map_2nets_init(&dst->twonets, pcb) != 0) + return -1; + grbs_init(&dst->grbs); dst->pcb = pcb; dst->lid = lid; @@ -133,3 +136,12 @@ return res; } + +void rbsr_map_uninit(rbsr_map_t *dst) +{ + pcb_map_2nets_uninit(&dst->twonets); + dst->pcb = NULL; + dst->lid = -1; + TODO("free the locally allocated map"); +} + Index: trunk/src_plugins/rbs_routing/map.h =================================================================== --- trunk/src_plugins/rbs_routing/map.h (revision 38737) +++ trunk/src_plugins/rbs_routing/map.h (revision 38738) @@ -1,5 +1,7 @@ #include "layer.h" +#include "../src_plugins/lib_netmap/map_2nets.h" + /* undo leftover from librnd's own rtree before including grbs' rtree */ #undef RTR #undef RTRU @@ -14,6 +16,8 @@ rnd_layer_id_t lid; grbs_t grbs; + pcb_2netmap_t twonets; + } rbsr_map_t; /* conversion between rnd coords and grbs coords forth and back; use micrometers for grbs */ @@ -21,4 +25,5 @@ #define RBSR_G2R(v) ((rnd_coord_t)rnd_round((v)*1000.0)) int rbsr_map_pcb(rbsr_map_t *dst, pcb_board_t *pcb, rnd_layer_id_t lid); +void rbsr_map_uninit(rbsr_map_t *dst);