From 72d3fe2a173ba3d7dd6d69d9b7c398389dfdf6bb Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Sat, 17 Feb 2024 16:01:27 -0300 Subject: [PATCH] [Tests][KiCad 8] Adapted the ERC grid test --- .../board_samples/kicad_8/off-grid.kicad_pro | 529 ++++++++++++++++++ .../board_samples/kicad_8/off-grid.kicad_sch | 328 ++++++++--- 2 files changed, 764 insertions(+), 93 deletions(-) create mode 100644 tests/board_samples/kicad_8/off-grid.kicad_pro diff --git a/tests/board_samples/kicad_8/off-grid.kicad_pro b/tests/board_samples/kicad_8/off-grid.kicad_pro new file mode 100644 index 00000000..54db376e --- /dev/null +++ b/tests/board_samples/kicad_8/off-grid.kicad_pro @@ -0,0 +1,529 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "board_outline_line_width": 0.19999999999999998, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "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.09999999999999999, + "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.09999999999999999, + "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": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.12, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "45_degree_only": false, + "min_clearance": 1.0 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "filename": "board_design_settings.json", + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "copper_edge_clearance": "error", + "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_type_mismatch": "error", + "hole_clearance": "error", + "hole_near_hole": "error", + "invalid_outline": "error", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "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_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "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", + "zone_has_empty_net": "error", + "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.0, + "min_copper_edge_clearance": 0.09999999999999999, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_silk_clearance": 0.0, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.09999999999999999, + "min_via_annular_width": 0.049999999999999996, + "min_via_diameter": 0.35, + "use_height_for_length_calcs": true + }, + "track_widths": [ + 0.0, + 0.3, + 0.5, + 2.0 + ], + "via_dimensions": [ + { + "diameter": 0.0, + "drill": 0.0 + }, + { + "diameter": 0.8, + "drill": 0.4 + }, + { + "diameter": 1.4, + "drill": 0.8 + } + ], + "zones_allow_external_fillets": false, + "zones_use_no_outline": true + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_presets": [], + "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": "off-grid.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.25, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6 + } + ], + "meta": { + "version": 3 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "plot": "", + "pos_files": "", + "specctra_dsn": "", + "step": "", + "svg": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "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": [], + "bom_settings": { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": false, + "label": "Datasheet", + "name": "Datasheet", + "show": true + }, + { + "group_by": false, + "label": "Footprint", + "name": "Footprint", + "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": "Grouped By Value", + "sort_asc": true, + "sort_field": "Reference" + }, + "connection_grid_size": 25.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": "", + "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": [ + [ + "6f532429-0896-42e9-8f7d-55f1e3ab1171", + "Root" + ] + ], + "text_variables": {} +} diff --git a/tests/board_samples/kicad_8/off-grid.kicad_sch b/tests/board_samples/kicad_8/off-grid.kicad_sch index 3e8fcec2..e521e76e 100644 --- a/tests/board_samples/kicad_8/off-grid.kicad_sch +++ b/tests/board_samples/kicad_8/off-grid.kicad_sch @@ -1,93 +1,235 @@ -(kicad_sch (version 20230121) (generator eeschema) - - (uuid 6f532429-0896-42e9-8f7d-55f1e3ab1171) - - (paper "A4") - - (lib_symbols - (symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) - (property "Reference" "R" (at 2.032 0 90) - (effects (font (size 1.27 1.27))) - ) - (property "Value" "R" (at 0 0 90) - (effects (font (size 1.27 1.27))) - ) - (property "Footprint" "" (at -1.778 0 90) - (effects (font (size 1.27 1.27)) hide) - ) - (property "Datasheet" "~" (at 0 0 0) - (effects (font (size 1.27 1.27)) hide) - ) - (property "ki_keywords" "R res resistor" (at 0 0 0) - (effects (font (size 1.27 1.27)) hide) - ) - (property "ki_description" "Resistor" (at 0 0 0) - (effects (font (size 1.27 1.27)) hide) - ) - (property "ki_fp_filters" "R_*" (at 0 0 0) - (effects (font (size 1.27 1.27)) hide) - ) - (symbol "R_0_1" - (rectangle (start -1.016 -2.54) (end 1.016 2.54) - (stroke (width 0.254) (type default)) - (fill (type none)) - ) - ) - (symbol "R_1_1" - (pin passive line (at 0 3.81 270) (length 1.27) - (name "~" (effects (font (size 1.27 1.27)))) - (number "1" (effects (font (size 1.27 1.27)))) - ) - (pin passive line (at 0 -3.81 90) (length 1.27) - (name "~" (effects (font (size 1.27 1.27)))) - (number "2" (effects (font (size 1.27 1.27)))) - ) - ) - ) - ) - - - - (wire (pts (xy 161.925 38.1) (xy 161.925 45.72)) - (stroke (width 0) (type default)) - (uuid 511cb90c-9c72-4b77-aff9-f6affb9d333a) - ) - (wire (pts (xy 165.735 38.1) (xy 161.925 38.1)) - (stroke (width 0) (type default)) - (uuid 659e802d-922c-460c-9d90-71ca26b9b1b0) - ) - (wire (pts (xy 161.925 45.72) (xy 165.735 45.72)) - (stroke (width 0) (type default)) - (uuid b365109d-87cc-4f98-affd-eaffb73c3dba) - ) - - (symbol (lib_id "Device:R") (at 165.735 41.91 0) (unit 1) - (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) - (uuid 08cbd42b-5f2a-4de7-b48e-3bd4b6c520d0) - (property "Reference" "R1" (at 168.275 41.275 0) - (effects (font (size 1.27 1.27)) (justify left)) - ) - (property "Value" "R" (at 168.275 43.815 0) - (effects (font (size 1.27 1.27)) (justify left)) - ) - (property "Footprint" "" (at 163.957 41.91 90) - (effects (font (size 1.27 1.27)) hide) - ) - (property "Datasheet" "~" (at 165.735 41.91 0) - (effects (font (size 1.27 1.27)) hide) - ) - (pin "1" (uuid 42622943-c02d-4a96-9a8b-08cf61caa6e6)) - (pin "2" (uuid 5a1dcc55-9ffd-4afd-aeaa-50f889f94480)) - (instances - (project "pp" - (path "/6f532429-0896-42e9-8f7d-55f1e3ab1171" - (reference "R1") (unit 1) - ) - ) - ) - ) - - (sheet_instances - (path "/" (page "1")) - ) -) +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "6f532429-0896-42e9-8f7d-55f1e3ab1171") + (paper "A4") + (lib_symbols + (symbol "Device:R" + (pin_numbers hide) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + ) + (wire + (pts + (xy 161.925 38.1) (xy 161.925 45.72) + ) + (stroke + (width 0) + (type default) + ) + (uuid "511cb90c-9c72-4b77-aff9-f6affb9d333a") + ) + (wire + (pts + (xy 165.735 38.1) (xy 161.925 38.1) + ) + (stroke + (width 0) + (type default) + ) + (uuid "659e802d-922c-460c-9d90-71ca26b9b1b0") + ) + (wire + (pts + (xy 161.925 45.72) (xy 165.735 45.72) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b365109d-87cc-4f98-affd-eaffb73c3dba") + ) + (symbol + (lib_id "Device:R") + (at 165.735 41.91 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "08cbd42b-5f2a-4de7-b48e-3bd4b6c520d0") + (property "Reference" "R1" + (at 168.275 41.275 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "R" + (at 168.275 43.815 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 163.957 41.91 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 165.735 41.91 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "" + (at 165.735 41.91 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "42622943-c02d-4a96-9a8b-08cf61caa6e6") + ) + (pin "2" + (uuid "5a1dcc55-9ffd-4afd-aeaa-50f889f94480") + ) + (instances + (project "off-grid" + (path "/6f532429-0896-42e9-8f7d-55f1e3ab1171" + (reference "R1") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) +) \ No newline at end of file