From bc096dc4ee9bf2a358d3690f69db52d652670a54 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 9 Jun 2019 17:00:09 -0700 Subject: [PATCH] Eagle: Fix stacked NC pin import Since Eagle does not connect stacked NC pins but KiCad will if the pins are coincident, we choose to only import the first of the stacked NC pins. While this creates symbols that are slightly different in pin count from the Eagle version, it keeps the schematic and netlist functionally correct relative to the Eagle version. Fixes: lp:1821319 * https://bugs.launchpad.net/kicad/+bug/1821319 (cherry picked from commit 370109b8689f7390d29a9587e2573e48c74893ce) --- eeschema/sch_eagle_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index e1bf1a90c1..99c79cfbe3 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -1452,14 +1452,21 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptrSetNumberTextSize( 0 ); } + // Eagle does not connect multiple NC pins together when they are stacked. + // KiCad will do this for pins that are coincident. We opt here for correct + // schematic netlist and leave out the multiple NC pins when stacked. for( unsigned i = 0; i < pads.GetCount(); i++) { + if( pin->GetType() == PIN_NC && i > 0) + break; + LIB_PIN* apin = new LIB_PIN( *pin ); wxString padname( pads[i] ); apin->SetNumber( padname ); aPart->AddDrawItem( apin ); } + break; } }