From d2cd5ecdd157745ffb2e4894a0fb3d9507d762ef Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 2 Jan 2026 14:11:18 -0800 Subject: [PATCH] Don't clear references unconditionally If we are clearing all references in the schematic, then we can clear our references, otherwise, just eliminate the ones for the proper sheets. We don't want to clear the references on Sheet A when we copy and paste it to Sheet B. Fixes https://gitlab.com/kicad/code/kicad/-/issues/20173 (cherry picked from commit 8d37b3787d8ce9ef20cd3b6028a6254585de8963) --- eeschema/sch_symbol.cpp | 21 +- .../Kicad 9 - multi channel test.kicad_pcb | 1727 +++++++++++++++++ .../Kicad 9 - multi channel test.kicad_sch | 1717 ++++++++++++++++ .../eeschema/issue20173/issue20173.kicad_pcb | 1538 +++++++++++++++ .../eeschema/issue20173/issue20173.kicad_pro | 635 ++++++ .../eeschema/issue20173/issue20173.kicad_sch | 67 + qa/tests/eeschema/CMakeLists.txt | 1 + .../test_issue20173_paste_subsheet.cpp | 710 +++++++ 8 files changed, 6407 insertions(+), 9 deletions(-) create mode 100644 qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_pcb create mode 100644 qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_sch create mode 100644 qa/data/eeschema/issue20173/issue20173.kicad_pcb create mode 100644 qa/data/eeschema/issue20173/issue20173.kicad_pro create mode 100644 qa/data/eeschema/issue20173/issue20173.kicad_sch create mode 100644 qa/tests/eeschema/test_issue20173_paste_subsheet.cpp diff --git a/eeschema/sch_symbol.cpp b/eeschema/sch_symbol.cpp index 4a51c36a47..6a95194fac 100644 --- a/eeschema/sch_symbol.cpp +++ b/eeschema/sch_symbol.cpp @@ -1665,16 +1665,19 @@ void SCH_SYMBOL::ClearAnnotation( const SCH_SHEET_PATH* aSheetPath, bool aResetP for( std::unique_ptr& pin : m_pins ) pin->ClearDefaultNetName( aSheetPath ); - // These 2 changes do not work in complex hierarchy. - // When a clear annotation is made, the calling function must call a - // UpdateAllScreenReferences for the active sheet. - // But this call cannot made here. - wxString currentReference = m_fields[REFERENCE_FIELD].GetText(); + // Only modify the REFERENCE field text when clearing ALL annotations (aSheetPath is NULL). + // When clearing for a specific sheet path, we must preserve the field text because it serves + // as a fallback for GetRef() when instances for other sheet paths are looked up. + // See issue #20173: modifying field text here corrupts references in shared screens. + if( !aSheetPath ) + { + wxString currentReference = GetField( REFERENCE_FIELD )->GetText(); - if( currentReference.IsEmpty() || aResetPrefix ) - m_fields[REFERENCE_FIELD].SetText( UTIL::GetRefDesUnannotated( m_prefix ) ); - else - m_fields[REFERENCE_FIELD].SetText( UTIL::GetRefDesUnannotated( currentReference ) ); + if( currentReference.IsEmpty() || aResetPrefix ) + GetField( REFERENCE_FIELD )->SetText( UTIL::GetRefDesUnannotated( m_prefix ) ); + else + GetField( REFERENCE_FIELD)->SetText( UTIL::GetRefDesUnannotated( currentReference ) ); + } } diff --git a/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_pcb b/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_pcb new file mode 100644 index 0000000000..1cb0e2e050 --- /dev/null +++ b/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_pcb @@ -0,0 +1,1727 @@ +(kicad_pcb + (version 20241229) + (generator "pcbnew") + (generator_version "9.0") + (general + (thickness 1.6) + (legacy_teardrops no) + ) + (paper "A4") + (layers + (0 "F.Cu" signal) + (2 "B.Cu" signal) + (9 "F.Adhes" user "F.Adhesive") + (11 "B.Adhes" user "B.Adhesive") + (13 "F.Paste" user) + (15 "B.Paste" user) + (5 "F.SilkS" user "F.Silkscreen") + (7 "B.SilkS" user "B.Silkscreen") + (1 "F.Mask" user) + (3 "B.Mask" user) + (17 "Dwgs.User" user "User.Drawings") + (19 "Cmts.User" user "User.Comments") + (21 "Eco1.User" user "User.Eco1") + (23 "Eco2.User" user "User.Eco2") + (25 "Edge.Cuts" user) + (27 "Margin" user) + (31 "F.CrtYd" user "F.Courtyard") + (29 "B.CrtYd" user "B.Courtyard") + (35 "F.Fab" user) + (33 "B.Fab" user) + (39 "User.1" user) + (41 "User.2" user) + (43 "User.3" user) + (45 "User.4" user) + ) + (setup + (pad_to_mask_clearance 0) + (allow_soldermask_bridges_in_footprints no) + (tenting front back) + (pcbplotparams + (layerselection 0x00000000_00000000_55555555_5755f5ff) + (plot_on_all_layers_selection 0x00000000_00000000_00000000_00000000) + (disableapertmacros no) + (usegerberextensions no) + (usegerberattributes yes) + (usegerberadvancedattributes yes) + (creategerberjobfile yes) + (dashed_line_dash_ratio 12.000000) + (dashed_line_gap_ratio 3.000000) + (svgprecision 4) + (plotframeref no) + (mode 1) + (useauxorigin no) + (hpglpennumber 1) + (hpglpenspeed 20) + (hpglpendiameter 15.000000) + (pdf_front_fp_property_popups yes) + (pdf_back_fp_property_popups yes) + (pdf_metadata yes) + (pdf_single_document no) + (dxfpolygonmode yes) + (dxfimperialunits yes) + (dxfusepcbnewfont yes) + (psnegative no) + (psa4output no) + (plot_black_and_white yes) + (plotinvisibletext no) + (sketchpadsonfab no) + (plotpadnumbers no) + (hidednponfab no) + (sketchdnponfab yes) + (crossoutdnponfab yes) + (subtractmaskfromsilk no) + (outputformat 1) + (mirror no) + (drillshape 1) + (scaleselection 1) + (outputdirectory "") + ) + ) + (net 0 "") + (net 1 "GND") + (net 2 "VCC") + (net 3 "Net-(D1-A)") + (net 4 "Net-(D2-A)") + (net 5 "Net-(R2-Pad2)") + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "1f22b5e5-ff0e-4530-aaf4-29374d903031") + (at 110.8983 78.8924) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R2" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "371ed6dd-cf65-48cd-a82a-fd701623a380") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "66993596-98d0-4efa-b5eb-7a32e1ddeef8") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "ba57c356-51eb-4977-b013-547576c56c12") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c645315a-c8ab-46e2-9485-af5112ca0f6f") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/88bd4be0-a160-4809-be45-e506fc1372d5") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "8553b00f-2c82-4a26-a4e0-d465e7b099e9") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "39c87252-7e37-4547-a832-7a8526d1e56f") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "81966857-c139-4996-b56b-6432c038065f") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "fb72abdf-1d99-43ac-a4f3-1ab687aee631") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "cf6fb750-0ffe-46ae-a670-367bc46371ec") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "fceb4db6-aecd-4ffc-83e0-003f804eb353") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "f6d2868c-78d4-456f-95fa-e5716ce9dc5a") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a9308f17-0304-43b4-80aa-6c000040d35b") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a03381e6-bd2a-47e8-8988-e59af83035ac") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "59e64677-ad4d-413e-bde2-9bbcbf015801") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "35a0d471-2add-4341-93e6-2a43185d1cd5") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "5cb61e24-8494-4fae-9682-6a3657f50021") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 5 "Net-(R2-Pad2)") + (pintype "passive") + (uuid "129318fa-8a4c-4dcb-920d-97a73e744781") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "LED_SMD:LED_0805_2012Metric" + (layer "F.Cu") + (uuid "2439a4ae-985f-4fa8-bd8e-f938b545aaa2") + (at 114.6325 81.28) + (descr "LED SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D1" + (at 2.9695 0 0) + (layer "F.SilkS") + (uuid "b546ee76-6758-48ed-80f5-5a224b44d769") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "LED" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "c6b42561-8072-4c6c-8954-0dff8d1e000f") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "ce86eea6-63ed-419c-975a-0e7ec062292e") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "b171455c-a435-4dff-b1f1-b602f2f8072b") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "2c9d4040-990f-41ae-8334-18a70471c56c") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") + (path "/bec7c2c9-cf7c-4502-a56a-abeef2e3e002") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -1.685 -0.96) + (end -1.685 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "b854f8e0-25c1-4d0d-9d99-a45c83cb6174") + ) + (fp_line + (start -1.685 0.96) + (end 1 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a37973ac-6d6d-461c-a557-69f603768026") + ) + (fp_line + (start 1 -0.96) + (end -1.685 -0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a2d53fe0-c567-4756-beea-729f569009e1") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "9fe6cd1d-911c-4947-948e-648ae8417d1c") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "def7a96b-0fec-446a-8d2f-e6ee874da5f8") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "057eac1b-5e3d-4ec4-af45-05846d01e527") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "01ee36ba-850e-4935-93e3-f39224867c1a") + ) + (fp_line + (start -1 -0.3) + (end -1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "84403541-207f-4103-8c99-2b367d9d45ce") + ) + (fp_line + (start -1 0.6) + (end 1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "cb9b9c39-350b-452c-8899-77f5bd780d59") + ) + (fp_line + (start -0.7 -0.6) + (end -1 -0.3) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "ca2153fe-1189-40a2-9fef-f52e3d44b7c3") + ) + (fp_line + (start 1 -0.6) + (end -0.7 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "81e837f1-ec05-41bd-8c50-4c517b797d8a") + ) + (fp_line + (start 1 0.6) + (end 1 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "ff169bc8-a3f3-40af-b579-d1d18a8a9f81") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "f45ad846-6124-434d-87ab-347b5ecd2ffd") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "GND") + (pinfunction "K") + (pintype "passive") + (uuid "a281a2e6-8f45-42bb-83bd-2ac347c96854") + ) + (pad "2" smd roundrect + (at 0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 3 "Net-(D1-A)") + (pinfunction "A") + (pintype "passive") + (uuid "a2dee8aa-9173-4f52-9f11-c2aa06ba395e") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "35ffe50d-a4df-42ab-bb83-478c8eb0ea14") + (at 114.8099 78.8924) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R3" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "9ef9608c-1fe3-48f9-b805-bc2928718593") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "150fccef-d00e-475b-ac4d-ce0afe79722f") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "809a1bb7-ffd0-4627-a06a-e0b67184b33c") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "8dc7cdbd-27f1-41a7-8f20-9c83b48053d4") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/ff631414-5e9a-4c20-b59e-8e88f221d6c4") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "6b8554d1-d9ab-4c6b-9266-6e8586fc1a86") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "6991f7a9-9c5d-497d-83e5-1e359a48278f") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "997fd37d-361d-4233-b5c0-e4fec0a24144") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "8b10ea66-e202-44b2-98a5-abc5cc1eb0df") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "ac20ae6b-1b4a-4008-b89d-1e43958ffbd4") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "80ebf50b-c284-4ac8-8c64-36fa74615616") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a5cfa70c-6159-4a6f-84e4-a936a3f04fca") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "eaa2c296-e457-4e76-906d-15f09751e4d3") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "9c84cda8-deb4-407f-b099-8250a589453e") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "1adcc52b-b005-445f-aa86-36c784323bd4") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "3db6a5d2-b363-49b6-8f43-9a7d1e3b7eca") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "f3616e42-87ec-46c5-ba90-7c4197345670") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 3 "Net-(D1-A)") + (pintype "passive") + (uuid "0d24d201-a09e-4a61-ac42-c58253856f91") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "90d007fa-49b7-4122-8adf-2aa7b1661bc2") + (at 106.9105 78.809) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R1" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "9f42edaf-2ca6-448e-b76d-61558ae9fb0f") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "23d80be7-93ec-40e2-93c2-efd9ea39d112") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "fb0b8687-f8d0-4a4b-b19b-42637ecfaf88") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "0957c0cf-419c-4bb5-bd81-12f33c883f8b") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/1e350e6c-d7b6-42c0-9b3d-bbd07635c56b") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "8dc66f86-a42f-44ad-89f7-6f569505de78") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "b47831af-f3cf-41f1-b25b-c7045324eecf") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "11093f98-2f62-4fcd-8c82-b77ff66869bf") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "f0ba6ae6-7e82-4852-a845-56fef6f6554c") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "1685fc92-14ae-4a0f-8ba1-763140f7c33f") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "281fd784-e39c-4b68-8515-9ebc3ab5de94") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "d6e5c091-824f-4c31-a948-296315cfb694") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "7b1b080b-f95c-4051-b784-1b65c4caee85") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6ee10766-cb50-48c1-b7e6-55473ed12a6a") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "24e0547e-9f80-4534-a9e6-c41658abb23a") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "f2b139d8-3e5c-47b7-be3c-0f5d9d3ecff4") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "704aa491-58a4-4062-9c38-14c33fdd8e49") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 4 "Net-(D2-A)") + (pintype "passive") + (uuid "5af80d06-efb6-4646-9419-7638e6a6d10b") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "LED_SMD:LED_0805_2012Metric" + (layer "F.Cu") + (uuid "af06b8b1-f211-469e-b9c3-57507ca9e20e") + (at 106.68 81.28) + (descr "LED SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D2" + (at -3.048 0 0) + (layer "F.SilkS") + (uuid "47bad15f-1443-4604-add5-939becbb2eeb") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "LED" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "9b5a70d5-7f11-43be-a3f7-4add59e7b71c") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "b47a4f2f-ad9e-4ebf-9e27-395913e1125b") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "69c59d07-cf08-4ae6-9042-a1f79cf5e667") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "467f45a8-caf0-446f-a46d-6d4303b82671") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") + (path "/63e66f53-7bb2-44bc-b628-3b6878308c4a") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -1.685 -0.96) + (end -1.685 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "c54bb134-3737-43eb-ae36-89403d1a6591") + ) + (fp_line + (start -1.685 0.96) + (end 1 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "5895ca4d-77da-48f6-b9f8-b473710e0619") + ) + (fp_line + (start 1 -0.96) + (end -1.685 -0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "9baf0f10-ff4d-4a74-a516-be9b9debbb4e") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "390cda9e-5c05-4d8e-82dd-95c9d6d2f94b") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "028b08d3-fa61-4b46-baf1-9da45d8d0881") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "9df8cef0-41b8-4f07-bd5b-8be25da0e79d") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "dd51dd1c-d7b8-4abc-8570-a1b8eca2acdd") + ) + (fp_line + (start -1 -0.3) + (end -1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "1c07f956-b209-4a81-b065-78c1915f5a5b") + ) + (fp_line + (start -1 0.6) + (end 1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "17aa6927-5fe8-4244-ba3a-dd1b3faaaa16") + ) + (fp_line + (start -0.7 -0.6) + (end -1 -0.3) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "36e501c7-2dc1-4d54-857f-72b473bdfd6d") + ) + (fp_line + (start 1 -0.6) + (end -0.7 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a00b0f2a-3f68-47a0-a259-c3203b9bb6f6") + ) + (fp_line + (start 1 0.6) + (end 1 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "8c3c5e4f-83c9-4c02-ab03-a86355259579") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "afe3fcc9-e235-4a29-958c-a30452adfa7a") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "GND") + (pinfunction "K") + (pintype "passive") + (uuid "edd2383a-10c6-4eca-9fa5-80e031dd664a") + ) + (pad "2" smd roundrect + (at 0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(D2-A)") + (pinfunction "A") + (pintype "passive") + (uuid "5d8bc8ac-bdad-4c27-84a4-fe0c073b88b5") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "fefc5d0f-53fe-4c65-8a36-bc36553f9300") + (at 110.8475 81.28 180) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R4" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "656d4429-05be-4cf2-b831-2064ba80cf51") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "e4fe7b15-b2b4-496d-80da-fef90f61c304") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 180) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "27c4ea58-c7f5-4e06-9983-9071dc6d90f2") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 180) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "daab000b-7518-4f8f-9d8b-e691f562d22a") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/df68f759-54ab-4cee-80ea-27062539a543") + (sheetname "/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "788e939c-51e6-4448-b9fc-0cc1851682b0") + ) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a1f273d2-2f67-45cb-99e5-c857b18c97ff") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "9f49ec46-6315-424e-aebe-1fed8478ae76") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "38a06342-a221-445f-8b6f-f9cd800e3a0c") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "30b321b4-1ddb-43f5-958f-9f495a9d63ee") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "bd3773cd-b00a-4cc6-ab33-6dc29b3d1544") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "12c04b4f-345b-45ec-bf57-1abff5bd5a8b") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "f1463570-7aa0-45e8-a025-ad5b21240549") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a5b59145-f055-4254-b164-425df35f4b10") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6f89e011-d7fc-4349-8742-14fa1356abb4") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "cda19592-f046-46cd-b271-b48355e36901") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0 180) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 5 "Net-(R2-Pad2)") + (pintype "passive") + (uuid "efbb6b68-b64f-41c8-83ea-b6a299c7e9f1") + ) + (pad "2" smd roundrect + (at 0.9125 0 180) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 1 "GND") + (pintype "passive") + (uuid "33c900a0-4461-439c-b464-44e30c5fc019") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (gr_rect + (start 101.6 73.66) + (end 120.65 86.36) + (stroke + (width 0.05) + (type default) + ) + (fill no) + (layer "Edge.Cuts") + (uuid "f4f1067e-b403-4ce7-bf50-2410c5d1c27c") + ) + (segment + (start 110.49 82.55) + (end 107.0125 82.55) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "221c6571-af2e-4837-849c-44d5da2bce5b") + ) + (segment + (start 109.935 81.28) + (end 109.935 81.995) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "2c511202-44d2-4cc2-8b54-34c4f6a1ee9c") + ) + (segment + (start 113.695 81.28) + (end 112.425 82.55) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "56191cf8-de90-4e34-95e3-f9513050d49d") + ) + (segment + (start 109.935 81.995) + (end 110.49 82.55) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "757f5d94-ba71-41ed-8a8d-10693b4723eb") + ) + (segment + (start 112.425 82.55) + (end 110.49 82.55) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "836d1877-7d72-4d91-8fdd-d74ffbd187b0") + ) + (segment + (start 107.0125 82.55) + (end 105.7425 81.28) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "8edb0a6e-6e50-454c-a16b-6ea9a2bb33ab") + ) + (segment + (start 110.2868 75.9968) + (end 112.9792 75.9968) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "2e7d3d9f-b4da-4e43-9465-236315b25d04") + ) + (segment + (start 113.8974 76.915) + (end 113.8974 78.8924) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "4164ed4f-6543-4290-8181-8ac53552b4e3") + ) + (segment + (start 112.9792 75.9968) + (end 113.8974 76.915) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "49dcb0d6-2153-4640-8ad0-aef6eb69cbae") + ) + (segment + (start 105.998 78.809) + (end 105.998 76.8312) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "5fc75e1d-6b1e-4a7f-8924-0fc4d6031302") + ) + (segment + (start 106.8324 75.9968) + (end 110.2868 75.9968) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "72cee02b-93a1-4842-909b-d004d158cc41") + ) + (segment + (start 109.9858 76.2978) + (end 110.2868 75.9968) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "86992208-f364-4c8f-9728-1c9813757f0a") + ) + (segment + (start 109.9858 78.8924) + (end 109.9858 76.2978) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "d4e94967-0c8c-456c-b205-47fa857efad6") + ) + (segment + (start 105.998 76.8312) + (end 106.8324 75.9968) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "ee1e668b-1c60-4997-b327-3e1fa268c081") + ) + (segment + (start 115.57 79.0448) + (end 115.7224 78.8924) + (width 0.6) + (layer "F.Cu") + (net 3) + (uuid "14c35108-277e-4d2e-9f12-c4280789dfb3") + ) + (segment + (start 115.57 81.28) + (end 115.57 79.0448) + (width 0.6) + (layer "F.Cu") + (net 3) + (uuid "637ccee9-b30f-4cc6-8569-62e59d9d358c") + ) + (segment + (start 107.6175 81.28) + (end 107.6175 79.0145) + (width 0.6) + (layer "F.Cu") + (net 4) + (uuid "3c6bf1d6-7472-4bfa-b1b9-61aceceaa352") + ) + (segment + (start 107.6175 79.0145) + (end 107.823 78.809) + (width 0.6) + (layer "F.Cu") + (net 4) + (uuid "b0edbac5-d60b-4f90-84aa-32768562412e") + ) + (segment + (start 111.76 78.9432) + (end 111.8108 78.8924) + (width 0.6) + (layer "F.Cu") + (net 5) + (uuid "3a47086f-4e47-4aef-ac08-a19952cf91fb") + ) + (segment + (start 111.76 81.28) + (end 111.76 78.9432) + (width 0.6) + (layer "F.Cu") + (net 5) + (uuid "a41c4b38-708d-4654-b673-1a9146140895") + ) + (zone + (net 1) + (net_name "GND") + (layer "F.Cu") + (uuid "50f4f753-01e0-4bf4-91b7-d76b83bb4dc2") + (hatch edge 0.5) + (connect_pads + (clearance 0.5) + ) + (min_thickness 0.25) + (filled_areas_thickness no) + (fill yes + (thermal_gap 0.5) + (thermal_bridge_width 0.5) + (island_removal_mode 1) + (island_area_min 10) + ) + (polygon + (pts + (xy 101.6 73.66) (xy 120.65 73.66) (xy 120.65 86.36) (xy 101.6 86.36) + ) + ) + (filled_polygon + (layer "F.Cu") + (island) + (pts + (xy 112.933554 79.647118) (xy 112.959639 79.677222) (xy 113.042187 79.811055) (xy 113.171351 79.940219) + (xy 113.169883 79.941686) (xy 113.204311 79.990312) (xy 113.207446 80.060111) (xy 113.172347 80.120525) + (xy 113.139428 80.142931) (xy 113.134792 80.145092) (xy 112.986808 80.23637) (xy 112.863868 80.35931) + (xy 112.844451 80.390791) (xy 112.821489 80.411443) (xy 112.799992 80.433606) (xy 112.795746 80.434597) + (xy 112.792503 80.437515) (xy 112.762025 80.442473) (xy 112.731954 80.449498) (xy 112.727843 80.448035) + (xy 112.72354 80.448736) (xy 112.695227 80.436433) (xy 112.666125 80.426082) (xy 112.662559 80.422239) + (xy 112.659458 80.420892) (xy 112.64079 80.401508) (xy 112.6368 80.396344) (xy 112.615212 80.361344) + (xy 112.591216 80.337348) (xy 112.586377 80.331085) (xy 112.576433 80.305617) (xy 112.563334 80.281628) + (xy 112.561915 80.268435) (xy 112.560965 80.266001) (xy 112.561414 80.263772) (xy 112.5605 80.25527) + (xy 112.5605 79.96793) (xy 112.580185 79.900891) (xy 112.596819 79.880249) (xy 112.625356 79.851712) + (xy 112.666012 79.811056) (xy 112.748561 79.677222) (xy 112.800509 79.630497) (xy 112.869471 79.619274) + ) + ) + (filled_polygon + (layer "F.Cu") + (island) + (pts + (xy 106.705073 79.898792) (xy 106.715266 79.897718) (xy 106.737843 79.909077) (xy 106.761959 79.916646) + (xy 106.768526 79.924515) (xy 106.777681 79.929121) (xy 106.790534 79.950884) (xy 106.806728 79.970288) + (xy 106.809299 79.982659) (xy 106.813211 79.989282) (xy 106.812821 79.9996) (xy 106.817 80.019703) + (xy 106.817 80.276658) (xy 106.811058 80.296891) (xy 106.809923 80.31795) (xy 106.798427 80.339907) + (xy 106.797315 80.343697) (xy 106.794049 80.34827) (xy 106.793553 80.349219) (xy 106.787852 80.357118) + (xy 106.785974 80.358997) (xy 106.782895 80.363987) (xy 106.780258 80.367643) (xy 106.756057 80.386429) + (xy 106.73328 80.406911) (xy 106.728718 80.407652) (xy 106.725067 80.410487) (xy 106.694552 80.413207) + (xy 106.664316 80.418123) (xy 106.660077 80.41628) (xy 106.655473 80.416691) (xy 106.628334 80.402483) + (xy 106.600238 80.390271) (xy 106.597667 80.386428) (xy 106.593573 80.384285) (xy 106.574163 80.360173) + (xy 106.57363 80.359309) (xy 106.45069 80.236369) (xy 106.450686 80.236366) (xy 106.413605 80.213494) + (xy 106.405221 80.204173) (xy 106.394021 80.198538) (xy 106.382296 80.178686) (xy 106.36688 80.161546) + (xy 106.364866 80.149172) (xy 106.358491 80.138377) (xy 106.359361 80.115336) (xy 106.355659 80.092584) + (xy 106.360654 80.081085) (xy 106.361128 80.068557) (xy 106.374314 80.049646) (xy 106.383502 80.028502) + (xy 106.394882 80.020152) (xy 106.401093 80.011246) (xy 106.424003 79.998785) (xy 106.431483 79.993298) + (xy 106.435525 79.991633) (xy 106.579834 79.943814) (xy 106.636476 79.908876) (xy 106.645781 79.905045) + (xy 106.670918 79.902394) (xy 106.695295 79.895724) + ) + ) + (filled_polygon + (layer "F.Cu") + (island) + (pts + (xy 109.128339 76.816985) (xy 109.174094 76.869789) (xy 109.1853 76.9213) (xy 109.1853 77.86767) + (xy 109.165615 77.934709) (xy 109.148981 77.955351) (xy 109.130589 77.973742) (xy 109.038487 78.123063) + (xy 109.038483 78.123072) (xy 109.035923 78.1308) (xy 108.996149 78.188244) (xy 108.931633 78.215066) + (xy 108.862857 78.20275) (xy 108.811658 78.155206) (xy 108.800512 78.130798) (xy 108.797952 78.123072) + (xy 108.770314 78.039666) (xy 108.678212 77.890344) (xy 108.554156 77.766288) (xy 108.450578 77.702401) + (xy 108.404836 77.674187) (xy 108.404831 77.674185) (xy 108.403362 77.673698) (xy 108.238297 77.619001) + (xy 108.238295 77.619) (xy 108.13551 77.6085) (xy 107.510498 77.6085) (xy 107.51048 77.608501) (xy 107.407703 77.619) + (xy 107.4077 77.619001) (xy 107.241168 77.674185) (xy 107.241163 77.674187) (xy 107.091842 77.766289) + (xy 107.010181 77.847951) (xy 106.948858 77.881436) (xy 106.879166 77.876452) (xy 106.823233 77.83458) + (xy 106.798816 77.769116) (xy 106.7985 77.76027) (xy 106.7985 77.21414) (xy 106.818185 77.147101) + (xy 106.834819 77.126459) (xy 107.127659 76.833619) (xy 107.188982 76.800134) (xy 107.21534 76.7973) + (xy 109.0613 76.7973) + ) + ) + (filled_polygon + (layer "F.Cu") + (island) + (pts + (xy 112.663299 76.816985) (xy 112.683941 76.833619) (xy 113.060581 77.210259) (xy 113.094066 77.271582) + (xy 113.0969 77.29794) (xy 113.0969 77.86767) (xy 113.077215 77.934709) (xy 113.075458 77.937368) + (xy 113.06887 77.947061) (xy 113.042188 77.973744) (xy 112.958206 78.109899) (xy 112.956658 78.112179) + (xy 112.93171 78.132698) (xy 112.907691 78.154302) (xy 112.904889 78.154757) (xy 112.902696 78.156562) + (xy 112.87061 78.160336) (xy 112.838728 78.165525) (xy 112.836123 78.164393) (xy 112.833305 78.164725) + (xy 112.80428 78.150557) (xy 112.774646 78.137681) (xy 112.772259 78.134927) (xy 112.770516 78.134076) + (xy 112.768163 78.130199) (xy 112.748561 78.107578) (xy 112.706674 78.039668) (xy 112.666012 77.973744) + (xy 112.541956 77.849688) (xy 112.406744 77.766289) (xy 112.392636 77.757587) (xy 112.392631 77.757585) + (xy 112.391162 77.757098) (xy 112.226097 77.702401) (xy 112.226095 77.7024) (xy 112.12331 77.6919) + (xy 111.498298 77.6919) (xy 111.49828 77.691901) (xy 111.395503 77.7024) (xy 111.3955 77.702401) + (xy 111.228968 77.757585) (xy 111.228963 77.757587) (xy 111.079642 77.849689) (xy 110.997981 77.931351) + (xy 110.936658 77.964836) (xy 110.866966 77.959852) (xy 110.811033 77.91798) (xy 110.786616 77.852516) + (xy 110.7863 77.84367) (xy 110.7863 76.9213) (xy 110.805985 76.854261) (xy 110.858789 76.808506) + (xy 110.9103 76.7973) (xy 112.59626 76.7973) + ) + ) + (filled_polygon + (layer "F.Cu") + (pts + (xy 120.092539 74.180185) (xy 120.138294 74.232989) (xy 120.1495 74.2845) (xy 120.1495 85.7355) + (xy 120.129815 85.802539) (xy 120.077011 85.848294) (xy 120.0255 85.8595) (xy 102.2245 85.8595) + (xy 102.157461 85.839815) (xy 102.111706 85.787011) (xy 102.1005 85.7355) (xy 102.1005 81.785815) + (xy 104.755 81.785815) (xy 104.765407 81.887673) (xy 104.820094 82.052709) (xy 104.820096 82.052714) + (xy 104.91137 82.200691) (xy 105.034308 82.323629) (xy 105.182285 82.414903) (xy 105.18229 82.414905) + (xy 105.347326 82.469592) (xy 105.449184 82.479999) (xy 105.449197 82.48) (xy 105.4925 82.48) (xy 105.4925 81.53) + (xy 104.755 81.53) (xy 104.755 81.785815) (xy 102.1005 81.785815) (xy 102.1005 80.774184) (xy 104.755 80.774184) + (xy 104.755 81.03) (xy 105.6185 81.03) (xy 105.685539 81.049685) (xy 105.731294 81.102489) (xy 105.7425 81.154) + (xy 105.7425 81.28) (xy 105.8685 81.28) (xy 105.935539 81.299685) (xy 105.981294 81.352489) (xy 105.9925 81.404) + (xy 105.9925 82.48) (xy 106.035803 82.48) (xy 106.035815 82.479999) (xy 106.137673 82.469592) (xy 106.302709 82.414905) + (xy 106.302714 82.414903) (xy 106.450691 82.323629) (xy 106.573628 82.200692) (xy 106.574159 82.199832) + (xy 106.57468 82.199363) (xy 106.578112 82.195023) (xy 106.578853 82.195608) (xy 106.626101 82.153102) + (xy 106.695063 82.141872) (xy 106.759148 82.169708) (xy 106.781413 82.195398) (xy 106.781493 82.195336) + (xy 106.78289 82.197103) (xy 106.785238 82.199812) (xy 106.785968 82.200995) (xy 106.785974 82.201003) + (xy 106.908996 82.324025) (xy 106.909 82.324028) (xy 107.057066 82.415357) (xy 107.057069 82.415358) + (xy 107.057075 82.415362) (xy 107.222225 82.470087) (xy 107.324152 82.4805) (xy 107.324157 82.4805) + (xy 107.910843 82.4805) (xy 107.910848 82.4805) (xy 108.012775 82.470087) (xy 108.177925 82.415362) + (xy 108.326003 82.324026) (xy 108.449026 82.201003) (xy 108.540362 82.052925) (xy 108.595087 81.887775) + (xy 108.6055 81.785848) (xy 108.6055 81.779986) (xy 108.922501 81.779986) (xy 108.932994 81.882697) + (xy 108.988141 82.049119) (xy 108.988143 82.049124) (xy 109.080184 82.198345) (xy 109.204154 82.322315) + (xy 109.353375 82.414356) (xy 109.35338 82.414358) (xy 109.519802 82.469505) (xy 109.519809 82.469506) + (xy 109.622519 82.479999) (xy 109.684999 82.479998) (xy 109.685 82.479998) (xy 109.685 81.53) (xy 108.922501 81.53) + (xy 108.922501 81.779986) (xy 108.6055 81.779986) (xy 108.6055 80.774152) (xy 108.595087 80.672225) + (xy 108.540362 80.507075) (xy 108.540358 80.507069) (xy 108.540357 80.507066) (xy 108.449029 80.359001) + (xy 108.444733 80.353568) (xy 108.418593 80.288773) (xy 108.418 80.276658) (xy 108.418 80.0049) + (xy 108.437685 79.937861) (xy 108.476904 79.899361) (xy 108.554156 79.851712) (xy 108.678212 79.727656) + (xy 108.770314 79.578334) (xy 108.772875 79.570604) (xy 108.812642 79.513161) (xy 108.877156 79.486334) + (xy 108.945932 79.498645) (xy 108.997135 79.546184) (xy 109.008287 79.5706) (xy 109.038486 79.661734) + (xy 109.130587 79.811055) (xy 109.130589 79.811057) (xy 109.254644 79.935112) (xy 109.303566 79.965287) + (xy 109.350291 80.017235) (xy 109.361514 80.086197) (xy 109.333671 80.150279) (xy 109.303568 80.176364) + (xy 109.204156 80.237682) (xy 109.080184 80.361654) (xy 108.988143 80.510875) (xy 108.988141 80.51088) + (xy 108.932994 80.677302) (xy 108.932993 80.677309) (xy 108.9225 80.780013) (xy 108.9225 81.03) + (xy 109.811 81.03) (xy 109.878039 81.049685) (xy 109.923794 81.102489) (xy 109.935 81.154) (xy 109.935 81.28) + (xy 110.061 81.28) (xy 110.128039 81.299685) (xy 110.173794 81.352489) (xy 110.185 81.404) (xy 110.185 82.479999) + (xy 110.247472 82.479999) (xy 110.247486 82.479998) (xy 110.350197 82.469505) (xy 110.516619 82.414358) + (xy 110.516624 82.414356) (xy 110.665842 82.322317) (xy 110.759464 82.228695) (xy 110.820787 82.19521) + (xy 110.890479 82.200194) (xy 110.934827 82.228695) (xy 111.028844 82.322712) (xy 111.178166 82.414814) + (xy 111.344703 82.469999) (xy 111.447491 82.4805) (xy 112.072508 82.480499) (xy 112.072516 82.480498) + (xy 112.072519 82.480498) (xy 112.128802 82.474748) (xy 112.175297 82.469999) (xy 112.341834 82.414814) + (xy 112.491156 82.322712) (xy 112.615212 82.198656) (xy 112.633374 82.169209) (xy 112.685321 82.122485) + (xy 112.754283 82.111262) (xy 112.818366 82.139105) (xy 112.844452 82.16921) (xy 112.863868 82.200688) + (xy 112.863869 82.20069) (xy 112.986808 82.323629) (xy 113.134785 82.414903) (xy 113.13479 82.414905) + (xy 113.299826 82.469592) (xy 113.401684 82.479999) (xy 113.401697 82.48) (xy 113.445 82.48) (xy 113.445 81.404) + (xy 113.464685 81.336961) (xy 113.517489 81.291206) (xy 113.569 81.28) (xy 113.821 81.28) (xy 113.888039 81.299685) + (xy 113.933794 81.352489) (xy 113.945 81.404) (xy 113.945 82.48) (xy 113.988303 82.48) (xy 113.988315 82.479999) + (xy 114.090173 82.469592) (xy 114.255209 82.414905) (xy 114.255214 82.414903) (xy 114.403191 82.323629) + (xy 114.526128 82.200692) (xy 114.526659 82.199832) (xy 114.52718 82.199363) (xy 114.530612 82.195023) + (xy 114.531353 82.195608) (xy 114.578601 82.153102) (xy 114.647563 82.141872) (xy 114.711648 82.169708) + (xy 114.733913 82.195398) (xy 114.733993 82.195336) (xy 114.73539 82.197103) (xy 114.737738 82.199812) + (xy 114.738468 82.200995) (xy 114.738474 82.201003) (xy 114.861496 82.324025) (xy 114.8615 82.324028) + (xy 115.009566 82.415357) (xy 115.009569 82.415358) (xy 115.009575 82.415362) (xy 115.174725 82.470087) + (xy 115.276652 82.4805) (xy 115.276657 82.4805) (xy 115.863343 82.4805) (xy 115.863348 82.4805) + (xy 115.965275 82.470087) (xy 116.130425 82.415362) (xy 116.278503 82.324026) (xy 116.401526 82.201003) + (xy 116.492862 82.052925) (xy 116.547587 81.887775) (xy 116.558 81.785848) (xy 116.558 80.774152) + (xy 116.547587 80.672225) (xy 116.492862 80.507075) (xy 116.492858 80.507069) (xy 116.492857 80.507066) + (xy 116.401529 80.359001) (xy 116.397233 80.353568) (xy 116.388353 80.331557) (xy 116.375523 80.311593) + (xy 116.372878 80.293197) (xy 116.371093 80.288773) (xy 116.3705 80.276658) (xy 116.3705 80.055548) + (xy 116.390185 79.988509) (xy 116.429404 79.950009) (xy 116.430495 79.949335) (xy 116.453556 79.935112) + (xy 116.577612 79.811056) (xy 116.669714 79.661734) (xy 116.724899 79.495197) (xy 116.7354 79.392409) + (xy 116.735399 78.392392) (xy 116.724899 78.289603) (xy 116.669714 78.123066) (xy 116.577612 77.973744) + (xy 116.453556 77.849688) (xy 116.318344 77.766289) (xy 116.304236 77.757587) (xy 116.304231 77.757585) + (xy 116.302762 77.757098) (xy 116.137697 77.702401) (xy 116.137695 77.7024) (xy 116.03491 77.6919) + (xy 115.409898 77.6919) (xy 115.40988 77.691901) (xy 115.307103 77.7024) (xy 115.3071 77.702401) + (xy 115.140568 77.757585) (xy 115.140563 77.757587) (xy 114.991242 77.849689) (xy 114.909581 77.931351) + (xy 114.848258 77.964836) (xy 114.778566 77.959852) (xy 114.722633 77.91798) (xy 114.698216 77.852516) + (xy 114.6979 77.84367) (xy 114.6979 76.836155) (xy 114.697899 76.836153) (xy 114.667138 76.68151) + (xy 114.667137 76.681503) (xy 114.632424 76.597698) (xy 114.606797 76.535827) (xy 114.60679 76.535814) + (xy 114.51919 76.404712) (xy 114.519189 76.404711) (xy 114.407689 76.293211) (xy 114.323889 76.209411) + (xy 113.489492 75.375013) (xy 113.489488 75.37501) (xy 113.358385 75.287409) (xy 113.358372 75.287402) + (xy 113.212701 75.227064) (xy 113.212689 75.227061) (xy 113.058045 75.1963) (xy 113.058042 75.1963) + (xy 110.365642 75.1963) (xy 106.911243 75.1963) (xy 106.753558 75.1963) (xy 106.753555 75.1963) + (xy 106.59891 75.227061) (xy 106.598898 75.227064) (xy 106.453227 75.287402) (xy 106.453214 75.287409) + (xy 106.322111 75.37501) (xy 106.322107 75.375013) (xy 105.487711 76.209411) (xy 105.43196 76.265162) + (xy 105.376209 76.320912) (xy 105.288609 76.452014) (xy 105.288602 76.452027) (xy 105.228264 76.597698) + (xy 105.228261 76.59771) (xy 105.1975 76.752353) (xy 105.1975 77.78427) (xy 105.177815 77.851309) + (xy 105.161181 77.871951) (xy 105.142789 77.890342) (xy 105.050687 78.039663) (xy 105.050685 78.039668) + (xy 105.023051 78.123063) (xy 104.995501 78.206203) (xy 104.995501 78.206204) (xy 104.9955 78.206204) + (xy 104.985 78.308983) (xy 104.985 79.309001) (xy 104.985001 79.309019) (xy 104.9955 79.411796) + (xy 104.995501 79.411799) (xy 105.048123 79.5706) (xy 105.050686 79.578334) (xy 105.142788 79.727656) + (xy 105.266844 79.851712) (xy 105.320385 79.884736) (xy 105.367109 79.936682) (xy 105.378332 80.005644) + (xy 105.350489 80.069727) (xy 105.294293 80.10798) (xy 105.182288 80.145095) (xy 105.182285 80.145096) + (xy 105.034308 80.23637) (xy 104.91137 80.359308) (xy 104.820096 80.507285) (xy 104.820094 80.50729) + (xy 104.765407 80.672326) (xy 104.755 80.774184) (xy 102.1005 80.774184) (xy 102.1005 74.2845) (xy 102.120185 74.217461) + (xy 102.172989 74.171706) (xy 102.2245 74.1605) (xy 120.0255 74.1605) + ) + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_sch b/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_sch new file mode 100644 index 0000000000..8df135f742 --- /dev/null +++ b/qa/data/eeschema/issue20173/Kicad 9 - multi channel test.kicad_sch @@ -0,0 +1,1717 @@ +(kicad_sch + (version 20250114) + (generator "eeschema") + (generator_version "9.0") + (uuid "15f2ea90-edbc-42f9-8cbc-f5c438c83640") + (paper "A4") + (lib_symbols + (symbol "Device:LED" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 1.016) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "D" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "LED" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "LED diode" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "LED_0_1" + (polyline + (pts + (xy -3.048 -0.762) (xy -4.572 -2.286) (xy -3.81 -2.286) (xy -4.572 -2.286) (xy -4.572 -1.524) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.778 -0.762) (xy -3.302 -2.286) (xy -2.54 -2.286) (xy -3.302 -2.286) (xy -3.302 -1.524) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.27 0) (xy 1.27 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.27 -1.27) (xy -1.27 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.27 -1.27) (xy 1.27 1.27) (xy -1.27 0) (xy 1.27 -1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "LED_1_1" + (pin passive line + (at -3.81 0 0) + (length 2.54) + (name "K" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 3.81 0 180) + (length 2.54) + (name "A" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "Device:R" + (pin_numbers + (hide yes) + ) + (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) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (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) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:GND" + (power) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) (xy 0 -1.27) (xy 1.27 -1.27) (xy 0 -2.54) (xy -1.27 -1.27) (xy 0 -1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "GND_1_1" + (pin power_in line + (at 0 0 270) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:PWR_FLAG" + (power) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#FLG" + (at 0 1.905 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "PWR_FLAG_0_0" + (pin power_out line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (symbol "PWR_FLAG_0_1" + (polyline + (pts + (xy 0 0) (xy 0 1.27) (xy -1.016 1.905) (xy 0 2.54) (xy 1.016 1.905) (xy 0 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:VCC" + (power) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "VCC" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "VCC_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "VCC_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + ) + (junction + (at 119.38 55.88) + (diameter 0) + (color 0 0 0 0) + (uuid "1234be6d-4326-44b3-994e-0d68cf78215a") + ) + (junction + (at 119.38 87.63) + (diameter 0) + (color 0 0 0 0) + (uuid "e521bb4b-e049-4dd1-9c4e-91aee3813098") + ) + (wire + (pts + (xy 128.27 55.88) (xy 119.38 55.88) + ) + (stroke + (width 0) + (type default) + ) + (uuid "2b85c5f6-518d-47f7-84bb-a3ce4cf4382a") + ) + (wire + (pts + (xy 119.38 67.31) (xy 119.38 69.85) + ) + (stroke + (width 0) + (type default) + ) + (uuid "4a622d1e-847a-4066-bf77-fe12bd9efba5") + ) + (wire + (pts + (xy 128.27 59.69) (xy 128.27 55.88) + ) + (stroke + (width 0) + (type default) + ) + (uuid "5eda962b-1ee9-43ed-bfb1-458898ab2212") + ) + (wire + (pts + (xy 119.38 87.63) (xy 128.27 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "76da558e-5c52-410d-8bd3-cb14a9f8a9d7") + ) + (wire + (pts + (xy 128.27 67.31) (xy 128.27 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a7ea82e4-ed4e-4248-b83a-095dd083ee4c") + ) + (wire + (pts + (xy 110.49 80.01) (xy 110.49 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "aa053e37-7ad1-49c2-9fe2-d9481ab868e2") + ) + (wire + (pts + (xy 128.27 87.63) (xy 128.27 80.01) + ) + (stroke + (width 0) + (type default) + ) + (uuid "afc07256-06b6-4011-aae6-cc864e180c81") + ) + (wire + (pts + (xy 110.49 67.31) (xy 110.49 72.39) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b4bdb6a4-4b2c-43c2-ab40-653f326c2bdf") + ) + (wire + (pts + (xy 110.49 87.63) (xy 119.38 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c0eea1b4-879b-4ca8-b5d4-94f63ca28fd7") + ) + (wire + (pts + (xy 119.38 87.63) (xy 119.38 96.52) + ) + (stroke + (width 0) + (type default) + ) + (uuid "cf050ad6-ea48-4f33-96ca-cb73c5f32915") + ) + (wire + (pts + (xy 110.49 59.69) (xy 110.49 55.88) + ) + (stroke + (width 0) + (type default) + ) + (uuid "e010f0d9-d80f-4182-bef8-ed2d7dbb9f7e") + ) + (wire + (pts + (xy 110.49 55.88) (xy 119.38 55.88) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f02b7a0c-18c4-4c4c-9d9a-b9c7b1007dea") + ) + (wire + (pts + (xy 119.38 77.47) (xy 119.38 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f91dcfa9-8452-44ed-9d67-31a016e17723") + ) + (wire + (pts + (xy 119.38 59.69) (xy 119.38 55.88) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f9c16bce-b680-47a8-ae75-11d17170ccff") + ) + (symbol + (lib_id "power:GND") + (at 163.83 59.69 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "08532b00-b13d-41d8-b4bf-78365fbfdaaf") + (property "Reference" "#PWR0204" + (at 163.83 66.04 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 163.83 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "1119782b-4fab-4a8d-bddb-7d544f11d1a2") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#PWR0204") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 128.27 63.5 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "1e350e6c-d7b6-42c0-9b3d-bbd07635c56b") + (property "Reference" "R3" + (at 130.81 62.2299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "R" + (at 130.81 64.7699 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" + (at 126.492 63.5 90) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 128.27 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 128.27 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "35c618b6-69f4-477d-8f41-29ae4468683e") + ) + (pin "2" + (uuid "cd3961f8-7a39-4445-a95c-0ab6240d90b4") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "R3") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 163.83 59.69 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "4c64d3a9-3a45-482d-b5df-131550b2a587") + (property "Reference" "#FLG0202" + (at 163.83 57.785 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 163.83 54.61 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 163.83 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "432db57f-5e70-496b-9145-c69858557fdf") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#FLG0202") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 119.38 96.52 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "603bf677-8469-43dd-b0ae-759f428a6490") + (property "Reference" "#PWR0202" + (at 119.38 102.87 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 119.38 101.6 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 119.38 96.52 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 119.38 96.52 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 119.38 96.52 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "fd376d2b-f8be-4c49-8175-64fe859f65e5") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#PWR0202") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:LED") + (at 128.27 76.2 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "63e66f53-7bb2-44bc-b628-3b6878308c4a") + (property "Reference" "D2" + (at 132.08 76.5174 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Value" "LED" + (at 132.08 79.0574 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Footprint" "LED_SMD:LED_0805_2012Metric" + (at 128.27 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 128.27 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 128.27 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 128.27 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "2" + (uuid "ab7406f5-5171-4663-b6a2-f92a3e5a01ec") + ) + (pin "1" + (uuid "dc0f919f-0f15-480e-9cf7-f27e20e4303e") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "D2") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 148.59 59.69 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "66d744e4-aa86-479b-94c3-d00487f7ad3c") + (property "Reference" "#PWR0203" + (at 148.59 55.88 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "VCC" + (at 148.59 64.77 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "2101c3b7-0b76-4ce9-9355-2d814736e5b0") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#PWR0203") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 119.38 63.5 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "88bd4be0-a160-4809-be45-e506fc1372d5") + (property "Reference" "R2" + (at 121.92 62.2299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "R" + (at 121.92 64.7699 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" + (at 117.602 63.5 90) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 119.38 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 119.38 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "abe3a242-ddef-49c5-8480-804375397b34") + ) + (pin "2" + (uuid "dcf3dfec-676b-4897-b98b-14d00f92fc6b") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "R2") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 148.59 59.69 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "a7eafd5a-5ca2-461a-9a16-67c9b1a62e4c") + (property "Reference" "#FLG0201" + (at 148.59 57.785 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 148.59 54.61 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 148.59 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "16ee8828-74e6-42ee-a42b-128c990be80c") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#FLG0201") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:LED") + (at 110.49 76.2 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "bec7c2c9-cf7c-4502-a56a-abeef2e3e002") + (property "Reference" "D1" + (at 114.3 76.5174 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Value" "LED" + (at 114.3 79.0574 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Footprint" "LED_SMD:LED_0805_2012Metric" + (at 110.49 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 110.49 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 110.49 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 110.49 76.2 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "2" + (uuid "d70d5d22-00bf-417c-a3f5-96c9adbcd459") + ) + (pin "1" + (uuid "41bafe4a-cf92-4425-9e10-6395ed2bcc48") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "D1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 119.38 73.66 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "df68f759-54ab-4cee-80ea-27062539a543") + (property "Reference" "R4" + (at 121.92 72.3899 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "R" + (at 121.92 74.9299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" + (at 117.602 73.66 90) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 119.38 73.66 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 119.38 73.66 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "d7e5bc95-33bd-4885-a758-2e09fbe5ecdb") + ) + (pin "2" + (uuid "50fbab81-2c30-4264-b806-bf1518aeafa7") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "R4") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:VCC") + (at 119.38 55.88 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "dfb89aa7-b798-4e45-ab7f-e3adecb67252") + (property "Reference" "#PWR0201" + (at 119.38 59.69 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "VCC" + (at 119.38 50.8 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 119.38 55.88 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 119.38 55.88 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"VCC\"" + (at 119.38 55.88 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "a5318f40-aa36-402f-a7bc-5ec263b63849") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "#PWR0201") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 110.49 63.5 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "ff631414-5e9a-4c20-b59e-8e88f221d6c4") + (property "Reference" "R1" + (at 113.03 62.2299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "R" + (at 113.03 64.7699 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" + (at 108.712 63.5 90) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 110.49 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 110.49 63.5 0) + (effects + (hide yes) + ) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "14f2094e-5f5b-42cc-9b99-5e54e4dfb147") + ) + (pin "2" + (uuid "0a45fd0e-0420-49ea-960d-186c832c401f") + ) + (instances + (project "" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8/5c8e081e-c918-45c7-9d6e-0c91e6f2b219" + (reference "R1") + (unit 1) + ) + ) + ) + ) +) diff --git a/qa/data/eeschema/issue20173/issue20173.kicad_pcb b/qa/data/eeschema/issue20173/issue20173.kicad_pcb new file mode 100644 index 0000000000..97f92381bc --- /dev/null +++ b/qa/data/eeschema/issue20173/issue20173.kicad_pcb @@ -0,0 +1,1538 @@ +(kicad_pcb + (version 20241229) + (generator "pcbnew") + (generator_version "9.0") + (general + (thickness 1.6) + (legacy_teardrops no) + ) + (paper "A4") + (layers + (0 "F.Cu" signal) + (2 "B.Cu" signal) + (9 "F.Adhes" user "F.Adhesive") + (11 "B.Adhes" user "B.Adhesive") + (13 "F.Paste" user) + (15 "B.Paste" user) + (5 "F.SilkS" user "F.Silkscreen") + (7 "B.SilkS" user "B.Silkscreen") + (1 "F.Mask" user) + (3 "B.Mask" user) + (17 "Dwgs.User" user "User.Drawings") + (19 "Cmts.User" user "User.Comments") + (21 "Eco1.User" user "User.Eco1") + (23 "Eco2.User" user "User.Eco2") + (25 "Edge.Cuts" user) + (27 "Margin" user) + (31 "F.CrtYd" user "F.Courtyard") + (29 "B.CrtYd" user "B.Courtyard") + (35 "F.Fab" user) + (33 "B.Fab" user) + (39 "User.1" user) + (41 "User.2" user) + (43 "User.3" user) + (45 "User.4" user) + ) + (setup + (pad_to_mask_clearance 0) + (allow_soldermask_bridges_in_footprints no) + (tenting front back) + (pcbplotparams + (layerselection 0x00000000_00000000_55555555_5755f5ff) + (plot_on_all_layers_selection 0x00000000_00000000_00000000_00000000) + (disableapertmacros no) + (usegerberextensions no) + (usegerberattributes yes) + (usegerberadvancedattributes yes) + (creategerberjobfile yes) + (dashed_line_dash_ratio 12.000000) + (dashed_line_gap_ratio 3.000000) + (svgprecision 4) + (plotframeref no) + (mode 1) + (useauxorigin no) + (hpglpennumber 1) + (hpglpenspeed 20) + (hpglpendiameter 15.000000) + (pdf_front_fp_property_popups yes) + (pdf_back_fp_property_popups yes) + (pdf_metadata yes) + (pdf_single_document no) + (dxfpolygonmode yes) + (dxfimperialunits yes) + (dxfusepcbnewfont yes) + (psnegative no) + (psa4output no) + (plot_black_and_white yes) + (plotinvisibletext no) + (sketchpadsonfab no) + (plotpadnumbers no) + (hidednponfab no) + (sketchdnponfab yes) + (crossoutdnponfab yes) + (subtractmaskfromsilk no) + (outputformat 1) + (mirror no) + (drillshape 1) + (scaleselection 1) + (outputdirectory "") + ) + ) + (net 0 "") + (net 1 "GND") + (net 2 "VCC") + (net 3 "Net-(D1-A)") + (net 4 "Net-(D2-A)") + (net 5 "Net-(R2-Pad2)") + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "2ac25eff-3a24-4b56-a0ff-165edbcf69dc") + (at 138.8383 87.7824) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R2" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "1023a2df-31ac-4b3d-b378-0309a51dd2a8") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "863fc2e0-9639-46e8-8ccf-ef06096b46c9") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "b7f250e5-c8b5-4e2d-ae50-85f3483e4c3d") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "91e08b49-ee67-4709-9c98-6e217dbfa722") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/88bd4be0-a160-4809-be45-e506fc1372d5") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "c1b92d3b-3540-4f8f-a407-c2eb072433b3") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "8f66c347-2b85-47ba-a292-020c29b1432c") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "59ff9b98-9e7f-4814-81b0-fac60a83be47") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "866f5a10-f365-4bb3-975c-79fc53ceecc3") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "3444f38c-5c06-493c-8e05-ae91268d6356") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "127a33ce-037b-4e3f-ae41-86629863284c") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "0bb93312-58d9-482d-aebc-8ca9e5e54639") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "99aed0a7-8f28-4d44-ac26-005bc5e5c06a") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "8aba774f-207b-4b51-8568-25748ef2683e") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "95182723-fb47-4ecc-8140-db951450d691") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "26e2e945-be59-4789-b4da-db6f9bb403a2") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "07338672-76e9-447f-9291-d32dd536bef7") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 5 "Net-(R2-Pad2)") + (pintype "passive") + (uuid "361c26e3-de85-463c-baf1-e7fd4d7bfe5e") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "LED_SMD:LED_0805_2012Metric" + (layer "F.Cu") + (uuid "7044fc9a-441a-4d4f-9f56-020d64f0c3c8") + (at 134.62 90.17) + (descr "LED SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D2" + (at -3.048 0 0) + (layer "F.SilkS") + (uuid "addd13eb-2bce-45af-8cd6-1985c841de2f") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "LED" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "f02a4409-6b96-4c81-bcbf-ccf08bcedf19") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "7a94f6c0-da91-4c93-a995-3005d5d36933") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "fd9e765a-5797-4407-8e4a-f43d5534dda4") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c6308b58-4553-4122-bda1-fcc258fc6e3d") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/63e66f53-7bb2-44bc-b628-3b6878308c4a") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -1.685 -0.96) + (end -1.685 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "e9569173-c0e2-4d5d-a7d7-e084d3cfb5c9") + ) + (fp_line + (start -1.685 0.96) + (end 1 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "bcfc1f99-e3e7-42af-8ab8-43b7babf3970") + ) + (fp_line + (start 1 -0.96) + (end -1.685 -0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "c8946cfd-2f3a-4d8c-aa76-33ce6d3934b3") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "b3c28020-58c2-4e42-94c8-da86fc762075") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "f82ebeb8-e04a-4b64-b9e4-43183f9e4af1") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "503140b2-4708-4600-86fa-e2a30f1fadb6") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "1f0a9b17-1c00-496e-9cd3-8b0b9fae8df0") + ) + (fp_line + (start -1 -0.3) + (end -1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "377453bb-5e97-415f-8146-939ed77029b4") + ) + (fp_line + (start -1 0.6) + (end 1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "8d98bfd8-574d-43f3-ac9b-530fff555489") + ) + (fp_line + (start -0.7 -0.6) + (end -1 -0.3) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "2f225b28-313c-46e8-b486-9a49c7b4f0b8") + ) + (fp_line + (start 1 -0.6) + (end -0.7 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6e999972-84bd-41b6-a917-33c5e57c4dc7") + ) + (fp_line + (start 1 0.6) + (end 1 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "847b3c1c-e729-4c33-b1be-eeadc33750e8") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "b7181ab0-4dfc-47aa-b9a3-eb61dda03003") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "GND") + (pinfunction "K") + (pintype "passive") + (uuid "2fdbf401-fd0f-4053-8484-ca070f3a533b") + ) + (pad "2" smd roundrect + (at 0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(D2-A)") + (pinfunction "A") + (pintype "passive") + (uuid "2abab76f-72b0-42e5-b1f5-0e76d13be787") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "8b5f82a2-be13-46a4-a0e4-d723170c10b6") + (at 142.7499 87.7824) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R3" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "a82d0a3d-0582-499c-be6d-9fb9147e83de") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "482b1541-91d1-484d-b899-a9f71c5dd6f5") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "f1121945-87a2-4755-9546-70b82935cc25") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "cecdedea-91a7-4007-9436-5836c8e49f55") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/ff631414-5e9a-4c20-b59e-8e88f221d6c4") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "7509a531-cf98-47c5-9eea-28151c1e3ff3") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "0abc6e7f-589d-4fa9-a73a-00117fd53bc8") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "8d05662f-88bb-4039-9d5b-76daed2549f5") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "71d7cc2a-6970-4ffd-bb2e-8ebb4fc48d4a") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "6b3b898f-1c38-4862-8422-1b077f8197a1") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "2486b546-a235-4a3a-952d-9780aa8d16a2") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "af12e599-51fb-47d4-9738-41afc5acbdf8") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "98fb198e-fc47-4afd-b830-4d8d53c7d91e") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "e4f41eef-41a3-4e38-bf81-006c46e7db66") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "088df414-e209-4240-b365-115b32f71e3c") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "864ddbd5-1bb8-446b-921f-929d2ac8bc58") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "14c347ee-bfb7-402a-85cd-88a1497a6540") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 3 "Net-(D1-A)") + (pintype "passive") + (uuid "bb226019-e505-4cf3-81f9-e6d692df4c30") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "LED_SMD:LED_0805_2012Metric" + (layer "F.Cu") + (uuid "9c33d16b-e9ee-4d9c-ac2c-42e98d3a13d9") + (at 142.5725 90.17) + (descr "LED SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D1" + (at 2.9695 0 0) + (layer "F.SilkS") + (uuid "db07e1ad-a55d-4563-9af0-b74c153c4c10") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "LED" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "5fb9ad67-b439-4bb1-aafd-4ce615942409") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c9359788-40a9-4a87-88be-8ab05feb9cbe") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "9a1aae82-461f-4df7-a93d-85cc790dbf6d") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Sim.Pins" "1=K 2=A" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "91fb058d-4d15-4430-b043-0e85735c0269") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/bec7c2c9-cf7c-4502-a56a-abeef2e3e002") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -1.685 -0.96) + (end -1.685 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a3a833c9-b9e0-4d3c-9537-987e062f49e4") + ) + (fp_line + (start -1.685 0.96) + (end 1 0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "60c6fc8d-1925-448b-943a-50bab0d6ae8c") + ) + (fp_line + (start 1 -0.96) + (end -1.685 -0.96) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "b5359b89-43fe-49a4-9e94-7ba6a7e363a0") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "8c56d4c1-abcc-481c-bd9a-39528e113741") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "9910dd36-9593-457f-9807-512eb79659f5") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "cc38ab59-09a8-41aa-a696-96938bf4998f") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "2823aaf6-3722-472e-8fb4-3c8c106c6d8b") + ) + (fp_line + (start -1 -0.3) + (end -1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "1ab75139-24ba-48a6-8142-af9c2a40d507") + ) + (fp_line + (start -1 0.6) + (end 1 0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "b99732f3-4576-4262-bd3c-f8de8df005c1") + ) + (fp_line + (start -0.7 -0.6) + (end -1 -0.3) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "18a55e2c-ed2e-4198-be1b-33849bbb052f") + ) + (fp_line + (start 1 -0.6) + (end -0.7 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "b13ad00c-80c4-4fa5-b983-ffc0bab02778") + ) + (fp_line + (start 1 0.6) + (end 1 -0.6) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "cd8a87ea-aacf-48b5-bf3f-8c966cdabd5a") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "da58867d-e55a-4d1c-a5a9-e7421e30ca9a") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "GND") + (pinfunction "K") + (pintype "passive") + (uuid "fc9e431f-f318-4724-a5c4-71e19148a44a") + ) + (pad "2" smd roundrect + (at 0.9375 0) + (size 0.975 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 3 "Net-(D1-A)") + (pinfunction "A") + (pintype "passive") + (uuid "f1de662a-f31a-4294-b7a9-91c956e836cf") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "a2dffcb3-7efc-4d7f-b059-eb250a1ba66c") + (at 138.7875 90.17 180) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R4" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "676176a0-d472-4311-bbcc-6b26077dbb3b") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "e790a251-3bc4-4b40-8349-3d0a98660c2c") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 180) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "8ee4015d-a2e0-4fd7-a7f5-ddc0b232e1be") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 180) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c5246b99-4e70-4d4d-b11b-8693d6231575") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/df68f759-54ab-4cee-80ea-27062539a543") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "5919e81a-0ba6-4e58-a9b3-45fc4f6f1b02") + ) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "05225cb7-b192-4e8f-b774-d14e30539438") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "f67cc031-1fbb-4e3a-8509-2aa7cdd850cf") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "1adcce62-c63c-45c6-bb46-fe93e5388c2e") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "65d41331-8434-4ac8-8344-41afe63430a0") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "4ac17ad9-16d6-41de-913f-9adfdbf76c9a") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "e54942e5-3cd0-4196-bd63-8e62f060b751") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "28630b17-27a1-4aea-8a89-200f45c643ff") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "e450be6f-135c-41a0-9283-4c5abcc08b1e") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "bde348cf-73bb-46bd-8a05-feff88351605") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "da067f60-d4b8-4f5c-b40b-4b6077bdd712") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0 180) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 5 "Net-(R2-Pad2)") + (pintype "passive") + (uuid "38afa531-8686-4729-aa09-9adc8aebc1ed") + ) + (pad "2" smd roundrect + (at 0.9125 0 180) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 1 "GND") + (pintype "passive") + (uuid "048383d5-afab-4aa1-9d78-838c4c18b339") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "b56d145a-64ae-49c3-b15e-fe2783ce90bd") + (at 134.8505 87.699) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R1" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "3c5a4c6a-ef8d-491c-9124-5b5c57086f01") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (hide yes) + (uuid "c0ff7c8d-327b-4701-9a9a-09582bcad956") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "bbeb65dc-35de-4907-8946-f573c3f13f4f") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "af59d492-9051-4ba7-b9b5-48662ea2615a") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "R_*") + (path "/5c8e081e-c918-45c7-9d6e-0c91e6f2b219/1e350e6c-d7b6-42c0-9b3d-bbd07635c56b") + (sheetname "/ch1/") + (sheetfile "Kicad 9 - multi channel test.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "436a3700-b407-4847-b6d1-78fa3f7b3fb5") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "50747149-9029-486c-a1b6-8ebfdfbbe58f") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "ed1e18ac-836d-4f68-9d0b-785bf3768657") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "344359a7-34c8-4f13-929b-ba7ed1e88ecc") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "b167be98-a8e9-41da-8e68-b29f596b46b0") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "62e2cda4-d8e7-46be-8865-70e07e4eb4da") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "a03cba97-7783-45ad-9cab-5c6a8ebb5dba") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "487540ff-8159-47e6-b151-9a6d9ec43f38") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "40689eb1-e98c-489d-8991-03f9ca556e3d") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "54a66f26-04ea-4714-ba87-58a4bde8bcde") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "d42f19b2-e628-4af1-8d56-c6468dcaf967") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 2 "VCC") + (pintype "passive") + (uuid "18fa743a-ed16-4462-8128-5cf8df09cba4") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.243902) + (net 4 "Net-(D2-A)") + (pintype "passive") + (uuid "b1e54c88-7688-49e8-a422-48a024b038eb") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (gr_rect + (start 129.54 82.55) + (end 148.59 95.25) + (stroke + (width 0.05) + (type default) + ) + (fill no) + (layer "Edge.Cuts") + (uuid "104d3428-ea49-42b4-93d4-4efde5486d2f") + ) + (segment + (start 138.43 91.44) + (end 134.9525 91.44) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "6d0f6dd5-4090-4d2f-aac3-dae8ca582c36") + ) + (segment + (start 141.635 90.17) + (end 140.365 91.44) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "9429ffcc-a61c-485c-af6d-5f3f96a991fb") + ) + (segment + (start 137.875 90.885) + (end 138.43 91.44) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "9635f120-a5f6-4d1e-ad66-70ff222a1b0b") + ) + (segment + (start 137.875 90.17) + (end 137.875 90.885) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "a6c4008c-04b0-4f3d-b267-3629edb77d3f") + ) + (segment + (start 140.365 91.44) + (end 138.43 91.44) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "d72f0fba-330f-49b2-9fba-a7468fcd8594") + ) + (segment + (start 134.9525 91.44) + (end 133.6825 90.17) + (width 0.6) + (layer "F.Cu") + (net 1) + (uuid "e49b3f37-4b86-4896-a021-8153dc15f699") + ) + (segment + (start 137.9258 85.1878) + (end 138.2268 84.8868) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "264dadf2-6a53-4400-a197-b45a411f52ed") + ) + (segment + (start 138.2268 84.8868) + (end 140.9192 84.8868) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "2ea94667-2030-4a63-91c3-f441ec591f0f") + ) + (segment + (start 140.9192 84.8868) + (end 141.8374 85.805) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "3f7110c4-1c29-4fcf-8733-154bcdd64fc9") + ) + (segment + (start 134.7724 84.8868) + (end 138.2268 84.8868) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "5168d9e7-b9b2-401c-8e93-48d25bec0b33") + ) + (segment + (start 133.938 87.699) + (end 133.938 85.7212) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "ab146f5a-fe41-414d-bf6e-03477fce608f") + ) + (segment + (start 133.938 85.7212) + (end 134.7724 84.8868) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "dd10737e-7e5c-4200-b8aa-0dead19c19c2") + ) + (segment + (start 141.8374 85.805) + (end 141.8374 87.7824) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "eb1889da-5c53-4ef9-a522-d53800af344c") + ) + (segment + (start 137.9258 87.7824) + (end 137.9258 85.1878) + (width 0.6) + (layer "F.Cu") + (net 2) + (uuid "f38678af-5d39-4d22-b7b7-6961f047d4ee") + ) + (segment + (start 143.51 90.17) + (end 143.51 87.9348) + (width 0.6) + (layer "F.Cu") + (net 3) + (uuid "d929583d-d47c-4549-a7a2-d820c24889cc") + ) + (segment + (start 143.51 87.9348) + (end 143.6624 87.7824) + (width 0.6) + (layer "F.Cu") + (net 3) + (uuid "eebedf79-3cd9-4042-bf06-d8a59b06b130") + ) + (segment + (start 135.5575 87.9045) + (end 135.763 87.699) + (width 0.6) + (layer "F.Cu") + (net 4) + (uuid "bb6fe02c-c087-4c37-b0ef-b6d1b66d893b") + ) + (segment + (start 135.5575 90.17) + (end 135.5575 87.9045) + (width 0.6) + (layer "F.Cu") + (net 4) + (uuid "c686cbaf-6011-441c-9ccf-9e1ad9e4218b") + ) + (segment + (start 139.7 90.17) + (end 139.7 87.8332) + (width 0.6) + (layer "F.Cu") + (net 5) + (uuid "33b581c3-d980-46b5-ae7b-9c2fd09eb868") + ) + (segment + (start 139.7 87.8332) + (end 139.7508 87.7824) + (width 0.6) + (layer "F.Cu") + (net 5) + (uuid "cf4be217-0119-4eee-b749-34a2872f93cd") + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/issue20173/issue20173.kicad_pro b/qa/data/eeschema/issue20173/issue20173.kicad_pro new file mode 100644 index 0000000000..04f7f63f96 --- /dev/null +++ b/qa/data/eeschema/issue20173/issue20173.kicad_pro @@ -0,0 +1,635 @@ +{ + "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": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "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": true, + "text_position": 0, + "units_format": 0 + }, + "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": 0.8, + "height": 1.27, + "width": 2.54 + }, + "silk_line_width": 0.1, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.1, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.5 + } + }, + "diff_pair_dimensions": [ + { + "gap": 0.0, + "via_gap": 0.0, + "width": 0.0 + } + ], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "creepage": "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_filters_mismatch": "ignore", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_to_hole": "warning", + "holes_co_located": "warning", + "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", + "mirrored_text_on_front_layer": "warning", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "nonmirrored_text_on_back_layer": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "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_angle": "error", + "track_dangling": "warning", + "track_segment_length": "error", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.5, + "min_groove_width": 0.0, + "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.3, + "min_track_width": 0.0, + "min_via_annular_width": 0.1, + "min_via_diameter": 0.5, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpthpad": true, + "td_onroundshapesonly": false, + "td_onsmdpad": true, + "td_ontrackend": false, + "td_onvia": 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.6 + ], + "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 + } + ], + "zones_allow_external_fillets": false + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_pairs": [], + "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", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "footprint_filter": "ignore", + "footprint_link_issues": "warning", + "four_way_junction": "ignore", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "label_multiple_wires": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "ignore", + "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", + "same_local_global_label": "warning", + "similar_label_and_power": "warning", + "similar_labels": "warning", + "similar_power": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "ignore", + "unannotated": "error", + "unconnected_wire_endpoint": "warning", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "issue20173.kicad_pro", + "version": 3 + }, + "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)", + "priority": 2147483647, + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 4 + }, + "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_export_filename": "${PROJECTNAME}.csv", + "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": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + }, + { + "group_by": true, + "label": "Exclude from BOM", + "name": "${EXCLUDE_FROM_BOM}", + "show": true + }, + { + "group_by": true, + "label": "Exclude from Board", + "name": "${EXCLUDE_FROM_BOARD}", + "show": true + }, + { + "group_by": true, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Datasheet", + "name": "Datasheet", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "include_excluded_from_bom": true, + "name": "Default Editing", + "sort_asc": true, + "sort_field": "Referenz" + }, + "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.375, + "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": 25.0, + "text_offset_ratio": 0.15 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "page_layout_descr_file": "", + "plot_directory": "", + "space_save_all_events": true, + "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": [ + [ + "21e8e9f8-d4f3-4be5-903f-68da096527c8", + "Root" + ], + [ + "5c8e081e-c918-45c7-9d6e-0c91e6f2b219", + "ch1" + ] + ], + "text_variables": {} +} diff --git a/qa/data/eeschema/issue20173/issue20173.kicad_sch b/qa/data/eeschema/issue20173/issue20173.kicad_sch new file mode 100644 index 0000000000..e69a66988c --- /dev/null +++ b/qa/data/eeschema/issue20173/issue20173.kicad_sch @@ -0,0 +1,67 @@ +(kicad_sch + (version 20250114) + (generator "eeschema") + (generator_version "9.0") + (uuid "21e8e9f8-d4f3-4be5-903f-68da096527c8") + (paper "A4") + (lib_symbols) + (text "- look into subsheet CH1 - find symbols R1, R2, R3, R4, D1, D2\n- back to root sheet\n- copy/paste (CTRL+C, CTRL+V) the subsheet to get a second instance of that subsheet\n- look again into subsheet CH1 - still looks good\n- switch to subsheet CH2 - references R5...R8, D3, D4 - looks also good\n- no switch back to original subsheet CH1: suddenly we have there the same references as in subsheet CH2!\n- run ERC: get a ton of \"duplicate references\" errors" + (exclude_from_sim no) + (at 17.78 30.48 0) + (effects + (font + (size 2.54 2.54) + ) + (justify left) + ) + (uuid "8e1ac652-de72-4718-891f-f676745884c5") + ) + (sheet + (at 48.26 49.53) + (size 67.31 25.4) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (stroke + (width 0.1524) + (type solid) + ) + (fill + (color 0 0 0 0.0000) + ) + (uuid "5c8e081e-c918-45c7-9d6e-0c91e6f2b219") + (property "Sheetname" "ch1" + (at 48.26 48.8184 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left bottom) + ) + ) + (property "Sheetfile" "Kicad 9 - multi channel test.kicad_sch" + (at 48.26 75.5146 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left top) + ) + ) + (instances + (project "issue20173" + (path "/21e8e9f8-d4f3-4be5-903f-68da096527c8" + (page "2") + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/tests/eeschema/CMakeLists.txt b/qa/tests/eeschema/CMakeLists.txt index 21e4b06564..8d4baece50 100644 --- a/qa/tests/eeschema/CMakeLists.txt +++ b/qa/tests/eeschema/CMakeLists.txt @@ -64,6 +64,7 @@ set( QA_EESCHEMA_SRCS erc/test_erc_wire_bus_entry.cpp test_connectivity_algo.cpp + test_issue20173_paste_subsheet.cpp test_nc_pin_connectivity.cpp test_crossing_label.cpp test_eagle_plugin.cpp diff --git a/qa/tests/eeschema/test_issue20173_paste_subsheet.cpp b/qa/tests/eeschema/test_issue20173_paste_subsheet.cpp new file mode 100644 index 0000000000..20e7f6ec88 --- /dev/null +++ b/qa/tests/eeschema/test_issue20173_paste_subsheet.cpp @@ -0,0 +1,710 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright The 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 3 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file test_issue20173_paste_subsheet.cpp + * + * Test for issue #20173: Copy/paste subsheet causes original sheet's references to be corrupted. + * + * The test verifies that when a subsheet is copy/pasted to create a second instance sharing + * the same screen file, the original sheet's symbol references are preserved correctly. + * + * Bug scenario: + * - Start with a root sheet containing subsheet CH1 with symbols R1, R2, R3, R4, D1, D2 + * - Copy/paste CH1 to create CH2 (which shares the same screen as CH1) + * - CH2 gets new references: R5...R8, D3, D4 (via annotation) + * - BUG: When navigating back to CH1, references show R5...R8, D3, D4 instead of R1...R4, D1, D2 + * + * Root cause: When a shared screen is used, symbol instances for the original path may be + * incorrectly modified or lost during the paste operation. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +struct ISSUE20173_FIXTURE +{ + ISSUE20173_FIXTURE() + { } + + SETTINGS_MANAGER m_settingsManager; + std::unique_ptr m_schematic; +}; + + +/** + * Helper function to get all symbol references for a given sheet path. + * Returns a map of symbol UUID -> reference designator. + */ +std::map GetSymbolReferences( const SCH_SHEET_PATH& aPath ) +{ + std::map refs; + + if( !aPath.LastScreen() ) + return refs; + + for( SCH_ITEM* item : aPath.LastScreen()->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + // Skip power symbols (references starting with #) + wxString ref = symbol->GetRef( &aPath ); + + if( !ref.IsEmpty() && ref[0] != '#' ) + refs[symbol->m_Uuid] = ref; + } + + return refs; +} + + +/** + * Test that simulates the paste flow more closely, including instance pruning. + * + * This test specifically checks whether the PruneOrphanedSymbolInstances call + * after paste incorrectly removes the original sheet's instances. + */ +BOOST_FIXTURE_TEST_CASE( Issue20173PruningAfterPaste, ISSUE20173_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "issue20173/issue20173", m_schematic ); + + SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + // Find the ch1 subsheet + SCH_SHEET_PATH ch1Path; + SCH_SHEET* ch1Sheet = nullptr; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 ) + { + ch1Path = path; + ch1Sheet = path.Last(); + break; + } + } + + BOOST_REQUIRE( ch1Sheet != nullptr ); + + SCH_SCREEN* sharedScreen = ch1Sheet->GetScreen(); + BOOST_REQUIRE( sharedScreen != nullptr ); + + // Set up proper instances for ch1 (in case the loaded data has stale UUIDs) + std::map originalRefs; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ref = symbol->GetField( REFERENCE_FIELD )->GetText(); + + if( ref.IsEmpty() || ref[0] == '#' ) + continue; + + symbol->SetRef( &ch1Path, ref ); + originalRefs[symbol->m_Uuid] = ref; + } + + // Create ch2 with shared screen (simulating paste) + SCH_SHEET* ch2Sheet = new SCH_SHEET( m_schematic.get() ); + ch2Sheet->SetName( "ch2" ); + ch2Sheet->SetFileName( ch1Sheet->GetFileName() ); + ch2Sheet->SetScreen( sharedScreen ); + ch2Sheet->SetPosition( ch1Sheet->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 1000 ), 0 ) ); + + // Add to root and refresh hierarchy + m_schematic->RootScreen()->Append( ch2Sheet ); + m_schematic->RefreshHierarchy(); + + // Get updated hierarchy + sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + SCH_SHEET_PATH ch2Path; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 && path.Last() == ch2Sheet ) + { + ch2Path = path; + break; + } + } + + BOOST_REQUIRE( ch2Path.size() > 1 ); + + // Add ch2 instances with different references + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ch1Ref = symbol->GetRef( &ch1Path ); + + if( ch1Ref.IsEmpty() || ch1Ref[0] == '#' ) + continue; + + // Create ch2 reference (R1 -> R101) + wxString ch2Ref = ch1Ref; + + if( ch2Ref.length() > 1 ) + { + wxString prefix = ch2Ref.substr( 0, 1 ); + long num = 0; + + if( ch2Ref.substr( 1 ).ToLong( &num ) ) + ch2Ref = prefix + wxString::Format( "%ld", num + 100 ); + } + + symbol->SetRef( &ch2Path, ch2Ref ); + } + + // Verify instances are set up correctly before pruning + BOOST_TEST_MESSAGE( "Before pruning:" ); + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + if( symbol->GetRef( &ch1Path )[0] == '#' ) + continue; + + BOOST_TEST_MESSAGE( " " << symbol->m_Uuid.AsString() << " ch1=" << symbol->GetRef( &ch1Path ) + << " ch2=" << symbol->GetRef( &ch2Path ) ); + break; + } + + // Now call the pruning that happens after paste + // This is what SCH_EDITOR_CONTROL::Paste does at line 2615 + SCH_SCREENS allScreens( m_schematic->Root() ); + allScreens.PruneOrphanedSymbolInstances( m_schematic->Prj().GetProjectName(), sheets ); + + BOOST_TEST_MESSAGE( "After pruning:" ); + + // Verify ch1 instances are still intact after pruning + bool ch1InstancesIntact = true; + + for( const auto& [uuid, originalRef] : originalRefs ) + { + // Find the symbol + SCH_SYMBOL* symbol = nullptr; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + if( item->m_Uuid == uuid ) + { + symbol = static_cast( item ); + break; + } + } + + if( !symbol ) + continue; + + wxString ch1RefAfter = symbol->GetRef( &ch1Path ); + wxString ch2RefAfter = symbol->GetRef( &ch2Path ); + + BOOST_TEST_MESSAGE( " " << uuid.AsString() << " ch1=" << ch1RefAfter << " ch2=" + << ch2RefAfter << " (original=" << originalRef << ")" ); + + if( ch1RefAfter != originalRef ) + { + BOOST_TEST_MESSAGE( " MISMATCH: ch1 reference changed from " << originalRef << " to " + << ch1RefAfter ); + ch1InstancesIntact = false; + } + } + + BOOST_CHECK_MESSAGE( ch1InstancesIntact, + "CH1 instances should be preserved after paste and pruning" ); +} + + +/** + * Test that ClearAnnotation doesn't corrupt REFERENCE field in a way that affects GetRef. + * + * ClearAnnotation modifies both the instance reference AND the REFERENCE field text. + * If GetRef falls back to the field text (when instance doesn't match), this can cause issues. + */ +BOOST_FIXTURE_TEST_CASE( Issue20173ClearAnnotationFieldCorruption, ISSUE20173_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "issue20173/issue20173", m_schematic ); + + SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + // Find the ch1 subsheet + SCH_SHEET_PATH ch1Path; + SCH_SHEET* ch1Sheet = nullptr; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 ) + { + ch1Path = path; + ch1Sheet = path.Last(); + break; + } + } + + BOOST_REQUIRE( ch1Sheet != nullptr ); + + SCH_SCREEN* sharedScreen = ch1Sheet->GetScreen(); + BOOST_REQUIRE( sharedScreen != nullptr ); + + // Set up proper instances for ch1 (fix any stale UUID issues from loading) + std::map ch1OriginalRefs; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ref = symbol->GetField( REFERENCE_FIELD )->GetText(); + + if( ref.IsEmpty() || ref[0] == '#' ) + continue; + + symbol->SetRef( &ch1Path, ref ); + ch1OriginalRefs[symbol->m_Uuid] = ref; + } + + // Create ch2 with shared screen + SCH_SHEET* ch2Sheet = new SCH_SHEET( m_schematic.get() ); + ch2Sheet->SetName( "ch2" ); + ch2Sheet->SetFileName( ch1Sheet->GetFileName() ); + ch2Sheet->SetScreen( sharedScreen ); + + m_schematic->RootScreen()->Append( ch2Sheet ); + m_schematic->RefreshHierarchy(); + + sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + SCH_SHEET_PATH ch2Path; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 && path.Last() == ch2Sheet ) + { + ch2Path = path; + break; + } + } + + BOOST_REQUIRE( ch2Path.size() > 1 ); + + // Add ch2 instances and call ClearAnnotation (simulating paste with !forceKeepAnnotations) + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ch1Ref = symbol->GetRef( &ch1Path ); + + if( ch1Ref.IsEmpty() || ch1Ref[0] == '#' ) + continue; + + // Add instance for ch2 (like updatePastedSymbol does) + symbol->SetRef( &ch2Path, ch1Ref ); + + // Now call ClearAnnotation for ch2 path (like updatePastedSymbol does when !forceKeepAnnotations) + symbol->ClearAnnotation( &ch2Path, false ); + } + + // Verify ch1 references are unchanged after ClearAnnotation on ch2 + bool ch1RefsPreserved = true; + + for( const auto& [uuid, originalRef] : ch1OriginalRefs ) + { + SCH_SYMBOL* symbol = nullptr; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + if( item->m_Uuid == uuid ) + { + symbol = static_cast( item ); + break; + } + } + + if( !symbol ) + continue; + + wxString ch1RefAfter = symbol->GetRef( &ch1Path ); + + if( ch1RefAfter != originalRef ) + { + BOOST_TEST_MESSAGE( "Symbol " << uuid.AsString() << " ch1 reference changed from " + << originalRef << " to " << ch1RefAfter + << " after ClearAnnotation on ch2" ); + ch1RefsPreserved = false; + } + } + + BOOST_CHECK_MESSAGE( ch1RefsPreserved, + "CH1 references should be preserved after ClearAnnotation on CH2" ); +} + + +/** + * Test that reproduces the actual bug: ClearAnnotation corrupts field text. + * + * When ClearAnnotation is called for a specific path (CH2), it incorrectly modifies + * the REFERENCE field text. If GetRef later falls back to field text (due to + * mismatched instance paths), it returns the corrupted value. + */ +BOOST_FIXTURE_TEST_CASE( Issue20173FieldTextCorruption, ISSUE20173_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "issue20173/issue20173", m_schematic ); + + SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + // Find the ch1 subsheet + SCH_SHEET_PATH ch1Path; + SCH_SHEET* ch1Sheet = nullptr; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 ) + { + ch1Path = path; + ch1Sheet = path.Last(); + break; + } + } + + BOOST_REQUIRE( ch1Sheet != nullptr ); + + SCH_SCREEN* sharedScreen = ch1Sheet->GetScreen(); + BOOST_REQUIRE( sharedScreen != nullptr ); + + // Capture original field text values (these are what GetRef falls back to) + std::map originalFieldText; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString ref = symbol->GetField( REFERENCE_FIELD )->GetText(); + + if( !ref.IsEmpty() && ref[0] != '#' ) + originalFieldText[symbol->m_Uuid] = ref; + } + + BOOST_REQUIRE( originalFieldText.size() > 0 ); + + BOOST_TEST_MESSAGE( "Original field text values:" ); + + for( const auto& [uuid, ref] : originalFieldText ) + BOOST_TEST_MESSAGE( " " << uuid.AsString() << " -> " << ref ); + + // Create ch2 with shared screen (simulating paste) + SCH_SHEET* ch2Sheet = new SCH_SHEET( m_schematic.get() ); + ch2Sheet->SetName( "ch2" ); + ch2Sheet->SetFileName( ch1Sheet->GetFileName() ); + ch2Sheet->SetScreen( sharedScreen ); + + m_schematic->RootScreen()->Append( ch2Sheet ); + m_schematic->RefreshHierarchy(); + + sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + SCH_SHEET_PATH ch2Path; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 && path.Last() == ch2Sheet ) + { + ch2Path = path; + break; + } + } + + BOOST_REQUIRE( ch2Path.size() > 1 ); + + // Simulate what updatePastedSymbol does: + // 1. Add instance for new path + // 2. Call ClearAnnotation for new path + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + wxString fieldRef = symbol->GetField( REFERENCE_FIELD )->GetText(); + + if( fieldRef.IsEmpty() || fieldRef[0] == '#' ) + continue; + + // Add instance for ch2 (like AddHierarchicalReference does) + symbol->SetRef( &ch2Path, fieldRef ); + + // Now call ClearAnnotation for ch2 path (like updatePastedSymbol does) + symbol->ClearAnnotation( &ch2Path, false ); + } + + // Check if field text is corrupted + BOOST_TEST_MESSAGE( "Field text after ClearAnnotation on ch2:" ); + + bool fieldTextCorrupted = false; + + for( const auto& [uuid, originalRef] : originalFieldText ) + { + SCH_SYMBOL* symbol = nullptr; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + if( item->m_Uuid == uuid ) + { + symbol = static_cast( item ); + break; + } + } + + if( !symbol ) + continue; + + wxString currentFieldText = symbol->GetField( REFERENCE_FIELD )->GetText(); + + BOOST_TEST_MESSAGE( " " << uuid.AsString() << " -> " << currentFieldText + << " (was " << originalRef << ")" ); + + if( currentFieldText != originalRef ) + { + fieldTextCorrupted = true; + BOOST_TEST_MESSAGE( " CORRUPTED!" ); + } + } + + // The bug: ClearAnnotation modifies field text even when called for a specific path + // This causes GetRef to return wrong value when falling back to field text + BOOST_CHECK_MESSAGE( !fieldTextCorrupted, + "Field text should NOT be corrupted by ClearAnnotation on different path" ); +} + + +/** + * Test that symbols on a shared screen maintain independent instances for each sheet path. + * + * This tests the fundamental requirement that symbols can have different reference + * designators in different sheet instances, even when sharing the same screen. + */ +BOOST_FIXTURE_TEST_CASE( Issue20173SharedScreenInstances, ISSUE20173_FIXTURE ) +{ + LOCALE_IO dummy; + + KI_TEST::LoadSchematic( m_settingsManager, "issue20173/issue20173", m_schematic ); + + SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + // Find the ch1 subsheet + SCH_SHEET_PATH ch1Path; + SCH_SHEET* ch1Sheet = nullptr; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 ) + { + ch1Path = path; + ch1Sheet = path.Last(); + break; + } + } + + BOOST_REQUIRE( ch1Sheet != nullptr ); + + SCH_SCREEN* sharedScreen = ch1Sheet->GetScreen(); + BOOST_REQUIRE( sharedScreen != nullptr ); + + // Get root path for adding new sheet + SCH_SHEET_PATH rootPath; + rootPath.push_back( &m_schematic->Root() ); + + // Create ch2 with shared screen + SCH_SHEET* ch2Sheet = new SCH_SHEET( m_schematic.get() ); + ch2Sheet->SetName( "ch2" ); + ch2Sheet->SetFileName( ch1Sheet->GetFileName() ); + ch2Sheet->SetScreen( sharedScreen ); + ch2Sheet->SetPosition( ch1Sheet->GetPosition() + VECTOR2I( schIUScale.MilsToIU( 1000 ), 0 ) ); + + // Manually add ch2 to root screen + m_schematic->RootScreen()->Append( ch2Sheet ); + m_schematic->RefreshHierarchy(); + + // Rebuild sheets after adding ch2 + sheets = m_schematic->BuildSheetListSortedByPageNumbers(); + + // Find ch2 path from the hierarchy (don't construct manually) + SCH_SHEET_PATH ch2Path; + + for( const SCH_SHEET_PATH& path : sheets ) + { + if( path.size() > 1 && path.Last() == ch2Sheet ) + { + ch2Path = path; + break; + } + } + + BOOST_REQUIRE_MESSAGE( ch2Path.size() > 1, "Should find ch2 in hierarchy" ); + + // First, ensure all symbols have proper instances for ch1Path + // (The loaded schematic might have stale instance data with old sheet UUIDs) + int symbolIndex = 0; + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + // Skip power symbols + wxString currentRef = symbol->GetField( REFERENCE_FIELD )->GetText(); + + if( currentRef.IsEmpty() || currentRef[0] == '#' ) + continue; + + // Set up proper ch1 reference using the current field text + symbol->SetRef( &ch1Path, currentRef ); + symbolIndex++; + } + + BOOST_TEST_MESSAGE( "Set up " << symbolIndex << " symbols with ch1 instances" ); + + // Now set different references for ch2 + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + wxString ch1Ref = symbol->GetRef( &ch1Path ); + + // Skip power symbols + if( ch1Ref.IsEmpty() || ch1Ref[0] == '#' ) + continue; + + // Add a different reference for ch2 (R1 -> R101, D1 -> D101, etc.) + wxString ch2Ref = ch1Ref; + + if( ch2Ref.length() > 1 ) + { + wxString prefix = ch2Ref.substr( 0, 1 ); + long num = 0; + + if( ch2Ref.substr( 1 ).ToLong( &num ) ) + ch2Ref = prefix + wxString::Format( "%ld", num + 100 ); + } + + symbol->SetRef( &ch2Path, ch2Ref ); + + // Verify ch1 reference is unchanged + wxString ch1RefAfter = symbol->GetRef( &ch1Path ); + BOOST_CHECK_MESSAGE( ch1Ref == ch1RefAfter, + "Setting ch2 reference should not change ch1 reference for symbol " + << symbol->m_Uuid.AsString() ); + + // Verify ch2 has its own reference + wxString ch2RefAfter = symbol->GetRef( &ch2Path ); + BOOST_CHECK_MESSAGE( ch2Ref == ch2RefAfter, + "ch2 should have its own reference for symbol " + << symbol->m_Uuid.AsString() ); + } + + // Debug: Print ch1 and ch2 paths + BOOST_TEST_MESSAGE( "ch1Path: " << ch1Path.Path().AsString() ); + BOOST_TEST_MESSAGE( "ch2Path: " << ch2Path.Path().AsString() ); + + // Debug: Print instances for first non-power symbol before UpdateAllScreenReferences + BOOST_TEST_MESSAGE( "Before UpdateAllScreenReferences:" ); + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + if( symbol->GetRef( &ch1Path )[0] == '#' ) + continue; + + BOOST_TEST_MESSAGE( "Symbol " << symbol->m_Uuid.AsString() << " instances:" ); + + for( const SCH_SYMBOL_INSTANCE& inst : symbol->GetInstances() ) + { + BOOST_TEST_MESSAGE( " Path: " << inst.m_Path.AsString() << " -> " << inst.m_Reference ); + } + + BOOST_TEST_MESSAGE( " Field text: " << symbol->GetField( REFERENCE_FIELD )->GetText() ); + BOOST_TEST_MESSAGE( " GetRef(ch1): " << symbol->GetRef( &ch1Path ) ); + BOOST_TEST_MESSAGE( " GetRef(ch2): " << symbol->GetRef( &ch2Path ) ); + break; // Only print first symbol for brevity + } + + // Now test UpdateAllScreenReferences doesn't corrupt the other instance + ch2Path.UpdateAllScreenReferences(); + + BOOST_TEST_MESSAGE( "After ch2Path.UpdateAllScreenReferences():" ); + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + if( symbol->GetRef( &ch1Path )[0] == '#' ) + continue; + + BOOST_TEST_MESSAGE( " Field text: " << symbol->GetField( REFERENCE_FIELD )->GetText() ); + BOOST_TEST_MESSAGE( " GetRef(ch1): " << symbol->GetRef( &ch1Path ) ); + BOOST_TEST_MESSAGE( " GetRef(ch2): " << symbol->GetRef( &ch2Path ) ); + break; + } + + ch1Path.UpdateAllScreenReferences(); + + BOOST_TEST_MESSAGE( "After ch1Path.UpdateAllScreenReferences():" ); + + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + if( symbol->GetRef( &ch1Path )[0] == '#' ) + continue; + + BOOST_TEST_MESSAGE( " Field text: " << symbol->GetField( REFERENCE_FIELD )->GetText() ); + BOOST_TEST_MESSAGE( " GetRef(ch1): " << symbol->GetRef( &ch1Path ) ); + BOOST_TEST_MESSAGE( " GetRef(ch2): " << symbol->GetRef( &ch2Path ) ); + break; + } + + // Verify references are still correct after switching + for( SCH_ITEM* item : sharedScreen->Items().OfType( SCH_SYMBOL_T ) ) + { + SCH_SYMBOL* symbol = static_cast( item ); + + if( symbol->GetRef( &ch1Path )[0] == '#' ) + continue; + + // Check that instances exist and are different + wxString ch1Ref = symbol->GetRef( &ch1Path ); + wxString ch2Ref = symbol->GetRef( &ch2Path ); + + // Since we set ch2 = ch1 + 100, they should be different + BOOST_CHECK_MESSAGE( ch1Ref != ch2Ref, + "ch1 and ch2 should have different references after navigation" ); + } +}