private boolean via_try_snap_smd_center(int p_layer){
  ItemSelectionFilter selection_filter=new ItemSelectionFilter(ItemSelectionChoice.PINS);
  Collection<BrdItem> picked_items=r_board.pick_items(prev_corner,p_layer,selection_filter);
  BrdAbitPin found_smd_pin=null;
  for (  BrdItem curr_item : picked_items) {
    if (!(curr_item instanceof BrdAbitPin))     continue;
    BrdAbitPin a_pin=(BrdAbitPin)curr_item;
    if (!a_pin.shares_net_no(net_nos))     continue;
    if (a_pin.first_layer() == p_layer && a_pin.last_layer() == p_layer) {
      found_smd_pin=a_pin;
      break;
    }
  }
  if (found_smd_pin == null)   return false;
  PlaPointInt pin_center=found_smd_pin.center_get();
  if (itera_connect(prev_corner,pin_center)) {
    prev_corner=pin_center;
  }
  return true;
}

private boolean via_try_snap_smd_center ( int p_layer ) { ItemSelectionFilter selection_filter = new ItemSelectionFilter ( ItemSelectionChoice . PINS ) ; Collection < BrdItem > picked_items = r_board . pick_items ( prev_corner , p_layer , selection_filter ) ; BrdAbitPin found_smd_pin = null ; for ( BrdItem curr_item : picked_items ) { if ( ! ( curr_item instanceof BrdAbitPin ) ) continue ; BrdAbitPin a_pin = ( BrdAbitPin ) curr_item ; if ( ! a_pin . shares_net_no ( net_nos ) ) continue ; if ( a_pin . first_layer ( ) == p_layer && a_pin . last_layer ( ) == p_layer ) { found_smd_pin = a_pin ; break ; } } if ( found_smd_pin == null ) return false ; PlaPointInt pin_center = found_smd_pin . center_get ( ) ; if ( itera_connect ( prev_corner , pin_center ) ) { prev_corner = pin_center ; } return true ; }
snaps to the center of an smd pin , if the location location on p_layer is inside an smd pin of the own net ,
