diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 635314d28f..de7c3b23c0 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2026,7 +2026,7 @@ void CONNECTION_GRAPH::processSubGraphs() subgraph->m_bus_neighbors[member].insert( candidate ); candidate->m_bus_parents[member].insert( subgraph ); } - else if( connection->Type() == candidate->m_driver_connection->Type() ) + else if( !connection->IsBus() || connection->Type() == candidate->m_driver_connection->Type() ) { wxLogTrace( ConnTrace, wxS( "%lu (%s) absorbs neighbor %lu (%s)" ), subgraph->m_code, connection->Name(), @@ -2184,18 +2184,19 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function* a if( !secondary_is_global && candidate->m_sheet != subgraph->m_sheet ) continue; - SCH_CONNECTION* conn = candidate->m_driver_connection; - - if( conn->Name() == secondary_name ) + for( SCH_ITEM* candidate_driver : candidate->m_drivers ) { - wxLogTrace( ConnTrace, wxS( "Global %lu (%s) promoted to %s" ), - candidate->m_code, conn->Name(), - subgraph->m_driver_connection->Name() ); + if( candidate->GetNameForDriver( candidate_driver ) == secondary_name ) + { + wxLogTrace( ConnTrace, wxS( "Global %lu (%s) promoted to %s" ), + candidate->m_code, candidate->m_driver_connection->Name(), + subgraph->m_driver_connection->Name() ); - conn->Clone( *subgraph->m_driver_connection ); + candidate->m_driver_connection->Clone( *subgraph->m_driver_connection ); - candidate->m_dirty = false; - propagateToNeighbors( candidate, false ); + candidate->m_dirty = false; + propagateToNeighbors( candidate, false ); + } } } } diff --git a/qa/data/eeschema/issue18092/issue18092.kicad_pro b/qa/data/eeschema/issue18092/issue18092.kicad_pro new file mode 100644 index 0000000000..7b496148b4 --- /dev/null +++ b/qa/data/eeschema/issue18092/issue18092.kicad_pro @@ -0,0 +1,1293 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.05, + "copper_line_width": 0.2, + "copper_text_italic": false, + "copper_text_size_h": 0.8, + "copper_text_size_v": 1.6, + "copper_text_thickness": 0.2, + "copper_text_upright": false, + "courtyard_line_width": 0.05, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.1, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.1, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 8.0, + "height": 2.0, + "width": 10.0 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 0.8, + "silk_text_size_v": 1.6, + "silk_text_thickness": 0.2, + "silk_text_upright": false, + "zones": { + "45_degree_only": false, + "min_clearance": 0.25 + } + }, + "diff_pair_dimensions": [ + { + "gap": 0.0, + "via_gap": 0.0, + "width": 0.0 + } + ], + "drc_exclusions": [], + "meta": { + "filename": "board_design_settings.json", + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "error", + "hole_clearance": "error", + "hole_near_hole": "error", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "error", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "text_height": "warning", + "text_thickness": "warning", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rule_severitieslegacy_courtyards_overlap": true, + "rule_severitieslegacy_no_courtyard_defined": false, + "rules": { + "allow_blind_buried_vias": false, + "allow_microvias": false, + "max_error": 0.005, + "min_clearance": 0.2, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.025, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.2, + "min_microvia_drill": 0.1, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.8, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.2, + "min_track_width": 0.2, + "min_via_annular_width": 0.05, + "min_via_diameter": 0.5, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [ + 0.0, + 0.15, + 0.17, + 0.2, + 0.25, + 0.3, + 0.4, + 0.5, + 0.6, + 0.8, + 1.0, + 1.2, + 1.6, + 1.8, + 2.0, + 2.4, + 3.0, + 4.0, + 5.0, + 6.0, + 8.0, + 10.0 + ], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [ + { + "diameter": 0.0, + "drill": 0.0 + }, + { + "diameter": 0.5, + "drill": 0.15 + }, + { + "diameter": 0.6, + "drill": 0.2 + }, + { + "diameter": 0.6, + "drill": 0.25 + }, + { + "diameter": 0.8, + "drill": 0.4 + }, + { + "diameter": 1.0, + "drill": 0.6 + }, + { + "diameter": 1.2, + "drill": 0.6 + }, + { + "diameter": 1.2, + "drill": 0.8 + }, + { + "diameter": 1.6, + "drill": 0.8 + }, + { + "diameter": 2.0, + "drill": 1.0 + }, + { + "diameter": 3.0, + "drill": 2.0 + }, + { + "diameter": 4.0, + "drill": 2.0 + }, + { + "diameter": 6.0, + "drill": 4.0 + }, + { + "diameter": 8.0, + "drill": 5.0 + }, + { + "diameter": 10.0, + "drill": 6.0 + } + ], + "zones_allow_external_fillets": false, + "zones_use_no_outline": true + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_presets": [ + { + "activeLayer": -2, + "layers": [ + 0, + 3, + 4, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "name": "uCV6", + "renderLayers": [ + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 150, + 151, + 152, + 153, + 154, + 155, + 157, + 158, + 159, + 160, + 161 + ] + }, + { + "activeLayer": -2, + "layers": [ + 0, + 3, + 4, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 42, + 43, + 44, + 45, + 46, + 47 + ], + "name": "uCV6_lite", + "renderLayers": [ + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 150, + 151, + 152, + 153, + 154, + 155, + 157, + 158, + 159, + 160, + 161 + ] + }, + { + "activeLayer": -2, + "layers": [ + 0, + 3, + 4, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 44, + 45 + ], + "name": "uCV6_lite2", + "renderLayers": [ + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 150, + 151, + 152, + 153, + 154, + 155, + 157, + 158, + 159, + 160, + 161 + ] + }, + { + "activeLayer": -2, + "layers": [ + 0, + 3, + 4, + 32, + 33, + 34, + 35, + 38, + 39, + 44, + 45 + ], + "name": "uCV6_lite3", + "renderLayers": [ + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 150, + 151, + 152, + 153, + 154, + 155, + 157, + 158, + 159, + 160, + 161 + ] + } + ], + "viewports": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "conflicting_netclasses": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "simulation_model_issue": "error", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "issue18092.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.15, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "A", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.15, + "via_diameter": 0.5, + "via_drill": 0.15, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.15, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "B", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.15, + "via_diameter": 0.6, + "via_drill": 0.2, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.17, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "C", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.17, + "via_diameter": 0.6, + "via_drill": 0.25, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "D", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "via_diameter": 0.6, + "via_drill": 0.25, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "E", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.25, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "F", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.4, + "via_diameter": 1.0, + "via_drill": 0.6, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "G", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.6, + "via_diameter": 1.0, + "via_drill": 0.6, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "H", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.8, + "via_diameter": 1.2, + "via_drill": 0.8, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "I", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 1.2, + "via_diameter": 1.6, + "via_drill": 0.8, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "J", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 1.6, + "via_diameter": 2.0, + "via_drill": 1.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "K", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 1.8, + "via_diameter": 2.0, + "via_drill": 1.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "L", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 2.0, + "via_diameter": 2.0, + "via_drill": 1.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "M", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 3.0, + "via_diameter": 3.0, + "via_drill": 2.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "N", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 4.0, + "via_diameter": 4.0, + "via_drill": 2.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.3, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "O", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 6.0, + "via_diameter": 6.0, + "via_drill": 4.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.4, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "P", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 8.0, + "via_diameter": 8.0, + "via_drill": 5.0, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.4, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Q", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 10.0, + "via_diameter": 10.0, + "via_drill": 6.0, + "wire_width": 6 + } + ], + "meta": { + "version": 3 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "plot": "PCB/", + "pos_files": "Fab/", + "specctra_dsn": "", + "step": "", + "svg": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "bom_export_filename": "", + "bom_fmt_presets": [], + "bom_fmt_settings": { + "field_delimiter": ",", + "keep_line_breaks": false, + "keep_tabs": false, + "name": "CSV", + "ref_delimiter": ",", + "ref_range_delimiter": "", + "string_delimiter": "\"" + }, + "bom_presets": [ + { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "#", + "name": "${ITEM_NUMBER}", + "show": true + }, + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": true, + "label": "Datasheet", + "name": "Datasheet", + "show": true + }, + { + "group_by": true, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Description", + "name": "Description", + "show": true + }, + { + "group_by": true, + "label": "Part_No", + "name": "Part_No", + "show": true + }, + { + "group_by": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "name": "Main", + "sort_asc": true, + "sort_field": "${ITEM_NUMBER}" + } + ], + "bom_settings": { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "#", + "name": "${ITEM_NUMBER}", + "show": true + }, + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": true, + "label": "Datasheet", + "name": "Datasheet", + "show": true + }, + { + "group_by": true, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Description", + "name": "Description", + "show": true + }, + { + "group_by": true, + "label": "Part_No", + "name": "Part_No", + "show": true + }, + { + "group_by": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "name": "", + "sort_asc": true, + "sort_field": "${ITEM_NUMBER}" + }, + "connection_grid_size": 50.0, + "drawing": { + "dashed_lines_dash_length_ratio": 12.0, + "dashed_lines_gap_length_ratio": 3.0, + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.25, + "operating_point_overlay_i_precision": 3, + "operating_point_overlay_i_range": "~A", + "operating_point_overlay_v_precision": 3, + "operating_point_overlay_v_range": "~V", + "overbar_offset_ratio": 1.23, + "pin_symbol_size": 0.0, + "text_offset_ratio": 0.08 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "ngspice": { + "fix_include_paths": true, + "fix_passive_vals": false, + "meta": { + "version": 0 + }, + "model_mode": 0, + "workbook_filename": "" + }, + "page_layout_descr_file": "/mnt/int_dataC/Sync/uC_V6/Kicad/LIB/Pages/vide.kicad_wks", + "plot_directory": "", + "spice_adjust_passive_values": false, + "spice_current_sheet_as_root": false, + "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, + "spice_save_all_currents": false, + "spice_save_all_dissipations": false, + "spice_save_all_voltages": false, + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "617edc57-1dbf-4296-b365-6d76f68a1c0f", + "Root" + ], + [ + "a366c673-60aa-4d10-a4e6-ea317da8a798", + "sub_18092" + ] + ], + "text_variables": {} +} diff --git a/qa/data/eeschema/issue18092/issue18092.kicad_sch b/qa/data/eeschema/issue18092/issue18092.kicad_sch new file mode 100644 index 0000000000..4169918d6e --- /dev/null +++ b/qa/data/eeschema/issue18092/issue18092.kicad_sch @@ -0,0 +1,259 @@ +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "617edc57-1dbf-4296-b365-6d76f68a1c0f") + (paper "A4") + (lib_symbols + (symbol "0_Power:3V3_MM" + (power) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "3V3_MM" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "POWER, PWR" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "3V3_MM_0_1" + (polyline + (pts + (xy 0 0) (xy 0 1.27) + ) + (stroke + (width 0.1778) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.635 1.27) (xy 0.635 1.27) (xy 0 2.54) (xy -0.635 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "3V3_MM_1_1" + (pin power_in line + (at 0 0 90) + (length 0) hide + (name "3V3_MM" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + ) + (global_label "AOP_VCC" + (shape tri_state) + (at 73.66 13.97 0) + (fields_autoplaced yes) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + (uuid "21589963-6016-46c8-b57e-7724f9c99970") + (property "Intersheetrefs" "${INTERSHEET_REFS}" + (at 85.2288 13.97 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + (property "Références Inter-Feuilles" "${INTERSHEET_REFS}" + (at 73.66 15.8052 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + ) + (symbol + (lib_id "0_Power:3V3_MM") + (at 73.66 13.97 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "cb3ce4bd-6991-4e3e-b715-a5a49f5b8b78") + (property "Reference" "#PWR013" + (at 77.47 13.97 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "3V3_MM" + (at 70.358 13.97 90) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 73.66 13.97 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 73.66 13.97 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Description" "" + (at 73.66 13.97 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "a76fe4e2-c21a-42f7-ac21-158f59e7ac90") + ) + (instances + (project "UCV6_P_Screen" + (path "/617edc57-1dbf-4296-b365-6d76f68a1c0f" + (reference "#PWR013") + (unit 1) + ) + ) + ) + ) + (sheet + (at 64.77 27.94) + (size 12.7 10.16) + (fields_autoplaced yes) + (stroke + (width 0.1524) + (type solid) + ) + (fill + (color 0 0 0 0.0000) + ) + (uuid "a366c673-60aa-4d10-a4e6-ea317da8a798") + (property "Sheetname" "sub_18092" + (at 64.77 27.2284 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left bottom) + ) + ) + (property "Sheetfile" "sub_18092.kicad_sch" + (at 64.77 38.6846 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left top) + ) + ) + (instances + (project "UCV6_P_Screen" + (path "/617edc57-1dbf-4296-b365-6d76f68a1c0f" + (page "39") + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) +) diff --git a/qa/data/eeschema/issue18092/sub_18092.kicad_sch b/qa/data/eeschema/issue18092/sub_18092.kicad_sch new file mode 100644 index 0000000000..0f13b05cc0 --- /dev/null +++ b/qa/data/eeschema/issue18092/sub_18092.kicad_sch @@ -0,0 +1,516 @@ +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "468691ae-fbea-486a-acab-abdd40c402ea") + (paper "A4") + (lib_symbols + (symbol "0_Power:3V3_MM" + (power) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "3V3_MM" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Description" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "POWER, PWR" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "3V3_MM_0_1" + (polyline + (pts + (xy 0 0) (xy 0 1.27) + ) + (stroke + (width 0.1778) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.635 1.27) (xy 0.635 1.27) (xy 0 2.54) (xy -0.635 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "3V3_MM_1_1" + (pin power_in line + (at 0 0 90) + (length 0) hide + (name "3V3_MM" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "Connector:TestPoint" + (pin_numbers hide) + (pin_names + (offset 0.762) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "TP" + (at 0 6.858 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "TestPoint" + (at 0 5.08 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 5.08 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 5.08 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "test point" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "test point tp" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "Pin* Test*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "TestPoint_0_1" + (circle + (center 0 3.302) + (radius 0.762) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "TestPoint_1_1" + (pin passive line + (at 0 0 90) + (length 2.54) + (name "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + ) + (global_label "AOP_VCC" + (shape tri_state) + (at 50.8 64.77 0) + (fields_autoplaced yes) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + (uuid "5a21f415-1360-4670-bcce-17448a333e36") + (property "Intersheetrefs" "${INTERSHEET_REFS}" + (at 62.3688 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + (property "Références Inter-Feuilles" "${INTERSHEET_REFS}" + (at 50.8 66.6052 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + ) + (global_label "MM_SCREEN_CAP_VCC" + (shape tri_state) + (at 35.56 64.77 180) + (fields_autoplaced yes) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + (uuid "8100a8a1-f746-4da7-b635-14a04ad989ee") + (property "Intersheetrefs" "${INTERSHEET_REFS}" + (at 11.8357 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + (hide yes) + ) + ) + (property "Références Inter-Feuilles" "${INTERSHEET_REFS}" + (at 35.56 66.6052 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + (hide yes) + ) + ) + ) + (global_label "MM_SCREEN_CAP_VCC" + (shape tri_state) + (at 38.1 81.28 0) + (fields_autoplaced yes) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + (uuid "e9fabeee-1c39-47b3-8ca5-3b7e259ede66") + (property "Intersheetrefs" "${INTERSHEET_REFS}" + (at 61.8243 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + (property "Références Inter-Feuilles" "${INTERSHEET_REFS}" + (at 38.1 83.1152 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + (hide yes) + ) + ) + ) + (symbol + (lib_id "Connector:TestPoint") + (at 50.8 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "694a310f-f39f-4032-bf7f-6fee3672a5d3") + (property "Reference" "TP2" + (at 53.34 60.1979 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "TestPoint" + (at 53.34 62.7379 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 55.88 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 55.88 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "test point" + (at 50.8 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "c6e8886c-1a06-4142-8859-6f1b6f3e51ac") + ) + (instances + (project "UCV6_P_Screen" + (path "/617edc57-1dbf-4296-b365-6d76f68a1c0f/a366c673-60aa-4d10-a4e6-ea317da8a798" + (reference "TP2") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Connector:TestPoint") + (at 35.56 64.77 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "a86f8f42-2efa-436c-b423-a04b69d9e050") + (property "Reference" "TP1" + (at 38.1 60.1979 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "TestPoint" + (at 38.1 62.7379 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 40.64 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 40.64 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "test point" + (at 35.56 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "0ba270a4-888e-4a40-9f1a-6a476f6825c4") + ) + (instances + (project "UCV6_P_Screen" + (path "/617edc57-1dbf-4296-b365-6d76f68a1c0f/a366c673-60aa-4d10-a4e6-ea317da8a798" + (reference "TP1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "0_Power:3V3_MM") + (at 38.1 81.28 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "c21f5b8c-5d37-4dc9-8550-7b3b9ab0ac8e") + (property "Reference" "#PWR0957" + (at 41.91 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "3V3_MM" + (at 34.798 81.28 90) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 38.1 81.28 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 38.1 81.28 0) + (effects + (font + (size 1.524 1.524) + ) + (hide yes) + ) + ) + (property "Description" "" + (at 38.1 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "01775cdd-034e-434f-9038-8228a32df11d") + ) + (instances + (project "UCV6_P_Screen" + (path "/617edc57-1dbf-4296-b365-6d76f68a1c0f/a366c673-60aa-4d10-a4e6-ea317da8a798" + (reference "#PWR0957") + (unit 1) + ) + ) + ) + ) +) diff --git a/qa/tests/eeschema/CMakeLists.txt b/qa/tests/eeschema/CMakeLists.txt index b20a455360..6b5c8c50df 100644 --- a/qa/tests/eeschema/CMakeLists.txt +++ b/qa/tests/eeschema/CMakeLists.txt @@ -62,6 +62,7 @@ set( QA_EESCHEMA_SRCS erc/test_erc_label_multiple_wires.cpp erc/test_erc_unconnected_wire_endpoints.cpp + test_connectivity_algo.cpp test_eagle_plugin.cpp test_junction_helpers.cpp test_lib_part.cpp diff --git a/qa/tests/eeschema/test_connectivity_algo.cpp b/qa/tests/eeschema/test_connectivity_algo.cpp new file mode 100644 index 0000000000..8ca627344e --- /dev/null +++ b/qa/tests/eeschema/test_connectivity_algo.cpp @@ -0,0 +1,64 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2024 KiCad Developers, see AUTHORS.TXT for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * https://www.gnu.org/licenses/gpl-3.0.en.html + * or you may search the http://www.gnu.org website for the version 32 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include +#include + +#include +#include +#include +#include +#include +#include + +struct CONNECTIVITY_TEST_FIXTURE +{ + CONNECTIVITY_TEST_FIXTURE() : + m_settingsManager( true /* headless */ ) + { } + + SETTINGS_MANAGER m_settingsManager; + std::unique_ptr m_schematic; +}; + +BOOST_FIXTURE_TEST_CASE( CheckNetCounts, CONNECTIVITY_TEST_FIXTURE ) +{ + LOCALE_IO dummy; + + std::vector> tests = + { + { "issue18092/issue18092", 1 } + }; + + for( auto&[ name, nets] : tests ) + { + KI_TEST::LoadSchematic( m_settingsManager, name, m_schematic ); + + SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph(); + + BOOST_CHECK( nets == graph->GetNetMap().size() ); + + } +} \ No newline at end of file diff --git a/qa/tests/eeschema/test_incremental_netlister.cpp b/qa/tests/eeschema/test_incremental_netlister.cpp index dc7ac1c004..ed24fa7363 100644 --- a/qa/tests/eeschema/test_incremental_netlister.cpp +++ b/qa/tests/eeschema/test_incremental_netlister.cpp @@ -32,9 +32,9 @@ #include #include -struct INCREMENTAL_NETLIST_TEST_FIXTURE +struct CONNECTIVITY_TEST_FIXTURE { - INCREMENTAL_NETLIST_TEST_FIXTURE() : + CONNECTIVITY_TEST_FIXTURE() : m_settingsManager( true /* headless */ ) { } @@ -42,7 +42,7 @@ struct INCREMENTAL_NETLIST_TEST_FIXTURE std::unique_ptr m_schematic; }; -BOOST_FIXTURE_TEST_CASE( RemoveAddItems, INCREMENTAL_NETLIST_TEST_FIXTURE ) +BOOST_FIXTURE_TEST_CASE( RemoveAddItems, CONNECTIVITY_TEST_FIXTURE ) { LOCALE_IO dummy;