private boolean connect_to_target(PlaPointInt p_from_point){
  if (nearest_target_item != null && target_set != null && !target_set.contains(nearest_target_item)) {
    nearest_target_item=null;
  }
  if (nearest_target_item == null || !nearest_target_item.shares_net_no(net_nos)) {
    return false;
  }
  boolean route_completed=false;
  PlaPointInt connection_point=null;
  if (nearest_target_item instanceof BrdAbit) {
    BrdAbit target=(BrdAbit)nearest_target_item;
    connection_point=target.center_get();
  }
 else   if (nearest_target_item instanceof BrdTracep) {
    return r_board.connect_to_trace(p_from_point,(BrdTracep)nearest_target_item,pen_half_width_arr[layer_active_no],clearance_class);
  }
 else   if (nearest_target_item instanceof BrdAreaConduction) {
    connection_point=p_from_point;
  }
  if (connection_point != null) {
    route_completed=itera_connect(p_from_point,connection_point);
  }
  return route_completed;
}

private boolean connect_to_target ( PlaPointInt p_from_point ) { if ( nearest_target_item != null && target_set != null && ! target_set . contains ( nearest_target_item ) ) { nearest_target_item = null ; } if ( nearest_target_item == null || ! nearest_target_item . shares_net_no ( net_nos ) ) { return false ; } boolean route_completed = false ; PlaPointInt connection_point = null ; if ( nearest_target_item instanceof BrdAbit ) { BrdAbit target = ( BrdAbit ) nearest_target_item ; connection_point = target . center_get ( ) ; } else if ( nearest_target_item instanceof BrdTracep ) { return r_board . connect_to_trace ( p_from_point , ( BrdTracep ) nearest_target_item , pen_half_width_arr [ layer_active_no ] , clearance_class ) ; } else if ( nearest_target_item instanceof BrdAreaConduction ) { connection_point = p_from_point ; } if ( connection_point != null ) { route_completed = itera_connect ( p_from_point , connection_point ) ; } return route_completed ; }
if p_from_point is already on a target item , a connection to the target is made and true returned .
