Eagle Import: Handle muli-pad pins. Adds overlapping pins in the symbol definition to ensure that electrical connections are made to each pad on the footprint.

This commit is contained in:
Russell Oliver 2017-09-23 17:34:20 +10:00 committed by Maciej Suminski
parent ce145373e4
commit 82b1e3c790
1 changed files with 16 additions and 4 deletions

View File

@ -1349,19 +1349,31 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
{
if( connect.gate == aGateName and pin->GetName().ToStdString() == connect.pin )
{
wxString padname( connect.pad );
pin->SetNumber( padname );
wxArrayString pads = wxSplit( wxString(connect.pad), ' ');
pin->SetPartNumber( aGateNumber );
pin->SetUnit( aGateNumber );
wxString pinname = pin->GetName();
pinname.Replace( "~", "~~" );
pinname.Replace( "!", "~" );
pin->SetName( pinname );
aPart->AddDrawItem( pin.release() );
if( pads.GetCount() > 1)
{
pin->SetNumberTextSize( 0 );
}
for( int i = 0; i < pads.GetCount(); i++)
{
LIB_PIN* apin = new LIB_PIN( *pin );
wxString padname( pads[i] );
apin->SetNumber( padname );
aPart->AddDrawItem( apin);
}
break;
}
}
}