Index: trunk/src_plugins/lib_netmap/map_2nets.c =================================================================== --- trunk/src_plugins/lib_netmap/map_2nets.c (revision 34949) +++ trunk/src_plugins/lib_netmap/map_2nets.c (revision 34950) @@ -41,7 +41,7 @@ pcb_qry_netseg_len_t *seg; pcb_any_obj_t **o; long n; - pcb_2netmap_seg_t *ns; + pcb_2netmap_iseg_t *ns; if ((layer != NULL) && (pcb_layer_flags_(layer) & PCB_LYT_COPPER) == 0) @@ -54,7 +54,7 @@ if (seg == NULL) return; - ns = malloc(sizeof(pcb_2netmap_seg_t)); + ns = malloc(sizeof(pcb_2netmap_iseg_t)); ns->seg = seg; ns->net = NULL; @@ -108,6 +108,7 @@ htpp_init(&map->o2n, ptrhash, ptrkeyeq); + /* map segments using query's netlen mapper */ pcb_loop_all(PCB, map, NULL, /* layer */ list_line_cb, @@ -119,6 +120,9 @@ list_pstk_cb ); + /* the result is really a graph because of junctions; search random paths + from terminal to terminal (junctions resolved into overlaps) */ + pcb_qry_uninit(&ec); return -1; Index: trunk/src_plugins/lib_netmap/map_2nets.h =================================================================== --- trunk/src_plugins/lib_netmap/map_2nets.h (revision 34949) +++ trunk/src_plugins/lib_netmap/map_2nets.h (revision 34950) @@ -34,15 +34,27 @@ PCB_2NETMAPCTRL_RATS = 1 /* include rat lines */ } pcb_2netmap_control_t; -typedef struct pcb_2netmap_seg_s { +typedef struct pcb_2netmap_iseg_s { pcb_qry_netseg_len_t *seg; pcb_net_t *net; unsigned shorted:1; /* set if the segment connects two different nets */ -} pcb_2netmap_seg_t; + unsigned used:1; /* already part of an output segment */ +} pcb_2netmap_iseg_t; +typedef union pcb_2netmap_obj_s { + pcb_arc_t arc; + pcb_line_t line; +} pcb_2netmap_obj_t; + +typedef struct pcb_2netmap_oseg_s { + vtp0_t *objs; /* of pcb_2netmap_obj_t ; these are not real board objects, they are just copies for the fields */ + pcb_net_t *net; + unsigned shorted:1; /* set if the segment connects two different nets */ +} pcb_2netmap_oseg_t; + typedef struct pcb_2netmap_s { pcb_2netmap_control_t ctrl; - htpp_t o2n; /* of (pcb_2netmap_seg_t *); tells the net for an object */ + htpp_t o2n; /* of (pcb_2netmap_iseg_t *); tells the net for an object */ /* internal */ pcb_qry_exec_t *ec;