public final TreeSet<BrdItem> find_overlap_items_with_clearance(ShapeTile p_shape,int p_layer,NetNosList p_ignore_net_nos,int p_clearance_class){
  TreeSet<BrdItem> result=new TreeSet<BrdItem>();
  Collection<AwtreeFindEntry> overlaps=find_overlap_tree_entries_with_clearance(p_shape,p_layer,p_ignore_net_nos,p_clearance_class);
  for (  AwtreeFindEntry curr_tentry : overlaps) {
    AwtreeObject curr_object=curr_tentry.object;
    if (!(curr_object instanceof BrdItem))     continue;
    result.add((BrdItem)curr_object);
  }
  return result;
}

public final TreeSet < BrdItem > find_overlap_items_with_clearance ( ShapeTile p_shape , int p_layer , NetNosList p_ignore_net_nos , int p_clearance_class ) { TreeSet < BrdItem > result = new TreeSet < BrdItem > ( ) ; Collection < AwtreeFindEntry > overlaps = find_overlap_tree_entries_with_clearance ( p_shape , p_layer , p_ignore_net_nos , p_clearance_class ) ; for ( AwtreeFindEntry curr_tentry : overlaps ) { AwtreeObject curr_object = curr_tentry . object ; if ( ! ( curr_object instanceof BrdItem ) ) continue ; result . add ( ( BrdItem ) curr_object ) ; } return result ; }
returns items , which overlap with p_shape on layer p_layer inclusive clearance . p_clearance_class is the index in the clearance matrix , which describes the required clearance restrictions to other items . the function may also return items which are nearly overlapping , but do not overlap with exact calculation . if p_layer < 0 , the layer is ignored .
