diff --git a/pcbnew/tools/multichannel_tool.cpp b/pcbnew/tools/multichannel_tool.cpp index 017d0371e0..47b9489eed 100644 --- a/pcbnew/tools/multichannel_tool.cpp +++ b/pcbnew/tools/multichannel_tool.cpp @@ -212,8 +212,6 @@ bool MULTICHANNEL_TOOL::findOtherItemsInRuleArea( RULE_AREA* aRuleArea, std::set return aItems.size() > 0; } - std::vector result; - PCBEXPR_COMPILER compiler( new PCBEXPR_UNIT_RESOLVER ); PCBEXPR_UCODE ucode; PCBEXPR_CONTEXT ctx, preflightCtx; @@ -228,23 +226,13 @@ bool MULTICHANNEL_TOOL::findOtherItemsInRuleArea( RULE_AREA* aRuleArea, std::set preflightCtx.SetErrorCallback( reportError ); compiler.SetErrorCallback( reportError ); - bool restoreBlankName = false; - - if( aRuleArea->m_zone->GetZoneName().IsEmpty() ) - { - restoreBlankName = true; - aRuleArea->m_zone->SetZoneName( aRuleArea->m_zone->m_Uuid.AsString() ); - } - - wxString ruleText = wxString::Format( wxT( "A.enclosedByArea('%s')" ), aRuleArea->m_zone->GetZoneName() ); + // Use the zone's UUID to identify it uniquely. Using the zone name could match other zones + // with the same name (e.g., a copper fill zone with the same name as a rule area). + wxString ruleText = wxString::Format( wxT( "A.enclosedByArea('%s')" ), + aRuleArea->m_zone->m_Uuid.AsString() ); if( !compiler.Compile( ruleText, &ucode, &preflightCtx ) ) - { - if( restoreBlankName ) - aRuleArea->m_zone->SetZoneName( wxEmptyString ); - return false; - } auto testAndAdd = [&]( BOARD_ITEM* aItem ) @@ -270,9 +258,6 @@ bool MULTICHANNEL_TOOL::findOtherItemsInRuleArea( RULE_AREA* aRuleArea, std::set testAndAdd( drawing ); } - if( restoreBlankName ) - aRuleArea->m_zone->SetZoneName( wxEmptyString ); - return true; } @@ -778,15 +763,10 @@ int MULTICHANNEL_TOOL::findRoutingInRuleArea( RULE_AREA* aRuleArea, std::setm_zone->GetZoneName().IsEmpty() ) - { - restoreBlankName = true; - aRuleArea->m_zone->SetZoneName( aRuleArea->m_zone->m_Uuid.AsString() ); - } - - wxString ruleText = wxString::Format( wxT( "A.enclosedByArea('%s')" ), aRuleArea->m_zone->GetZoneName() ); + // Use the zone's UUID to identify it uniquely. Using the zone name could match other zones + // with the same name (e.g., a copper fill zone with the same name as a rule area). + wxString ruleText = wxString::Format( wxT( "A.enclosedByArea('%s')" ), + aRuleArea->m_zone->m_Uuid.AsString() ); auto testAndAdd = [&]( BOARD_CONNECTED_ITEM* aItem ) @@ -816,9 +796,6 @@ int MULTICHANNEL_TOOL::findRoutingInRuleArea( RULE_AREA* aRuleArea, std::setm_zone->SetZoneName( wxEmptyString ); - return count; } diff --git a/qa/data/pcbnew/issue21184/Test.kicad_sch b/qa/data/pcbnew/issue21184/Test.kicad_sch new file mode 100644 index 0000000000..64962dd235 --- /dev/null +++ b/qa/data/pcbnew/issue21184/Test.kicad_sch @@ -0,0 +1,651 @@ +(kicad_sch + (version 20250114) + (generator "eeschema") + (generator_version "9.0") + (uuid "9515448d-849e-41c3-ba58-84b8fbdcc0f3") + (paper "A4") + (lib_symbols + (symbol "Amplifier_Operational:TL071" + (pin_names + (offset 0.127) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "U" + (at 0 6.35 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "TL071" + (at 0 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 1.27 1.27 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "http://www.ti.com/lit/ds/symlink/tl071.pdf" + (at 3.81 3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Single Low-Noise JFET-Input Operational Amplifiers, DIP-8/SOIC-8" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "singel opamp" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "SOIC*3.9x4.9mm*P1.27mm* DIP*W7.62mm* TSSOP*3x3mm*P0.65mm*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "TL071_0_1" + (polyline + (pts + (xy -5.08 5.08) (xy 5.08 0) (xy -5.08 -5.08) (xy -5.08 5.08) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "TL071_1_1" + (pin input line + (at -7.62 2.54 0) + (length 2.54) + (name "+" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at -7.62 -2.54 0) + (length 2.54) + (name "-" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at -2.54 7.62 270) + (length 3.81) + (name "V+" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "7" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at -2.54 -7.62 90) + (length 3.81) + (name "V-" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "4" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin no_connect line + (at 0 2.54 270) + (length 2.54) + (hide yes) + (name "NC" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "8" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at 0 -7.62 90) + (length 5.08) + (name "NULL" + (effects + (font + (size 0.508 0.508) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at 2.54 -7.62 90) + (length 6.35) + (name "NULL" + (effects + (font + (size 0.508 0.508) + ) + ) + ) + (number "5" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin output line + (at 7.62 0 180) + (length 2.54) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "6" + (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) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (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) + ) + ) + (junction + (at 96.52 80.01) + (diameter 0) + (color 0 0 0 0) + (uuid "33b2848a-8747-46b7-87d8-f1bc14ae4653") + ) + (junction + (at 111.76 85.09) + (diameter 0) + (color 0 0 0 0) + (uuid "867289c6-ec33-4c00-999d-bb4e4060c206") + ) + (junction + (at 106.68 90.17) + (diameter 0) + (color 0 0 0 0) + (uuid "de43c2a5-5e57-48b9-988b-84bc9bd96d67") + ) + (wire + (pts + (xy 104.14 90.17) (xy 106.68 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "3fe4187e-02a0-420a-80d7-24e17e505db5") + ) + (wire + (pts + (xy 111.76 90.17) (xy 111.76 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "48fd8640-73f3-4b5d-b763-e80469b1d74b") + ) + (wire + (pts + (xy 93.98 88.9) (xy 93.98 80.01) + ) + (stroke + (width 0) + (type default) + ) + (uuid "64ab3749-634e-45c6-9221-8d9d7a48b4ee") + ) + (wire + (pts + (xy 101.6 90.17) (xy 101.6 97.79) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6e49a601-9076-4cde-93f0-43953f065699") + ) + (wire + (pts + (xy 101.6 74.93) (xy 115.57 74.93) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6eb77844-f72b-4ce5-ade8-2658a2785782") + ) + (wire + (pts + (xy 115.57 85.09) (xy 111.76 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "70992769-f309-49ed-9245-7599583827cf") + ) + (wire + (pts + (xy 101.6 97.79) (xy 106.68 97.79) + ) + (stroke + (width 0) + (type default) + ) + (uuid "74ed4bd6-0f23-4b6a-a669-c5a91cf26350") + ) + (wire + (pts + (xy 93.98 80.01) (xy 96.52 80.01) + ) + (stroke + (width 0) + (type default) + ) + (uuid "7ad477c9-3ecf-4f0a-8679-e88db997b5d1") + ) + (wire + (pts + (xy 111.76 85.09) (xy 111.76 82.55) + ) + (stroke + (width 0) + (type default) + ) + (uuid "7f98317b-16be-4706-b754-8a3ca40a7b03") + ) + (wire + (pts + (xy 115.57 74.93) (xy 115.57 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "9416c128-d9e6-4943-8a32-21c711260ff5") + ) + (wire + (pts + (xy 96.52 80.01) (xy 96.52 85.09) + ) + (stroke + (width 0) + (type default) + ) + (uuid "bcdbb5e6-d584-411a-b52a-f6a8a0c02901") + ) + (wire + (pts + (xy 106.68 97.79) (xy 106.68 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "bffd839c-079e-4483-9b81-007cf1288587") + ) + (wire + (pts + (xy 106.68 90.17) (xy 111.76 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f8d5533a-524e-43bb-9830-1ac421d05beb") + ) + (symbol + (lib_id "power:GND") + (at 93.98 88.9 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "9dc62def-a72c-496e-b5f9-31bb5506d98e") + (property "Reference" "#PWR01" + (at 93.98 95.25 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 93.98 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 93.98 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 93.98 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 93.98 88.9 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "7e87d238-0a93-4a98-a248-7270b0af35f5") + ) + (instances + (project "" + (path "/498bac11-840c-4b9c-8c40-95416b6d764e/974a0092-e266-4c17-a0ad-0420d2f0f044" + (reference "#PWR01") + (unit 1) + ) + (path "/498bac11-840c-4b9c-8c40-95416b6d764e/a2e4406d-77db-4c93-91c7-9c2044625396" + (reference "#PWR02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Amplifier_Operational:TL071") + (at 104.14 82.55 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "a671b08a-fc68-4691-b431-849564f959d2") + (property "Reference" "U1" + (at 113.03 76.1298 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "TL071" + (at 113.03 78.6698 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "Package_SO:SOIC-8_5.3x5.3mm_P1.27mm" + (at 105.41 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "http://www.ti.com/lit/ds/symlink/tl071.pdf" + (at 107.95 78.74 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Single Low-Noise JFET-Input Operational Amplifiers, DIP-8/SOIC-8" + (at 104.14 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "7" + (uuid "00746730-6fc4-4164-b43b-6b6793e2af32") + ) + (pin "8" + (uuid "7d824b12-f88f-4454-a10b-ec9dc1cdd64f") + ) + (pin "1" + (uuid "68e1d864-0530-4af0-a56a-c369b7b26504") + ) + (pin "2" + (uuid "1b97841b-b3f4-44e9-86c0-00001944016f") + ) + (pin "4" + (uuid "61236191-b414-47b4-8a5a-b2c1a25f7e0b") + ) + (pin "5" + (uuid "2a72b9a7-bfaa-40ed-9ab0-41562e028c4a") + ) + (pin "6" + (uuid "4f7c7624-ef67-4ce6-8c54-1387bffb0e10") + ) + (pin "3" + (uuid "283f50b2-6ff0-4c56-b4ef-c3c25c139069") + ) + (instances + (project "" + (path "/498bac11-840c-4b9c-8c40-95416b6d764e/974a0092-e266-4c17-a0ad-0420d2f0f044" + (reference "U1") + (unit 1) + ) + (path "/498bac11-840c-4b9c-8c40-95416b6d764e/a2e4406d-77db-4c93-91c7-9c2044625396" + (reference "U2") + (unit 1) + ) + ) + ) + ) +) diff --git a/qa/data/pcbnew/issue21184/issue21184.kicad_pcb b/qa/data/pcbnew/issue21184/issue21184.kicad_pcb new file mode 100644 index 0000000000..1ce4fd0703 --- /dev/null +++ b/qa/data/pcbnew/issue21184/issue21184.kicad_pcb @@ -0,0 +1,1243 @@ +(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) + (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 "Net-(U1-V+)") + (net 2 "unconnected-(U1-NC-Pad8)") + (net 3 "unconnected-(U2-NC-Pad8)") + (net 4 "Net-(U2-V+)") + (net 5 "GND") + (footprint "Package_SO:SOIC-8_5.3x5.3mm_P1.27mm" + (layer "F.Cu") + (uuid "32d7f07c-8962-46f2-bbb0-8124d8b255a8") + (at 75.6125 77.345) + (descr "SOIC, 8 Pin (JEITA/EIAJ ED-7311-19 variation 08-001-BBA and Atmel/Microchip, 208 mils width, https://www.jeita.or.jp/japanese/standard/book/ED-7311-19/#target/page_no=21, https://ww1.microchip.com/downloads/en/DeviceDoc/20005045C.pdf#page=23, https://ww1.microchip.com/downloads/en/DeviceDoc/doc2535.pdf#page=162), generated with kicad-footprint-generator ipc_gullwing_generator.py") + (tags "SOIC SO P-SOP SOP SOP-8 SO SO-8 8S2 S2AE/F K04-056 CASE-751BE SO8W 8-Pin-SOIC PSA W8-2 W8-4 W8MS-1 FPT-8P-M08") + (property "Reference" "U2" + (at 0 -3.6 0) + (layer "F.SilkS") + (uuid "116119fc-9af2-4e9c-b7f9-9f1ce7d42805") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "TL071" + (at 0 3.6 0) + (layer "F.Fab") + (uuid "e6799708-12be-40d0-a90c-913c9003c1ca") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "http://www.ti.com/lit/ds/symlink/tl071.pdf" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "e5bc3578-7ca6-412e-a9f1-36d3508e71a5") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Single Low-Noise JFET-Input Operational Amplifiers, DIP-8/SOIC-8" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "1e40cac4-44b9-445a-9a38-37156b091474") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "SOIC*3.9x4.9mm*P1.27mm* DIP*W7.62mm* TSSOP*3x3mm*P0.65mm*") + (path "/a2e4406d-77db-4c93-91c7-9c2044625396/a671b08a-fc68-4691-b431-849564f959d2") + (sheetname "/Test2/") + (sheetfile "Test.kicad_sch") + (attr smd) + (fp_line + (start -2.76 -2.76) + (end 2.76 -2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a51bf1c4-f9d3-446b-b9d4-84edb34d61e9") + ) + (fp_line + (start -2.76 -2.49) + (end -2.76 -2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "538f4928-a4be-43d3-8f0e-257dea00e48b") + ) + (fp_line + (start -2.76 2.76) + (end -2.76 2.49) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "e8df5215-ab0d-411b-9516-cf9a5030fd07") + ) + (fp_line + (start 2.76 -2.76) + (end 2.76 -2.49) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "02385da4-47d9-4889-91fa-d1d370300b6d") + ) + (fp_line + (start 2.76 2.49) + (end 2.76 2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "897adfb2-d736-4ee9-b3fa-9c16fb7beefc") + ) + (fp_line + (start 2.76 2.76) + (end -2.76 2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "b48ce1e3-7aa0-4537-aeb5-d1d49bb847e5") + ) + (fp_poly + (pts + (xy -3.59 -2.5) (xy -3.93 -2.97) (xy -3.25 -2.97) + ) + (stroke + (width 0.12) + (type solid) + ) + (fill yes) + (layer "F.SilkS") + (uuid "41ba8dc5-31ea-450d-a06d-137239127093") + ) + (fp_line + (start -4.65 -2.48) + (end -2.9 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "dcfaecda-1a47-48a4-b463-cab84fef32f3") + ) + (fp_line + (start -4.65 2.48) + (end -4.65 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "4c9f0c5f-9891-42ff-84d0-3fe9f03dca6b") + ) + (fp_line + (start -2.9 -2.9) + (end 2.9 -2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "5d218e66-43b4-437f-8db4-fe3b9187e68f") + ) + (fp_line + (start -2.9 -2.48) + (end -2.9 -2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "854d4c08-0e9e-4297-b6ff-846d8c95762d") + ) + (fp_line + (start -2.9 2.48) + (end -4.65 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "7792121e-cbe2-4127-957a-78d6bbe4dd49") + ) + (fp_line + (start -2.9 2.9) + (end -2.9 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "6929765a-cbf1-4f17-bfd8-3d35428b0449") + ) + (fp_line + (start 2.9 -2.9) + (end 2.9 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "697be2ec-3fc0-4316-9f5b-2bc2749796cc") + ) + (fp_line + (start 2.9 -2.48) + (end 4.65 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "bbfdeaa7-d4b6-4ca6-8885-266b23abc375") + ) + (fp_line + (start 2.9 2.48) + (end 2.9 2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "9370db23-17ee-43d1-94b8-e4c6870c6ccb") + ) + (fp_line + (start 2.9 2.9) + (end -2.9 2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "5295bb27-2ac1-43c3-97ff-33ed4fccc9d0") + ) + (fp_line + (start 4.65 -2.48) + (end 4.65 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "d82e82b9-3577-4c21-84ca-6ea3df1eb699") + ) + (fp_line + (start 4.65 2.48) + (end 2.9 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "ff8472e9-6418-404b-bf66-0db0490fb5dc") + ) + (fp_poly + (pts + (xy -2.65 -1.65) (xy -2.65 2.65) (xy 2.65 2.65) (xy 2.65 -2.65) (xy -1.65 -2.65) + ) + (stroke + (width 0.1) + (type solid) + ) + (fill no) + (layer "F.Fab") + (uuid "ace308bc-e893-43ac-941e-14185509e2c6") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "6b7ba0ce-034a-4ecf-a088-35f9b7b64553") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (pad "1" smd roundrect + (at -3.5875 -1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(U2-V+)") + (pinfunction "NULL") + (pintype "input") + (uuid "a296be93-b39c-4c46-af63-3f127436222b") + ) + (pad "2" smd roundrect + (at -3.5875 -0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 5 "GND") + (pinfunction "-") + (pintype "input") + (uuid "042e7a1f-8bfb-4844-a5e9-b17119f9ce03") + ) + (pad "3" smd roundrect + (at -3.5875 0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 5 "GND") + (pinfunction "+") + (pintype "input") + (uuid "2c2a73dc-4345-47ba-adb1-439864409c11") + ) + (pad "4" smd roundrect + (at -3.5875 1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(U2-V+)") + (pinfunction "V-") + (pintype "power_in") + (uuid "3a6a6745-8755-4f8d-ad4b-0b8f1da3259e") + ) + (pad "5" smd roundrect + (at 3.5875 1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(U2-V+)") + (pinfunction "NULL") + (pintype "input") + (uuid "0c3f1ca9-eee1-4131-b463-f6d89e67ab0d") + ) + (pad "6" smd roundrect + (at 3.5875 0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(U2-V+)") + (pintype "output") + (uuid "0de7791b-31e1-4a89-a6d9-d40d6e4b03ee") + ) + (pad "7" smd roundrect + (at 3.5875 -0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 4 "Net-(U2-V+)") + (pinfunction "V+") + (pintype "power_in") + (uuid "b974e2a0-a24b-4cd5-a386-72a3e3fab694") + ) + (pad "8" smd roundrect + (at 3.5875 -1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 3 "unconnected-(U2-NC-Pad8)") + (pinfunction "NC") + (pintype "no_connect") + (uuid "0b77963d-e6e3-4264-9b7b-8ea27259a099") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Package_SO.3dshapes/SOIC-8_5.3x5.3mm_P1.27mm.step" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Package_SO:SOIC-8_5.3x5.3mm_P1.27mm" + (layer "F.Cu") + (uuid "f37a0ab0-f94b-48dc-9eaa-581e8f83abab") + (at 75.6125 64.345) + (descr "SOIC, 8 Pin (JEITA/EIAJ ED-7311-19 variation 08-001-BBA and Atmel/Microchip, 208 mils width, https://www.jeita.or.jp/japanese/standard/book/ED-7311-19/#target/page_no=21, https://ww1.microchip.com/downloads/en/DeviceDoc/20005045C.pdf#page=23, https://ww1.microchip.com/downloads/en/DeviceDoc/doc2535.pdf#page=162), generated with kicad-footprint-generator ipc_gullwing_generator.py") + (tags "SOIC SO P-SOP SOP SOP-8 SO SO-8 8S2 S2AE/F K04-056 CASE-751BE SO8W 8-Pin-SOIC PSA W8-2 W8-4 W8MS-1 FPT-8P-M08") + (property "Reference" "U1" + (at 0 -3.6 0) + (layer "F.SilkS") + (uuid "e5769208-ba27-4e0d-868a-86404c2c80ea") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "TL071" + (at 0 3.6 0) + (layer "F.Fab") + (uuid "72e7c18e-d4ea-4d2d-bb79-8386cf24789b") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "http://www.ti.com/lit/ds/symlink/tl071.pdf" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "df325eaf-6068-48a8-9923-56dfdbb49d4c") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "Single Low-Noise JFET-Input Operational Amplifiers, DIP-8/SOIC-8" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "a39deb9d-fcdf-47cd-b324-744543d85a7a") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property ki_fp_filters "SOIC*3.9x4.9mm*P1.27mm* DIP*W7.62mm* TSSOP*3x3mm*P0.65mm*") + (path "/974a0092-e266-4c17-a0ad-0420d2f0f044/a671b08a-fc68-4691-b431-849564f959d2") + (sheetname "/Test1/") + (sheetfile "Test.kicad_sch") + (attr smd) + (fp_line + (start -2.76 -2.76) + (end 2.76 -2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "1501d81e-fd4f-45c9-9cc4-15560196ab34") + ) + (fp_line + (start -2.76 -2.49) + (end -2.76 -2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "092c4ae7-d6f6-4314-9ca4-29f7a01e7c48") + ) + (fp_line + (start -2.76 2.76) + (end -2.76 2.49) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "828d958b-f58e-4f41-8e94-27f1aca422c5") + ) + (fp_line + (start 2.76 -2.76) + (end 2.76 -2.49) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "320b5039-2b78-499d-980f-c8fa4fddc9e7") + ) + (fp_line + (start 2.76 2.49) + (end 2.76 2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "0d76032b-b0da-4733-8da8-695a5d5a2edd") + ) + (fp_line + (start 2.76 2.76) + (end -2.76 2.76) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "9c7f5ec0-9440-44e9-aafc-b3f405fa8a46") + ) + (fp_poly + (pts + (xy -3.59 -2.5) (xy -3.93 -2.97) (xy -3.25 -2.97) + ) + (stroke + (width 0.12) + (type solid) + ) + (fill yes) + (layer "F.SilkS") + (uuid "4ba17b18-8130-4b84-8a92-926807ff9997") + ) + (fp_line + (start -4.65 -2.48) + (end -2.9 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "65f237d5-cf00-4f44-9c06-aae19b60ddd5") + ) + (fp_line + (start -4.65 2.48) + (end -4.65 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "86ffef91-030f-44d6-8483-7a86d1270415") + ) + (fp_line + (start -2.9 -2.9) + (end 2.9 -2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "65d38ece-c43d-428a-a6cc-15b8f03c8ed8") + ) + (fp_line + (start -2.9 -2.48) + (end -2.9 -2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "6bf2d2c6-dbbd-4906-aec2-bec45a024d82") + ) + (fp_line + (start -2.9 2.48) + (end -4.65 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "d91688b4-f2bc-4f1c-bb18-af67f37c4381") + ) + (fp_line + (start -2.9 2.9) + (end -2.9 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "0a4182b0-915a-4690-a2f4-2d5df77afb12") + ) + (fp_line + (start 2.9 -2.9) + (end 2.9 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "81d1f08d-1633-49df-90c1-c3260586c530") + ) + (fp_line + (start 2.9 -2.48) + (end 4.65 -2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "5a0ebbea-1db5-4255-85c2-389bb60f1477") + ) + (fp_line + (start 2.9 2.48) + (end 2.9 2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "2408cdd8-4cd2-46e6-a348-44dc55ebae4a") + ) + (fp_line + (start 2.9 2.9) + (end -2.9 2.9) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "7f910920-ef09-4867-8b3d-db4160a3ad9b") + ) + (fp_line + (start 4.65 -2.48) + (end 4.65 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "facac1ac-ef4e-4911-bb03-52e11eb03820") + ) + (fp_line + (start 4.65 2.48) + (end 2.9 2.48) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "03b12ed8-9904-4f7f-b5b1-522c6fd0cef1") + ) + (fp_poly + (pts + (xy -2.65 -1.65) (xy -2.65 2.65) (xy 2.65 2.65) (xy 2.65 -2.65) (xy -1.65 -2.65) + ) + (stroke + (width 0.1) + (type solid) + ) + (fill no) + (layer "F.Fab") + (uuid "50abc43c-956f-4d64-bfb1-4e86864a4cd3") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "ce03494e-9afd-4529-923a-f784a9977bf8") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (pad "1" smd roundrect + (at -3.5875 -1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "Net-(U1-V+)") + (pinfunction "NULL") + (pintype "input") + (uuid "802c7dda-eb2e-4bef-a68b-178fb1705aed") + ) + (pad "2" smd roundrect + (at -3.5875 -0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 5 "GND") + (pinfunction "-") + (pintype "input") + (uuid "36087922-3ad6-4623-b616-3041c052e3a8") + ) + (pad "3" smd roundrect + (at -3.5875 0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 5 "GND") + (pinfunction "+") + (pintype "input") + (uuid "40a89064-1c51-4c80-a1bf-4ede0f887562") + ) + (pad "4" smd roundrect + (at -3.5875 1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "Net-(U1-V+)") + (pinfunction "V-") + (pintype "power_in") + (uuid "635328d6-48a7-4e0e-b2c6-cbb262fdc378") + ) + (pad "5" smd roundrect + (at 3.5875 1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "Net-(U1-V+)") + (pinfunction "NULL") + (pintype "input") + (uuid "21e749c9-2ae2-4bad-89a5-cd6fd54f6562") + ) + (pad "6" smd roundrect + (at 3.5875 0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "Net-(U1-V+)") + (pintype "output") + (uuid "06602b8e-ad70-4dc8-81c7-20e14f2f7466") + ) + (pad "7" smd roundrect + (at 3.5875 -0.635) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 1 "Net-(U1-V+)") + (pinfunction "V+") + (pintype "power_in") + (uuid "420fd9fc-c4c2-45c9-b26c-2ee30e74cd92") + ) + (pad "8" smd roundrect + (at 3.5875 -1.905) + (size 1.625 0.65) + (layers "F.Cu" "F.Mask" "F.Paste") + (roundrect_rratio 0.25) + (net 2 "unconnected-(U1-NC-Pad8)") + (pinfunction "NC") + (pintype "no_connect") + (uuid "c09fd4f1-e557-4e20-a1aa-18a6836d231d") + ) + (embedded_fonts no) + (model "${KICAD9_3DMODEL_DIR}/Package_SO.3dshapes/SOIC-8_5.3x5.3mm_P1.27mm.step" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (segment + (start 79.2 63.71) + (end 79.2 64.98) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "190b210b-9c27-4134-8aef-1b9f1432b57d") + ) + (segment + (start 79.2 64.98) + (end 76.38 64.98) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "1eefcf4a-1104-4284-a0d8-56a3de6878b8") + ) + (segment + (start 76.38 64.98) + (end 75.8 64.4) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "542e751c-04cd-4805-a04f-d79d245bf31c") + ) + (segment + (start 72.22749 62.44) + (end 76.03749 66.25) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "779bee6c-ff70-4fe8-aeb1-10fa021280c4") + ) + (segment + (start 73.8 66.2) + (end 72.075 66.2) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "87b886d6-21b1-40fb-952a-84e45319e522") + ) + (segment + (start 72.075 66.2) + (end 72.025 66.25) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "9530b4ca-429f-460c-84ff-024852ea35e0") + ) + (segment + (start 72.025 62.44) + (end 72.22749 62.44) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "b366e214-8148-4cf8-a2fd-d0b94a88599a") + ) + (segment + (start 79.2 66.25) + (end 79.2 64.98) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "e0a86623-e078-45c6-85d8-33f9728eb4bb") + ) + (segment + (start 76.03749 66.25) + (end 79.2 66.25) + (width 0.2) + (layer "F.Cu") + (net 1) + (uuid "f74f3c4e-54dd-4c0e-bae4-8db7b18249f2") + ) + (via + (at 73.8 66.2) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 1) + (uuid "9b3b6933-8490-4ebb-bf1d-15559f4c83a8") + ) + (via + (at 75.8 64.4) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 1) + (uuid "d80b6c57-8412-4a1d-b795-30d6e115526f") + ) + (segment + (start 75.8 64.4) + (end 74 66.2) + (width 0.2) + (layer "B.Cu") + (net 1) + (uuid "08de7f88-0ca5-4f36-99aa-99ae9f1369d4") + ) + (segment + (start 74 66.2) + (end 73.8 66.2) + (width 0.2) + (layer "B.Cu") + (net 1) + (uuid "57024408-23f7-4766-999f-4ab97065b5d3") + ) + (segment + (start 72.025 75.44) + (end 72.22749 75.44) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "1b878e04-6039-4ab9-ac2b-9cb2d7f1e54a") + ) + (segment + (start 72.075 79.2) + (end 72.025 79.25) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "25c11335-3928-4e6d-8b80-70db0e1d2963") + ) + (segment + (start 73.8 79.2) + (end 72.075 79.2) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "2cd6cf36-1710-4733-86a5-b26a92532375") + ) + (segment + (start 79.2 77.98) + (end 76.38 77.98) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "4c769548-fa6f-4ea0-9b81-ac14b9abdba0") + ) + (segment + (start 76.38 77.98) + (end 75.8 77.4) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "a9235c8e-d816-4265-a82e-83e47a0c63fd") + ) + (segment + (start 76.03749 79.25) + (end 79.2 79.25) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "c6bbf6f3-25e4-4480-8fb6-160fc059dd5f") + ) + (segment + (start 79.2 76.71) + (end 79.2 77.98) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "db938aa1-ae23-4ca9-8b37-4990212a1bdc") + ) + (segment + (start 72.22749 75.44) + (end 76.03749 79.25) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "de0eddd5-7679-4d73-a08f-49a8b323ac6d") + ) + (segment + (start 79.2 79.25) + (end 79.2 77.98) + (width 0.2) + (layer "F.Cu") + (net 4) + (uuid "f08641f9-0443-4176-b994-5b4920ef0352") + ) + (via + (at 75.8 77.4) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 4) + (uuid "18ac47e2-2dac-45fc-966a-e85e1468c06d") + ) + (via + (at 73.8 79.2) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 4) + (uuid "71d986b9-ddf5-4049-88f1-cec7836e9364") + ) + (segment + (start 70.6 62.2) + (end 70.6 63.6) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "20779a32-9ee4-469d-b7d3-e3df6e80de01") + ) + (segment + (start 70.82 64.98) + (end 70 65.8) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "319f8c50-1394-40bc-b16a-93233ef81d9f") + ) + (segment + (start 70.6 76.6) + (end 70.71 76.71) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "3562f333-f6e4-4f7d-b2c6-5161d8216696") + ) + (segment + (start 70.82 77.98) + (end 70 78.8) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "432f7ad9-d7ae-4d8a-aa22-07c21718e1a4") + ) + (segment + (start 72.025 64.98) + (end 70.82 64.98) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "649a8519-5faf-402f-90bf-183ac71a7356") + ) + (segment + (start 70.71 63.71) + (end 72.025 63.71) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "91d567c7-af77-4d6d-830e-f9f0d88c324d") + ) + (segment + (start 70.6 75.2) + (end 70.6 76.6) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "932a12ad-4912-4d8e-be10-0b7bbaf870c0") + ) + (segment + (start 72.025 77.98) + (end 70.82 77.98) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "d8a39f7f-f0ca-4a6f-88d0-163d1d3175a5") + ) + (segment + (start 70.6 63.6) + (end 70.71 63.71) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "f2c70267-bd9e-47c6-acac-f71e5e056219") + ) + (segment + (start 70.71 76.71) + (end 72.025 76.71) + (width 0.2) + (layer "F.Cu") + (net 5) + (uuid "fece7269-5cb4-4117-bb5b-2adc1b1e3caa") + ) + (via + (at 70 65.8) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 5) + (uuid "1f40fdb2-79f8-4a22-8086-bb0937ced4bd") + ) + (via + (at 70.6 75.2) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 5) + (uuid "83e0a7e8-e20a-4ac6-b8e7-8bc81d760470") + ) + (via + (at 70 78.8) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 5) + (uuid "b4b4679a-5e53-4752-9b1e-0ee6f2441b8e") + ) + (via + (at 70.6 62.2) + (size 0.6) + (drill 0.3) + (layers "F.Cu" "B.Cu") + (net 5) + (uuid "dfd3ecee-279c-4a85-a0df-5532d31873de") + ) + (zone + (net 0) + (net_name "") + (layer "F.Cu") + (uuid "0282511a-28ec-4d82-a58c-56fbaffdb982") + (name "Test1") + (hatch edge 0.5) + (connect_pads + (clearance 0) + ) + (min_thickness 0.25) + (filled_areas_thickness no) + (keepout + (tracks allowed) + (vias allowed) + (pads allowed) + (copperpour allowed) + (footprints allowed) + ) + (placement + (enabled yes) + (sheetname "/Test1/") + ) + (fill + (thermal_gap 0.5) + (thermal_bridge_width 0.5) + ) + (polygon + (pts + (xy 68.5 59.5) (xy 68.5 69.5) (xy 81 69.5) (xy 81 59.5) + ) + ) + ) + (zone + (net 0) + (net_name "") + (layer "F.Cu") + (uuid "825c5d15-bd0b-4287-9b6c-74f6d256e71b") + (name "Test2") + (hatch edge 0.5) + (connect_pads + (clearance 0) + ) + (min_thickness 0.25) + (filled_areas_thickness no) + (keepout + (tracks allowed) + (vias allowed) + (pads allowed) + (copperpour allowed) + (footprints allowed) + ) + (placement + (enabled yes) + (sheetname "/Test2/") + ) + (fill + (thermal_gap 0.5) + (thermal_bridge_width 0.5) + ) + (polygon + (pts + (xy 68.5 72.5) (xy 68.5 82.5) (xy 81 82.5) (xy 81 72.5) + ) + ) + ) + (zone + (net 5) + (net_name "GND") + (layer "B.Cu") + (uuid "c7fca107-3a3d-4617-a41a-90ed3f574dea") + (name "Test2") + (hatch edge 0.5) + (connect_pads + (clearance 0) + ) + (min_thickness 0.25) + (filled_areas_thickness no) + (fill yes + (thermal_gap 0.5) + (thermal_bridge_width 0.5) + ) + (polygon + (pts + (xy 67.5 58.473018) (xy 82 58.473018) (xy 82 83.473018) (xy 67.5 83.473018) + ) + ) + (filled_polygon + (layer "B.Cu") + (pts + (xy 81.943039 58.492703) (xy 81.988794 58.545507) (xy 82 58.597018) (xy 82 83.349018) (xy 81.980315 83.416057) + (xy 81.927511 83.461812) (xy 81.876 83.473018) (xy 67.624 83.473018) (xy 67.556961 83.453333) (xy 67.511206 83.400529) + (xy 67.5 83.349018) (xy 67.5 79.134108) (xy 73.2995 79.134108) (xy 73.2995 79.265891) (xy 73.333608 79.393187) + (xy 73.366554 79.45025) (xy 73.3995 79.507314) (xy 73.492686 79.6005) (xy 73.606814 79.666392) (xy 73.734108 79.7005) + (xy 73.73411 79.7005) (xy 73.86589 79.7005) (xy 73.865892 79.7005) (xy 73.993186 79.666392) (xy 74.107314 79.6005) + (xy 74.2005 79.507314) (xy 74.266392 79.393186) (xy 74.3005 79.265892) (xy 74.3005 79.134108) (xy 74.266392 79.006814) + (xy 74.2005 78.892686) (xy 74.107314 78.7995) (xy 74.05025 78.766554) (xy 73.993187 78.733608) (xy 73.929539 78.716554) + (xy 73.865892 78.6995) (xy 73.734108 78.6995) (xy 73.606812 78.733608) (xy 73.492686 78.7995) (xy 73.492683 78.799502) + (xy 73.399502 78.892683) (xy 73.3995 78.892686) (xy 73.333608 79.006812) (xy 73.2995 79.134108) + (xy 67.5 79.134108) (xy 67.5 77.334108) (xy 75.2995 77.334108) (xy 75.2995 77.465891) (xy 75.333608 77.593187) + (xy 75.366554 77.65025) (xy 75.3995 77.707314) (xy 75.492686 77.8005) (xy 75.606814 77.866392) (xy 75.734108 77.9005) + (xy 75.73411 77.9005) (xy 75.86589 77.9005) (xy 75.865892 77.9005) (xy 75.993186 77.866392) (xy 76.107314 77.8005) + (xy 76.2005 77.707314) (xy 76.266392 77.593186) (xy 76.3005 77.465892) (xy 76.3005 77.334108) (xy 76.266392 77.206814) + (xy 76.2005 77.092686) (xy 76.107314 76.9995) (xy 76.05025 76.966554) (xy 75.993187 76.933608) (xy 75.929539 76.916554) + (xy 75.865892 76.8995) (xy 75.734108 76.8995) (xy 75.606812 76.933608) (xy 75.492686 76.9995) (xy 75.492683 76.999502) + (xy 75.399502 77.092683) (xy 75.3995 77.092686) (xy 75.333608 77.206812) (xy 75.2995 77.334108) + (xy 67.5 77.334108) (xy 67.5 66.134108) (xy 73.2995 66.134108) (xy 73.2995 66.265891) (xy 73.333608 66.393187) + (xy 73.366554 66.45025) (xy 73.3995 66.507314) (xy 73.492686 66.6005) (xy 73.606814 66.666392) (xy 73.734108 66.7005) + (xy 73.73411 66.7005) (xy 73.86589 66.7005) (xy 73.865892 66.7005) (xy 73.993186 66.666392) (xy 74.107314 66.6005) + (xy 74.2005 66.507314) (xy 74.266392 66.393186) (xy 74.270458 66.378007) (xy 74.302551 66.322418) + (xy 75.688151 64.936819) (xy 75.749474 64.903334) (xy 75.775832 64.9005) (xy 75.86589 64.9005) (xy 75.865892 64.9005) + (xy 75.993186 64.866392) (xy 76.107314 64.8005) (xy 76.2005 64.707314) (xy 76.266392 64.593186) + (xy 76.3005 64.465892) (xy 76.3005 64.334108) (xy 76.266392 64.206814) (xy 76.2005 64.092686) (xy 76.107314 63.9995) + (xy 76.05025 63.966554) (xy 75.993187 63.933608) (xy 75.929539 63.916554) (xy 75.865892 63.8995) + (xy 75.734108 63.8995) (xy 75.606812 63.933608) (xy 75.492686 63.9995) (xy 75.492683 63.999502) + (xy 75.399502 64.092683) (xy 75.3995 64.092686) (xy 75.333608 64.206812) (xy 75.2995 64.334108) + (xy 75.2995 64.424166) (xy 75.279815 64.491205) (xy 75.263181 64.511847) (xy 74.081849 65.693178) + (xy 74.020526 65.726663) (xy 73.962075 65.725272) (xy 73.865892 65.6995) (xy 73.734108 65.6995) + (xy 73.606812 65.733608) (xy 73.492686 65.7995) (xy 73.492683 65.799502) (xy 73.399502 65.892683) + (xy 73.3995 65.892686) (xy 73.333608 66.006812) (xy 73.2995 66.134108) (xy 67.5 66.134108) (xy 67.5 58.597018) + (xy 67.519685 58.529979) (xy 67.572489 58.484224) (xy 67.624 58.473018) (xy 81.876 58.473018) + ) + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/pcbnew/issue21184/issue21184.kicad_pro b/qa/data/pcbnew/issue21184/issue21184.kicad_pro new file mode 100644 index 0000000000..cc4599459d --- /dev/null +++ b/qa/data/pcbnew/issue21184/issue21184.kicad_pro @@ -0,0 +1,627 @@ +{ + "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.0 + } + }, + "diff_pair_dimensions": [], + "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_on_edge_cuts": "error", + "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": [], + "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": [], + "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": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "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", + "undefined_netclass": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "issue21184.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": "Reference" + }, + "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": [ + [ + "498bac11-840c-4b9c-8c40-95416b6d764e", + "Root" + ], + [ + "974a0092-e266-4c17-a0ad-0420d2f0f044", + "Test1" + ], + [ + "a2e4406d-77db-4c93-91c7-9c2044625396", + "Test2" + ] + ], + "text_variables": {} +} diff --git a/qa/data/pcbnew/issue21184/issue21184.kicad_sch b/qa/data/pcbnew/issue21184/issue21184.kicad_sch new file mode 100644 index 0000000000..f3c991c794 --- /dev/null +++ b/qa/data/pcbnew/issue21184/issue21184.kicad_sch @@ -0,0 +1,98 @@ +(kicad_sch + (version 20250114) + (generator "eeschema") + (generator_version "9.0") + (uuid "498bac11-840c-4b9c-8c40-95416b6d764e") + (paper "A4") + (lib_symbols) + (sheet + (at 63.5 63.5) + (size 25.4 12.7) + (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 "974a0092-e266-4c17-a0ad-0420d2f0f044") + (property "Sheetname" "Test1" + (at 63.5 62.7884 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left bottom) + ) + ) + (property "Sheetfile" "Test.kicad_sch" + (at 63.5 76.7846 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left top) + ) + ) + (instances + (project "issue21184" + (path "/498bac11-840c-4b9c-8c40-95416b6d764e" + (page "2") + ) + ) + ) + ) + (sheet + (at 63.5 83.82) + (size 25.4 12.7) + (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 "a2e4406d-77db-4c93-91c7-9c2044625396") + (property "Sheetname" "Test2" + (at 63.5 83.1084 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left bottom) + ) + ) + (property "Sheetfile" "Test.kicad_sch" + (at 63.5 97.1046 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left top) + ) + ) + (instances + (project "issue21184" + (path "/498bac11-840c-4b9c-8c40-95416b6d764e" + (page "3") + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/tests/pcbnew/test_multichannel.cpp b/qa/tests/pcbnew/test_multichannel.cpp index 9ecb11355b..f7e5471c25 100644 --- a/qa/tests/pcbnew/test_multichannel.cpp +++ b/qa/tests/pcbnew/test_multichannel.cpp @@ -331,4 +331,96 @@ BOOST_FIXTURE_TEST_CASE( RepeatLayoutCopiesFootprintProperties, MULTICHANNEL_TES } +/** + * Test that repeat layout does not remove vias from the reference area when a copper zone + * has the same name as one of the rule areas (issue 21184). + * + * The bug occurred because enclosedByArea() matched zones by name, and when a copper fill zone + * shared a name with a rule area, items enclosed by either zone could be incorrectly affected. + */ +BOOST_FIXTURE_TEST_CASE( RepeatLayoutDoesNotRemoveReferenceVias, MULTICHANNEL_TEST_FIXTURE ) +{ + KI_TEST::LoadBoard( m_settingsManager, "issue21184/issue21184", m_board ); + + TOOL_MANAGER toolMgr; + MOCK_TOOLS_HOLDER* toolsHolder = new MOCK_TOOLS_HOLDER; + + toolMgr.SetEnvironment( m_board.get(), nullptr, nullptr, nullptr, toolsHolder ); + + MULTICHANNEL_TOOL* mtTool = new MULTICHANNEL_TOOL; + toolMgr.RegisterTool( mtTool ); + + mtTool->FindExistingRuleAreas(); + + auto ruleData = mtTool->GetData(); + + BOOST_TEST_MESSAGE( wxString::Format( "Found %d rule areas", + static_cast( ruleData->m_areas.size() ) ) ); + + BOOST_CHECK_EQUAL( ruleData->m_areas.size(), 2 ); + + if( ruleData->m_areas.size() < 2 ) + return; + + RULE_AREA* refArea = nullptr; + RULE_AREA* targetArea = nullptr; + + for( RULE_AREA& ra : ruleData->m_areas ) + { + if( ra.m_ruleName == wxT( "Test1" ) ) + refArea = &ra; + else if( ra.m_ruleName == wxT( "Test2" ) ) + targetArea = &ra; + } + + BOOST_REQUIRE( refArea != nullptr ); + BOOST_REQUIRE( targetArea != nullptr ); + + int refViaCountBefore = 0; + + for( PCB_TRACK* track : m_board->Tracks() ) + { + if( track->Type() == PCB_VIA_T ) + { + PCB_VIA* via = static_cast( track ); + VECTOR2I viaPos = via->GetPosition(); + + if( refArea->m_zone->Outline()->Contains( viaPos ) ) + refViaCountBefore++; + } + } + + BOOST_TEST_MESSAGE( wxString::Format( "Reference area vias before repeat: %d", refViaCountBefore ) ); + BOOST_CHECK( refViaCountBefore > 0 ); + + mtTool->CheckRACompatibility( refArea->m_zone ); + + ruleData->m_compatMap[targetArea].m_doCopy = true; + ruleData->m_options.m_copyPlacement = true; + ruleData->m_options.m_copyRouting = true; + + int result = mtTool->RepeatLayout( TOOL_EVENT(), refArea->m_zone ); + + BOOST_CHECK( result >= 0 ); + + int refViaCountAfter = 0; + + for( PCB_TRACK* track : m_board->Tracks() ) + { + if( track->Type() == PCB_VIA_T ) + { + PCB_VIA* via = static_cast( track ); + VECTOR2I viaPos = via->GetPosition(); + + if( refArea->m_zone->Outline()->Contains( viaPos ) ) + refViaCountAfter++; + } + } + + BOOST_TEST_MESSAGE( wxString::Format( "Reference area vias after repeat: %d", refViaCountAfter ) ); + + BOOST_CHECK_EQUAL( refViaCountAfter, refViaCountBefore ); +} + + BOOST_AUTO_TEST_SUITE_END()