Trace( int p_layer, int p_half_width, int[] p_net_no_arr, int p_clearance_type, int p_id_no, int p_group_no, FixedState p_fixed_state, BasicBoard p_board) { super(p_net_no_arr, p_clearance_type, p_id_no, p_group_no, p_fixed_state, p_board); half_width = p_half_width; p_layer = Math.max(p_layer, 0); if (p_board != null) { p_layer = Math.min(p_layer, p_board.get_layer_count() - 1); } layer = p_layer; }
private static boolean via_exists( IntPoint p_location, library.Padstack p_padstack, int[] p_net_no_arr, board.BasicBoard p_board) { ItemSelectionFilter filter = new ItemSelectionFilter(ItemSelectionFilter.SelectableChoices.VIAS); int from_layer = p_padstack.from_layer(); int to_layer = p_padstack.to_layer(); Collection<Item> picked_items = p_board.pick_items(p_location, p_padstack.from_layer(), filter); for (Item curr_item : picked_items) { Via curr_via = (Via) curr_item; if (curr_via.nets_equal(p_net_no_arr) && curr_via.get_center().equals(p_location) && curr_via.first_layer() == from_layer && curr_via.last_layer() == to_layer) { return true; } } return false; }