From 7d0c4371e527e23fca47e5fc070a8eee3e711e46 Mon Sep 17 00:00:00 2001 From: Mustafa Mulla Date: Mon, 16 Mar 2026 12:23:00 +0530 Subject: [PATCH 1/2] update repro to use circuit-json --- tests/assets/pinrow-rotated-inside-board.json | 2044 +++++++++++++++++ .../false-positive-component-outside.snap.svg | 2 +- .../false-positive-component-outside.test.tsx | 80 +- 3 files changed, 2049 insertions(+), 77 deletions(-) create mode 100644 tests/assets/pinrow-rotated-inside-board.json diff --git a/tests/assets/pinrow-rotated-inside-board.json b/tests/assets/pinrow-rotated-inside-board.json new file mode 100644 index 0000000..afb3b9f --- /dev/null +++ b/tests/assets/pinrow-rotated-inside-board.json @@ -0,0 +1,2044 @@ +[ + { + "type": "source_project_metadata", + "source_project_metadata_id": "source_project_metadata_0", + "software_used_string": "@tscircuit/core@0.0.1114" + }, + { + "type": "source_group", + "source_group_id": "source_group_0", + "is_subcircuit": true, + "was_automatically_named": true, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_0", + "name": "VBUS", + "pin_number": 1, + "port_hints": [ + "VBUS", + "pin1", + "1" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_1", + "name": "GND", + "pin_number": 2, + "port_hints": [ + "GND", + "pin2", + "2" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_2", + "name": "3V3", + "pin_number": 3, + "port_hints": [ + "3V3", + "pin3", + "3" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_3", + "name": "GP0", + "pin_number": 4, + "port_hints": [ + "GP0", + "pin4", + "4" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_4", + "name": "GP1", + "pin_number": 5, + "port_hints": [ + "GP1", + "pin5", + "5" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_5", + "name": "GP2", + "pin_number": 6, + "port_hints": [ + "GP2", + "pin6", + "6" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_6", + "name": "GP3", + "pin_number": 7, + "port_hints": [ + "GP3", + "pin7", + "7" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_7", + "name": "GP4", + "pin_number": 8, + "port_hints": [ + "GP4", + "pin8", + "8" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_8", + "name": "GP5", + "pin_number": 9, + "port_hints": [ + "GP5", + "pin9", + "9" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_9", + "name": "GP6", + "pin_number": 10, + "port_hints": [ + "GP6", + "pin10", + "10" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_10", + "name": "GP7", + "pin_number": 11, + "port_hints": [ + "GP7", + "pin11", + "11" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_11", + "name": "GP8", + "pin_number": 12, + "port_hints": [ + "GP8", + "pin12", + "12" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_12", + "name": "GP9", + "pin_number": 13, + "port_hints": [ + "GP9", + "pin13", + "13" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_13", + "name": "GP10", + "pin_number": 14, + "port_hints": [ + "GP10", + "pin14", + "14" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_14", + "name": "GP11", + "pin_number": 15, + "port_hints": [ + "GP11", + "pin15", + "15" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_15", + "name": "GP12", + "pin_number": 16, + "port_hints": [ + "GP12", + "pin16", + "16" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_16", + "name": "GP13", + "pin_number": 17, + "port_hints": [ + "GP13", + "pin17", + "17" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_17", + "name": "GP14", + "pin_number": 18, + "port_hints": [ + "GP14", + "pin18", + "18" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_18", + "name": "GP15", + "pin_number": 19, + "port_hints": [ + "GP15", + "pin19", + "19" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_19", + "name": "SWCLK", + "pin_number": 20, + "port_hints": [ + "SWCLK", + "pin20", + "20" + ], + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_component", + "source_component_id": "source_component_0", + "ftype": "simple_chip", + "name": "U2", + "source_group_id": "source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_20", + "name": "SWD", + "pin_number": 1, + "port_hints": [ + "SWD", + "pin1", + "1" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_21", + "name": "RUN", + "pin_number": 2, + "port_hints": [ + "RUN", + "pin2", + "2" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_22", + "name": "GP16", + "pin_number": 3, + "port_hints": [ + "GP16", + "pin3", + "3" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_23", + "name": "GP17", + "pin_number": 4, + "port_hints": [ + "GP17", + "pin4", + "4" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_24", + "name": "GP18", + "pin_number": 5, + "port_hints": [ + "GP18", + "pin5", + "5" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_25", + "name": "GP19", + "pin_number": 6, + "port_hints": [ + "GP19", + "pin6", + "6" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_26", + "name": "GP20", + "pin_number": 7, + "port_hints": [ + "GP20", + "pin7", + "7" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_27", + "name": "GP21", + "pin_number": 8, + "port_hints": [ + "GP21", + "pin8", + "8" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_28", + "name": "GP22", + "pin_number": 9, + "port_hints": [ + "GP22", + "pin9", + "9" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_29", + "name": "GP23", + "pin_number": 10, + "port_hints": [ + "GP23", + "pin10", + "10" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_30", + "name": "GP24", + "pin_number": 11, + "port_hints": [ + "GP24", + "pin11", + "11" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_31", + "name": "GP25", + "pin_number": 12, + "port_hints": [ + "GP25", + "pin12", + "12" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_32", + "name": "GP26", + "pin_number": 13, + "port_hints": [ + "GP26", + "pin13", + "13" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_33", + "name": "GP27", + "pin_number": 14, + "port_hints": [ + "GP27", + "pin14", + "14" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_34", + "name": "GP28", + "pin_number": 15, + "port_hints": [ + "GP28", + "pin15", + "15" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_35", + "name": "GP29", + "pin_number": 16, + "port_hints": [ + "GP29", + "pin16", + "16" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_36", + "name": "ADC_AVDD", + "pin_number": 17, + "port_hints": [ + "ADC_AVDD", + "pin17", + "17" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_37", + "name": "VREG_IN", + "pin_number": 18, + "port_hints": [ + "VREG_IN", + "pin18", + "18" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_38", + "name": "USB_DP", + "pin_number": 19, + "port_hints": [ + "USB_DP", + "pin19", + "19" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_port", + "source_port_id": "source_port_39", + "name": "USB_DM", + "pin_number": 20, + "port_hints": [ + "USB_DM", + "pin20", + "20" + ], + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_component", + "source_component_id": "source_component_1", + "ftype": "simple_chip", + "name": "U3", + "source_group_id": "source_group_0" + }, + { + "type": "source_board", + "source_board_id": "source_board_0", + "source_group_id": "source_group_0" + }, + { + "type": "schematic_component", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -16, + "y": 0 + }, + "rotation": 0, + "size": { + "width": 1.6, + "height": 0.8 + }, + "pin_spacing": 0.2, + "port_labels": { + "pin1": "VBUS", + "pin2": "GND", + "pin3": "3V3", + "pin4": "GP0", + "pin5": "GP1", + "pin6": "GP2", + "pin7": "GP3", + "pin8": "GP4", + "pin9": "GP5", + "pin10": "GP6", + "pin11": "GP7", + "pin12": "GP8", + "pin13": "GP9", + "pin14": "GP10", + "pin15": "GP11", + "pin16": "GP12", + "pin17": "GP13", + "pin18": "GP14", + "pin19": "GP15", + "pin20": "SWCLK" + }, + "source_component_id": "source_component_0", + "schematic_group_id": "schematic_group_0" + }, + { + "type": "schematic_text", + "schematic_text_id": "schematic_text_0", + "text": "", + "schematic_component_id": "schematic_component_0", + "anchor": "left", + "rotation": 0, + "position": { + "x": -16.8, + "y": -0.53 + }, + "color": "#006464", + "font_size": 0.18 + }, + { + "type": "schematic_text", + "schematic_text_id": "schematic_text_1", + "text": "U2", + "schematic_component_id": "schematic_component_0", + "anchor": "left", + "rotation": 0, + "position": { + "x": -16.8, + "y": 0.53 + }, + "color": "#006464", + "font_size": 0.18 + }, + { + "type": "schematic_component", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 16, + "y": 0 + }, + "rotation": 0, + "size": { + "width": 1.9000000000000001, + "height": 0.8 + }, + "pin_spacing": 0.2, + "port_labels": { + "pin1": "SWD", + "pin2": "RUN", + "pin3": "GP16", + "pin4": "GP17", + "pin5": "GP18", + "pin6": "GP19", + "pin7": "GP20", + "pin8": "GP21", + "pin9": "GP22", + "pin10": "GP23", + "pin11": "GP24", + "pin12": "GP25", + "pin13": "GP26", + "pin14": "GP27", + "pin15": "GP28", + "pin16": "GP29", + "pin17": "ADC_AVDD", + "pin18": "VREG_IN", + "pin19": "USB_DP", + "pin20": "USB_DM" + }, + "source_component_id": "source_component_1", + "schematic_group_id": "schematic_group_0" + }, + { + "type": "schematic_text", + "schematic_text_id": "schematic_text_2", + "text": "", + "schematic_component_id": "schematic_component_1", + "anchor": "left", + "rotation": 0, + "position": { + "x": 15.05, + "y": -0.53 + }, + "color": "#006464", + "font_size": 0.18 + }, + { + "type": "schematic_text", + "schematic_text_id": "schematic_text_3", + "text": "U3", + "schematic_component_id": "schematic_component_1", + "anchor": "left", + "rotation": 0, + "position": { + "x": 15.05, + "y": 0.53 + }, + "color": "#006464", + "font_size": 0.18 + }, + { + "type": "schematic_group", + "schematic_group_id": "schematic_group_0", + "is_subcircuit": true, + "subcircuit_id": "subcircuit_source_group_0", + "name": "unnamed_board1", + "center": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "schematic_component_ids": [], + "source_group_id": "source_group_0" + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_0", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -17.2, + "y": 0.2 + }, + "source_port_id": "source_port_0", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 1, + "true_ccw_index": 0, + "display_pin_label": "VBUS", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_1", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -17.2, + "y": 0 + }, + "source_port_id": "source_port_1", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 2, + "true_ccw_index": 1, + "display_pin_label": "GND", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_2", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -17.2, + "y": -0.2 + }, + "source_port_id": "source_port_2", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 3, + "true_ccw_index": 2, + "display_pin_label": "3V3", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_3", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -14.8, + "y": -0.2 + }, + "source_port_id": "source_port_3", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 4, + "true_ccw_index": 3, + "display_pin_label": "GP0", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_4", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -14.8, + "y": 0 + }, + "source_port_id": "source_port_4", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 5, + "true_ccw_index": 4, + "display_pin_label": "GP1", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_5", + "schematic_component_id": "schematic_component_0", + "center": { + "x": -14.8, + "y": 0.2 + }, + "source_port_id": "source_port_5", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 6, + "true_ccw_index": 5, + "display_pin_label": "GP2", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_6", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 14.65, + "y": 0.2 + }, + "source_port_id": "source_port_20", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 1, + "true_ccw_index": 0, + "display_pin_label": "SWD", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_7", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 14.65, + "y": 0 + }, + "source_port_id": "source_port_21", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 2, + "true_ccw_index": 1, + "display_pin_label": "RUN", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_8", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 14.65, + "y": -0.2 + }, + "source_port_id": "source_port_22", + "facing_direction": "left", + "distance_from_component_edge": 0.4, + "side_of_component": "left", + "pin_number": 3, + "true_ccw_index": 2, + "display_pin_label": "GP16", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_9", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 17.35, + "y": -0.2 + }, + "source_port_id": "source_port_23", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 4, + "true_ccw_index": 3, + "display_pin_label": "GP17", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_10", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 17.35, + "y": 0 + }, + "source_port_id": "source_port_24", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 5, + "true_ccw_index": 4, + "display_pin_label": "GP18", + "is_connected": false + }, + { + "type": "schematic_port", + "schematic_port_id": "schematic_port_11", + "schematic_component_id": "schematic_component_1", + "center": { + "x": 17.35, + "y": 0.2 + }, + "source_port_id": "source_port_25", + "facing_direction": "right", + "distance_from_component_edge": 0.4, + "side_of_component": "right", + "pin_number": 6, + "true_ccw_index": 5, + "display_pin_label": "GP19", + "is_connected": false + }, + { + "type": "pcb_component", + "pcb_component_id": "pcb_component_0", + "center": { + "x": -13.97, + "y": 0 + }, + "width": 1.5, + "height": 14.2, + "layer": "top", + "rotation": 90, + "source_component_id": "source_component_0", + "subcircuit_id": "subcircuit_source_group_0", + "do_not_place": false, + "obstructs_within_bounds": true, + "is_allowed_to_be_off_board": false, + "position_mode": "relative_to_group_anchor", + "positioned_relative_to_pcb_board_id": "pcb_board_0", + "display_offset_x": -13.97, + "display_offset_y": 0 + }, + { + "type": "pcb_component", + "pcb_component_id": "pcb_component_1", + "center": { + "x": 13.97, + "y": 0 + }, + "width": 1.5000000000000036, + "height": 14.2, + "layer": "top", + "rotation": 270, + "source_component_id": "source_component_1", + "subcircuit_id": "subcircuit_source_group_0", + "do_not_place": false, + "obstructs_within_bounds": true, + "is_allowed_to_be_off_board": false, + "position_mode": "relative_to_group_anchor", + "positioned_relative_to_pcb_board_id": "pcb_board_0", + "display_offset_x": 13.97, + "display_offset_y": 0 + }, + { + "type": "pcb_board", + "pcb_board_id": "pcb_board_0", + "source_board_id": "source_board_0", + "center": { + "x": 0, + "y": 0 + }, + "thickness": 1.4, + "num_layers": 2, + "width": 34, + "height": 42, + "material": "fr4" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_0", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_0", + "hole_diameter": 1, + "rect_pad_width": 1.5, + "rect_pad_height": 1.5, + "shape": "circular_hole_with_rect_pad", + "port_hints": [ + "unnamed_platedhole1", + "1" + ], + "x": -13.97, + "y": -6.35, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0", + "hole_offset_x": 0, + "hole_offset_y": 0, + "rect_border_radius": 0, + "rect_ccw_rotation": 90 + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_0", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": -6.35 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "VBUS", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_1", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_1", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole2", + "2" + ], + "x": -13.97, + "y": -3.8099999999999996, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_0", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": -3.8099999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_1", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": -3.8099999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_1", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": -3.8099999999999996 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GND", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_2", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_2", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole3", + "3" + ], + "x": -13.97, + "y": -1.2699999999999996, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_2", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": -1.2699999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_3", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": -1.2699999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_2", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": -1.2699999999999996 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "3V3", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_3", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_3", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole4", + "4" + ], + "x": -13.97, + "y": 1.2700000000000005, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_4", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 1.2700000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_5", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 1.2700000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_3", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": 1.2700000000000005 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP0", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_4", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_4", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole5", + "5" + ], + "x": -13.97, + "y": 3.8100000000000005, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_6", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 3.8100000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_7", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 3.8100000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_4", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": 3.8100000000000005 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP1", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_5", + "pcb_component_id": "pcb_component_0", + "pcb_port_id": "pcb_port_5", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole6", + "6" + ], + "x": -13.97, + "y": 6.35, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_8", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 6.35, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_9", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": -13.97, + "y": 6.35, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_5", + "anchor_alignment": "center", + "anchor_position": { + "x": -15.095, + "y": 6.35 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP2", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_6", + "anchor_alignment": "center", + "anchor_position": { + "x": -16.51, + "y": 1.5553014349171386e-16 + }, + "font": "tscircuit2024", + "font_size": 0.7, + "layer": "top", + "text": "U2", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_0", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_6", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_6", + "hole_diameter": 1, + "rect_pad_width": 1.5, + "rect_pad_height": 1.5, + "shape": "circular_hole_with_rect_pad", + "port_hints": [ + "unnamed_platedhole7", + "1" + ], + "x": 13.970000000000002, + "y": 6.35, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0", + "hole_offset_x": 0, + "hole_offset_y": 0, + "rect_border_radius": 0, + "rect_ccw_rotation": 270 + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_7", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.095000000000002, + "y": 6.35 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "SWD", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_7", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_7", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole8", + "2" + ], + "x": 13.97, + "y": 3.8099999999999996, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_10", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": 3.8099999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_11", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": 3.8099999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_8", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.095, + "y": 3.8099999999999996 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "RUN", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_8", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_8", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole9", + "3" + ], + "x": 13.97, + "y": 1.2699999999999996, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_12", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": 1.2699999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_13", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": 1.2699999999999996, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_9", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.095, + "y": 1.2699999999999994 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP16", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_9", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_9", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole10", + "4" + ], + "x": 13.97, + "y": -1.2700000000000005, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_14", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": -1.2700000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_15", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": -1.2700000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_10", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.095, + "y": -1.2700000000000007 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP17", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_10", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_10", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole11", + "5" + ], + "x": 13.97, + "y": -3.8100000000000005, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_16", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": -3.8100000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_17", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": 13.97, + "y": -3.8100000000000005, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_11", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.095, + "y": -3.8100000000000005 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP18", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_plated_hole", + "pcb_plated_hole_id": "pcb_plated_hole_11", + "pcb_component_id": "pcb_component_1", + "pcb_port_id": "pcb_port_11", + "outer_diameter": 1.5, + "hole_diameter": 1, + "shape": "circle", + "port_hints": [ + "unnamed_platedhole12", + "6" + ], + "x": 13.969999999999999, + "y": -6.35, + "layers": [ + "top", + "bottom" + ], + "is_covered_with_solder_mask": false, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_18", + "layer": "top", + "shape": "circle", + "radius": 0.75, + "x": 13.969999999999999, + "y": -6.35, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_solder_paste", + "pcb_solder_paste_id": "pcb_solder_paste_19", + "layer": "bottom", + "shape": "circle", + "radius": 0.75, + "x": 13.969999999999999, + "y": -6.35, + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_12", + "anchor_alignment": "center", + "anchor_position": { + "x": 15.094999999999999, + "y": -6.35 + }, + "font": "tscircuit2024", + "font_size": 0.5, + "layer": "top", + "text": "GP19", + "ccw_rotation": 90, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_silkscreen_text", + "pcb_silkscreen_text_id": "pcb_silkscreen_text_13", + "anchor_alignment": "center", + "anchor_position": { + "x": 16.51, + "y": -4.6659043047514155e-16 + }, + "font": "tscircuit2024", + "font_size": 0.7, + "layer": "top", + "text": "U3", + "ccw_rotation": 270, + "pcb_component_id": "pcb_component_1", + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_0", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": -6.35, + "source_port_id": "source_port_0" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_1", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": -3.8099999999999996, + "source_port_id": "source_port_1" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_2", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": -1.2699999999999996, + "source_port_id": "source_port_2" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_3", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": 1.2700000000000005, + "source_port_id": "source_port_3" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_4", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": 3.8100000000000005, + "source_port_id": "source_port_4" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_5", + "pcb_component_id": "pcb_component_0", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": -13.97, + "y": 6.35, + "source_port_id": "source_port_5" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_6", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.970000000000002, + "y": 6.35, + "source_port_id": "source_port_20" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_7", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.97, + "y": 3.8099999999999996, + "source_port_id": "source_port_21" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_8", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.97, + "y": 1.2699999999999996, + "source_port_id": "source_port_22" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_9", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.97, + "y": -1.2700000000000005, + "source_port_id": "source_port_23" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_10", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.97, + "y": -3.8100000000000005, + "source_port_id": "source_port_24" + }, + { + "type": "pcb_port", + "pcb_port_id": "pcb_port_11", + "pcb_component_id": "pcb_component_1", + "layers": [ + "top", + "inner1", + "inner2", + "bottom" + ], + "subcircuit_id": "subcircuit_source_group_0", + "x": 13.969999999999999, + "y": -6.35, + "source_port_id": "source_port_25" + }, + { + "type": "cad_component", + "cad_component_id": "cad_component_0", + "position": { + "x": -13.97, + "y": 0, + "z": 0.7 + }, + "rotation": { + "x": 0, + "y": 0, + "z": 90 + }, + "pcb_component_id": "pcb_component_0", + "source_component_id": "source_component_0", + "model_origin_alignment": "center_of_component_on_board_surface", + "anchor_alignment": "center_of_component_on_board_surface", + "footprinter_string": "pinrow_1x20_2.54mm" + }, + { + "type": "cad_component", + "cad_component_id": "cad_component_1", + "position": { + "x": 13.97, + "y": 0, + "z": 0.7 + }, + "rotation": { + "x": 0, + "y": 0, + "z": 270 + }, + "pcb_component_id": "pcb_component_1", + "source_component_id": "source_component_1", + "model_origin_alignment": "center_of_component_on_board_surface", + "anchor_alignment": "center_of_component_on_board_surface", + "footprinter_string": "pinrow_1x20_2.54mm" + }, + { + "type": "source_component_pins_underspecified_warning", + "source_component_pins_underspecified_warning_id": "source_component_pins_underspecified_warning_0", + "warning_type": "source_component_pins_underspecified_warning", + "message": "All pins on U2 are underspecified (no pinAttributes set)", + "source_component_id": "source_component_0", + "source_port_ids": [ + "source_port_0", + "source_port_1", + "source_port_2", + "source_port_3", + "source_port_4", + "source_port_5", + "source_port_6", + "source_port_7", + "source_port_8", + "source_port_9", + "source_port_10", + "source_port_11", + "source_port_12", + "source_port_13", + "source_port_14", + "source_port_15", + "source_port_16", + "source_port_17", + "source_port_18", + "source_port_19" + ], + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_component_pins_underspecified_warning", + "source_component_pins_underspecified_warning_id": "source_component_pins_underspecified_warning_1", + "warning_type": "source_component_pins_underspecified_warning", + "message": "All pins on U3 are underspecified (no pinAttributes set)", + "source_component_id": "source_component_1", + "source_port_ids": [ + "source_port_20", + "source_port_21", + "source_port_22", + "source_port_23", + "source_port_24", + "source_port_25", + "source_port_26", + "source_port_27", + "source_port_28", + "source_port_29", + "source_port_30", + "source_port_31", + "source_port_32", + "source_port_33", + "source_port_34", + "source_port_35", + "source_port_36", + "source_port_37", + "source_port_38", + "source_port_39" + ], + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_no_power_pin_defined_warning", + "source_no_power_pin_defined_warning_id": "source_no_power_pin_defined_warning_0", + "warning_type": "source_no_power_pin_defined_warning", + "message": "U2 has no pin with requires_power=true", + "source_component_id": "source_component_0", + "source_port_ids": [ + "source_port_0", + "source_port_1", + "source_port_2", + "source_port_3", + "source_port_4", + "source_port_5", + "source_port_6", + "source_port_7", + "source_port_8", + "source_port_9", + "source_port_10", + "source_port_11", + "source_port_12", + "source_port_13", + "source_port_14", + "source_port_15", + "source_port_16", + "source_port_17", + "source_port_18", + "source_port_19" + ], + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_no_power_pin_defined_warning", + "source_no_power_pin_defined_warning_id": "source_no_power_pin_defined_warning_1", + "warning_type": "source_no_power_pin_defined_warning", + "message": "U3 has no pin with requires_power=true", + "source_component_id": "source_component_1", + "source_port_ids": [ + "source_port_20", + "source_port_21", + "source_port_22", + "source_port_23", + "source_port_24", + "source_port_25", + "source_port_26", + "source_port_27", + "source_port_28", + "source_port_29", + "source_port_30", + "source_port_31", + "source_port_32", + "source_port_33", + "source_port_34", + "source_port_35", + "source_port_36", + "source_port_37", + "source_port_38", + "source_port_39" + ], + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_no_ground_pin_defined_warning", + "source_no_ground_pin_defined_warning_id": "source_no_ground_pin_defined_warning_0", + "warning_type": "source_no_ground_pin_defined_warning", + "message": "U2 has no pin with requires_ground=true", + "source_component_id": "source_component_0", + "source_port_ids": [ + "source_port_0", + "source_port_1", + "source_port_2", + "source_port_3", + "source_port_4", + "source_port_5", + "source_port_6", + "source_port_7", + "source_port_8", + "source_port_9", + "source_port_10", + "source_port_11", + "source_port_12", + "source_port_13", + "source_port_14", + "source_port_15", + "source_port_16", + "source_port_17", + "source_port_18", + "source_port_19" + ], + "subcircuit_id": "subcircuit_source_group_0" + }, + { + "type": "source_no_ground_pin_defined_warning", + "source_no_ground_pin_defined_warning_id": "source_no_ground_pin_defined_warning_1", + "warning_type": "source_no_ground_pin_defined_warning", + "message": "U3 has no pin with requires_ground=true", + "source_component_id": "source_component_1", + "source_port_ids": [ + "source_port_20", + "source_port_21", + "source_port_22", + "source_port_23", + "source_port_24", + "source_port_25", + "source_port_26", + "source_port_27", + "source_port_28", + "source_port_29", + "source_port_30", + "source_port_31", + "source_port_32", + "source_port_33", + "source_port_34", + "source_port_35", + "source_port_36", + "source_port_37", + "source_port_38", + "source_port_39" + ], + "subcircuit_id": "subcircuit_source_group_0" + } +] diff --git a/tests/lib/pcb-component-boundary/__snapshots__/false-positive-component-outside.snap.svg b/tests/lib/pcb-component-boundary/__snapshots__/false-positive-component-outside.snap.svg index dcd34aa..4f20f09 100644 --- a/tests/lib/pcb-component-boundary/__snapshots__/false-positive-component-outside.snap.svg +++ b/tests/lib/pcb-component-boundary/__snapshots__/false-positive-component-outside.snap.svg @@ -1 +1 @@ -VBUSGND3V3GP0GP1GP2U2SWDRUNGP16GP17GP18GP19U3Component U2 extends outside board boundaries by 4.07mm. Try moving it 4.07mm right to fit within the board edge.Component U3 extends outside board boundaries by 4.07mm. Try moving it 4.07mm left to fit within the board edge.Component U2 extends outside board boundaries by 4.07mm. Try moving it 4.07mm right to fit within the board edge.Component U3 extends outside board boundaries by 4.07mm. Try moving it 4.07mm left to fit within the board edge. \ No newline at end of file +VBUSGND3V3GP0GP1GP2U2SWDRUNGP16GP17GP18GP19U3Component U2 extends outside board boundaries by 4.07mm. Try moving it 4.07mm right to fit within the board edge.Component U3 extends outside board boundaries by 4.07mm. Try moving it 4.07mm left to fit within the board edge. \ No newline at end of file diff --git a/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx b/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx index 11f10a8..1556787 100644 --- a/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx +++ b/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx @@ -1,83 +1,11 @@ import { test, expect } from "bun:test" -import { Circuit } from "tscircuit" import { checkPcbComponentsOutOfBoard } from "lib/check-pcb-components-out-of-board/checkPcbComponentsOutOfBoard" import { convertCircuitJsonToPcbSvg } from "circuit-to-svg" import type { AnyCircuitElement } from "circuit-json" +import pinrowJson from "tests/assets/pinrow-rotated-inside-board.json" -const MinimalRp2040Breakout = () => ( - - - - - -) - -test("no false positive: pinrow connectors rotated 90/270 inside board should not trigger errors", async () => { - const circuit = new Circuit() - circuit.add() - await circuit.renderUntilSettled() - - const circuitJson = circuit.getCircuitJson() as AnyCircuitElement[] +test("no false positive: pinrow connectors rotated 90/270 inside board should not trigger errors", () => { + const circuitJson = pinrowJson as AnyCircuitElement[] const errors = checkPcbComponentsOutOfBoard(circuitJson) expect( @@ -85,7 +13,7 @@ test("no false positive: pinrow connectors rotated 90/270 inside board should no [...circuitJson, ...errors] as AnyCircuitElement[], { shouldDrawErrors: true, - }, + } ), ).toMatchSvgSnapshot(import.meta.path) From 3a6e2318bed3046873a2fde87d090167591bc453 Mon Sep 17 00:00:00 2001 From: Mustafa Mulla Date: Mon, 16 Mar 2026 12:24:22 +0530 Subject: [PATCH 2/2] update --- tests/assets/pinrow-rotated-inside-board.json | 444 +++--------------- .../false-positive-component-outside.test.tsx | 2 +- 2 files changed, 77 insertions(+), 369 deletions(-) diff --git a/tests/assets/pinrow-rotated-inside-board.json b/tests/assets/pinrow-rotated-inside-board.json index afb3b9f..18cc6bc 100644 --- a/tests/assets/pinrow-rotated-inside-board.json +++ b/tests/assets/pinrow-rotated-inside-board.json @@ -16,11 +16,7 @@ "source_port_id": "source_port_0", "name": "VBUS", "pin_number": 1, - "port_hints": [ - "VBUS", - "pin1", - "1" - ], + "port_hints": ["VBUS", "pin1", "1"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -29,11 +25,7 @@ "source_port_id": "source_port_1", "name": "GND", "pin_number": 2, - "port_hints": [ - "GND", - "pin2", - "2" - ], + "port_hints": ["GND", "pin2", "2"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -42,11 +34,7 @@ "source_port_id": "source_port_2", "name": "3V3", "pin_number": 3, - "port_hints": [ - "3V3", - "pin3", - "3" - ], + "port_hints": ["3V3", "pin3", "3"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -55,11 +43,7 @@ "source_port_id": "source_port_3", "name": "GP0", "pin_number": 4, - "port_hints": [ - "GP0", - "pin4", - "4" - ], + "port_hints": ["GP0", "pin4", "4"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -68,11 +52,7 @@ "source_port_id": "source_port_4", "name": "GP1", "pin_number": 5, - "port_hints": [ - "GP1", - "pin5", - "5" - ], + "port_hints": ["GP1", "pin5", "5"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -81,11 +61,7 @@ "source_port_id": "source_port_5", "name": "GP2", "pin_number": 6, - "port_hints": [ - "GP2", - "pin6", - "6" - ], + "port_hints": ["GP2", "pin6", "6"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -94,11 +70,7 @@ "source_port_id": "source_port_6", "name": "GP3", "pin_number": 7, - "port_hints": [ - "GP3", - "pin7", - "7" - ], + "port_hints": ["GP3", "pin7", "7"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -107,11 +79,7 @@ "source_port_id": "source_port_7", "name": "GP4", "pin_number": 8, - "port_hints": [ - "GP4", - "pin8", - "8" - ], + "port_hints": ["GP4", "pin8", "8"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -120,11 +88,7 @@ "source_port_id": "source_port_8", "name": "GP5", "pin_number": 9, - "port_hints": [ - "GP5", - "pin9", - "9" - ], + "port_hints": ["GP5", "pin9", "9"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -133,11 +97,7 @@ "source_port_id": "source_port_9", "name": "GP6", "pin_number": 10, - "port_hints": [ - "GP6", - "pin10", - "10" - ], + "port_hints": ["GP6", "pin10", "10"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -146,11 +106,7 @@ "source_port_id": "source_port_10", "name": "GP7", "pin_number": 11, - "port_hints": [ - "GP7", - "pin11", - "11" - ], + "port_hints": ["GP7", "pin11", "11"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -159,11 +115,7 @@ "source_port_id": "source_port_11", "name": "GP8", "pin_number": 12, - "port_hints": [ - "GP8", - "pin12", - "12" - ], + "port_hints": ["GP8", "pin12", "12"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -172,11 +124,7 @@ "source_port_id": "source_port_12", "name": "GP9", "pin_number": 13, - "port_hints": [ - "GP9", - "pin13", - "13" - ], + "port_hints": ["GP9", "pin13", "13"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -185,11 +133,7 @@ "source_port_id": "source_port_13", "name": "GP10", "pin_number": 14, - "port_hints": [ - "GP10", - "pin14", - "14" - ], + "port_hints": ["GP10", "pin14", "14"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -198,11 +142,7 @@ "source_port_id": "source_port_14", "name": "GP11", "pin_number": 15, - "port_hints": [ - "GP11", - "pin15", - "15" - ], + "port_hints": ["GP11", "pin15", "15"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -211,11 +151,7 @@ "source_port_id": "source_port_15", "name": "GP12", "pin_number": 16, - "port_hints": [ - "GP12", - "pin16", - "16" - ], + "port_hints": ["GP12", "pin16", "16"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -224,11 +160,7 @@ "source_port_id": "source_port_16", "name": "GP13", "pin_number": 17, - "port_hints": [ - "GP13", - "pin17", - "17" - ], + "port_hints": ["GP13", "pin17", "17"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -237,11 +169,7 @@ "source_port_id": "source_port_17", "name": "GP14", "pin_number": 18, - "port_hints": [ - "GP14", - "pin18", - "18" - ], + "port_hints": ["GP14", "pin18", "18"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -250,11 +178,7 @@ "source_port_id": "source_port_18", "name": "GP15", "pin_number": 19, - "port_hints": [ - "GP15", - "pin19", - "19" - ], + "port_hints": ["GP15", "pin19", "19"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -263,11 +187,7 @@ "source_port_id": "source_port_19", "name": "SWCLK", "pin_number": 20, - "port_hints": [ - "SWCLK", - "pin20", - "20" - ], + "port_hints": ["SWCLK", "pin20", "20"], "source_component_id": "source_component_0", "subcircuit_id": "subcircuit_source_group_0" }, @@ -283,11 +203,7 @@ "source_port_id": "source_port_20", "name": "SWD", "pin_number": 1, - "port_hints": [ - "SWD", - "pin1", - "1" - ], + "port_hints": ["SWD", "pin1", "1"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -296,11 +212,7 @@ "source_port_id": "source_port_21", "name": "RUN", "pin_number": 2, - "port_hints": [ - "RUN", - "pin2", - "2" - ], + "port_hints": ["RUN", "pin2", "2"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -309,11 +221,7 @@ "source_port_id": "source_port_22", "name": "GP16", "pin_number": 3, - "port_hints": [ - "GP16", - "pin3", - "3" - ], + "port_hints": ["GP16", "pin3", "3"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -322,11 +230,7 @@ "source_port_id": "source_port_23", "name": "GP17", "pin_number": 4, - "port_hints": [ - "GP17", - "pin4", - "4" - ], + "port_hints": ["GP17", "pin4", "4"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -335,11 +239,7 @@ "source_port_id": "source_port_24", "name": "GP18", "pin_number": 5, - "port_hints": [ - "GP18", - "pin5", - "5" - ], + "port_hints": ["GP18", "pin5", "5"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -348,11 +248,7 @@ "source_port_id": "source_port_25", "name": "GP19", "pin_number": 6, - "port_hints": [ - "GP19", - "pin6", - "6" - ], + "port_hints": ["GP19", "pin6", "6"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -361,11 +257,7 @@ "source_port_id": "source_port_26", "name": "GP20", "pin_number": 7, - "port_hints": [ - "GP20", - "pin7", - "7" - ], + "port_hints": ["GP20", "pin7", "7"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -374,11 +266,7 @@ "source_port_id": "source_port_27", "name": "GP21", "pin_number": 8, - "port_hints": [ - "GP21", - "pin8", - "8" - ], + "port_hints": ["GP21", "pin8", "8"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -387,11 +275,7 @@ "source_port_id": "source_port_28", "name": "GP22", "pin_number": 9, - "port_hints": [ - "GP22", - "pin9", - "9" - ], + "port_hints": ["GP22", "pin9", "9"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -400,11 +284,7 @@ "source_port_id": "source_port_29", "name": "GP23", "pin_number": 10, - "port_hints": [ - "GP23", - "pin10", - "10" - ], + "port_hints": ["GP23", "pin10", "10"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -413,11 +293,7 @@ "source_port_id": "source_port_30", "name": "GP24", "pin_number": 11, - "port_hints": [ - "GP24", - "pin11", - "11" - ], + "port_hints": ["GP24", "pin11", "11"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -426,11 +302,7 @@ "source_port_id": "source_port_31", "name": "GP25", "pin_number": 12, - "port_hints": [ - "GP25", - "pin12", - "12" - ], + "port_hints": ["GP25", "pin12", "12"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -439,11 +311,7 @@ "source_port_id": "source_port_32", "name": "GP26", "pin_number": 13, - "port_hints": [ - "GP26", - "pin13", - "13" - ], + "port_hints": ["GP26", "pin13", "13"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -452,11 +320,7 @@ "source_port_id": "source_port_33", "name": "GP27", "pin_number": 14, - "port_hints": [ - "GP27", - "pin14", - "14" - ], + "port_hints": ["GP27", "pin14", "14"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -465,11 +329,7 @@ "source_port_id": "source_port_34", "name": "GP28", "pin_number": 15, - "port_hints": [ - "GP28", - "pin15", - "15" - ], + "port_hints": ["GP28", "pin15", "15"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -478,11 +338,7 @@ "source_port_id": "source_port_35", "name": "GP29", "pin_number": 16, - "port_hints": [ - "GP29", - "pin16", - "16" - ], + "port_hints": ["GP29", "pin16", "16"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -491,11 +347,7 @@ "source_port_id": "source_port_36", "name": "ADC_AVDD", "pin_number": 17, - "port_hints": [ - "ADC_AVDD", - "pin17", - "17" - ], + "port_hints": ["ADC_AVDD", "pin17", "17"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -504,11 +356,7 @@ "source_port_id": "source_port_37", "name": "VREG_IN", "pin_number": 18, - "port_hints": [ - "VREG_IN", - "pin18", - "18" - ], + "port_hints": ["VREG_IN", "pin18", "18"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -517,11 +365,7 @@ "source_port_id": "source_port_38", "name": "USB_DP", "pin_number": 19, - "port_hints": [ - "USB_DP", - "pin19", - "19" - ], + "port_hints": ["USB_DP", "pin19", "19"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -530,11 +374,7 @@ "source_port_id": "source_port_39", "name": "USB_DM", "pin_number": 20, - "port_hints": [ - "USB_DM", - "pin20", - "20" - ], + "port_hints": ["USB_DM", "pin20", "20"], "source_component_id": "source_component_1", "subcircuit_id": "subcircuit_source_group_0" }, @@ -966,16 +806,10 @@ "rect_pad_width": 1.5, "rect_pad_height": 1.5, "shape": "circular_hole_with_rect_pad", - "port_hints": [ - "unnamed_platedhole1", - "1" - ], + "port_hints": ["unnamed_platedhole1", "1"], "x": -13.97, "y": -6.35, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0", "hole_offset_x": 0, @@ -1007,16 +841,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole2", - "2" - ], + "port_hints": ["unnamed_platedhole2", "2"], "x": -13.97, "y": -3.8099999999999996, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1064,16 +892,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole3", - "3" - ], + "port_hints": ["unnamed_platedhole3", "3"], "x": -13.97, "y": -1.2699999999999996, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1121,16 +943,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole4", - "4" - ], + "port_hints": ["unnamed_platedhole4", "4"], "x": -13.97, "y": 1.2700000000000005, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1178,16 +994,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole5", - "5" - ], + "port_hints": ["unnamed_platedhole5", "5"], "x": -13.97, "y": 3.8100000000000005, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1235,16 +1045,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole6", - "6" - ], + "port_hints": ["unnamed_platedhole6", "6"], "x": -13.97, "y": 6.35, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1309,16 +1113,10 @@ "rect_pad_width": 1.5, "rect_pad_height": 1.5, "shape": "circular_hole_with_rect_pad", - "port_hints": [ - "unnamed_platedhole7", - "1" - ], + "port_hints": ["unnamed_platedhole7", "1"], "x": 13.970000000000002, "y": 6.35, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0", "hole_offset_x": 0, @@ -1350,16 +1148,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole8", - "2" - ], + "port_hints": ["unnamed_platedhole8", "2"], "x": 13.97, "y": 3.8099999999999996, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1407,16 +1199,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole9", - "3" - ], + "port_hints": ["unnamed_platedhole9", "3"], "x": 13.97, "y": 1.2699999999999996, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1464,16 +1250,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole10", - "4" - ], + "port_hints": ["unnamed_platedhole10", "4"], "x": 13.97, "y": -1.2700000000000005, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1521,16 +1301,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole11", - "5" - ], + "port_hints": ["unnamed_platedhole11", "5"], "x": 13.97, "y": -3.8100000000000005, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1578,16 +1352,10 @@ "outer_diameter": 1.5, "hole_diameter": 1, "shape": "circle", - "port_hints": [ - "unnamed_platedhole12", - "6" - ], + "port_hints": ["unnamed_platedhole12", "6"], "x": 13.969999999999999, "y": -6.35, - "layers": [ - "top", - "bottom" - ], + "layers": ["top", "bottom"], "is_covered_with_solder_mask": false, "subcircuit_id": "subcircuit_source_group_0" }, @@ -1647,12 +1415,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_0", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": -6.35, @@ -1662,12 +1425,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_1", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": -3.8099999999999996, @@ -1677,12 +1435,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_2", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": -1.2699999999999996, @@ -1692,12 +1445,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_3", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": 1.2700000000000005, @@ -1707,12 +1455,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_4", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": 3.8100000000000005, @@ -1722,12 +1465,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_5", "pcb_component_id": "pcb_component_0", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": -13.97, "y": 6.35, @@ -1737,12 +1475,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_6", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.970000000000002, "y": 6.35, @@ -1752,12 +1485,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_7", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.97, "y": 3.8099999999999996, @@ -1767,12 +1495,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_8", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.97, "y": 1.2699999999999996, @@ -1782,12 +1505,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_9", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.97, "y": -1.2700000000000005, @@ -1797,12 +1515,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_10", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.97, "y": -3.8100000000000005, @@ -1812,12 +1525,7 @@ "type": "pcb_port", "pcb_port_id": "pcb_port_11", "pcb_component_id": "pcb_component_1", - "layers": [ - "top", - "inner1", - "inner2", - "bottom" - ], + "layers": ["top", "inner1", "inner2", "bottom"], "subcircuit_id": "subcircuit_source_group_0", "x": 13.969999999999999, "y": -6.35, diff --git a/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx b/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx index 1556787..31e8cff 100644 --- a/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx +++ b/tests/lib/pcb-component-boundary/false-positive-component-outside.test.tsx @@ -13,7 +13,7 @@ test("no false positive: pinrow connectors rotated 90/270 inside board should no [...circuitJson, ...errors] as AnyCircuitElement[], { shouldDrawErrors: true, - } + }, ), ).toMatchSvgSnapshot(import.meta.path)