Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name()

This commit is contained in:
Maciej Suminski 2017-08-11 11:22:13 +02:00
parent d6f3961804
commit cca63801bf
38 changed files with 77 additions and 77 deletions

View File

@ -104,7 +104,7 @@ void ARRAY_CREATOR::Invoke()
if( new_item->Type() == PCB_PAD_T )
{
const wxString padName = array_opts->GetItemNumber( ptN );
static_cast<D_PAD*>( new_item )->SetPadName( padName );
static_cast<D_PAD*>( new_item )->SetName( padName );
}
}
}

View File

@ -321,7 +321,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
// At this point, the component footprint is updated. Now update the nets.
for( D_PAD* pad = aPcbComponent->PadsList(); pad; pad = pad->Next() )
{
COMPONENT_NET net = aNewComponent->GetNet( pad->GetPadName() );
COMPONENT_NET net = aNewComponent->GetNet( pad->GetName() );
if( !net.IsValid() ) // New footprint pad has no net.
{
@ -329,13 +329,13 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
{
msg.Printf( _( "Disconnect component %s pin %s.\n" ),
GetChars( aPcbComponent->GetReference() ),
GetChars( pad->GetPadName() ) );
GetChars( pad->GetName() ) );
m_reporter->Report( msg, REPORTER::RPT_ACTION );
msg.Printf( _( "Clearing component \"%s:%s\" pin \"%s\" net name.\n" ),
GetChars( aPcbComponent->GetReference() ),
GetChars( aPcbComponent->GetPath() ),
GetChars( pad->GetPadName() ) );
GetChars( pad->GetName() ) );
m_reporter->Report( msg, REPORTER::RPT_INFO );
}
@ -380,14 +380,14 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
{
msg.Printf( _( "Reconnect component %s pin %s from net %s to net %s.\n"),
GetChars( aPcbComponent->GetReference() ),
GetChars( pad->GetPadName() ),
GetChars( pad->GetName() ),
GetChars( pad->GetNetname() ),
GetChars( netName ) );
} else {
msg.Printf( _( "Connect component %s pin %s to net %s.\n"),
GetChars( aPcbComponent->GetReference() ),
GetChars( pad->GetPadName() ),
GetChars( pad->GetName() ),
GetChars( netName ) );
}
@ -397,7 +397,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
"\"%s\" to \"%s\".\n" ),
GetChars( aPcbComponent->GetReference() ),
GetChars( aPcbComponent->GetPath() ),
GetChars( pad->GetPadName() ),
GetChars( pad->GetName() ),
GetChars( pad->GetNetname() ),
GetChars( netName ) );
m_reporter->Report( msg, REPORTER::RPT_INFO );
@ -521,7 +521,7 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
msg.Printf( _( "Remove single pad net \"%s\" on \"%s\" pad '%s'\n" ),
GetChars( previouspad->GetNetname() ),
GetChars( previouspad->GetParent()->GetReference() ),
GetChars( previouspad->GetPadName() ) );
GetChars( previouspad->GetName() ) );
m_reporter->Report( msg, REPORTER::RPT_ACTION );
previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED );

View File

@ -2593,7 +2593,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
// At this point, the component footprint is updated. Now update the nets.
for( auto pad : footprint->Pads() )
{
COMPONENT_NET net = component->GetNet( pad->GetPadName() );
COMPONENT_NET net = component->GetNet( pad->GetName() );
if( !net.IsValid() ) // Footprint pad had no net.
{
@ -2602,7 +2602,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
msg.Printf( _( "Clearing component \"%s:%s\" pin \"%s\" net name.\n" ),
GetChars( footprint->GetReference() ),
GetChars( footprint->GetPath() ),
GetChars( pad->GetPadName() ) );
GetChars( pad->GetName() ) );
aReporter->Report( msg, REPORTER::RPT_ACTION );
}
@ -2622,7 +2622,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
"\"%s\" to \"%s\".\n" ),
GetChars( footprint->GetReference() ),
GetChars( footprint->GetPath() ),
GetChars( pad->GetPadName() ),
GetChars( pad->GetName() ),
GetChars( pad->GetNetname() ),
GetChars( net.GetNetName() ) );
aReporter->Report( msg, REPORTER::RPT_ACTION );
@ -2736,7 +2736,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
msg.Printf( _( "Remove single pad net \"%s\" on \"%s\" pad '%s'\n" ),
GetChars( pad->GetNetname() ),
GetChars( pad->GetParent()->GetReference() ),
GetChars( pad->GetPadName() ) );
GetChars( pad->GetName() ) );
aReporter->Report( msg, REPORTER::RPT_ACTION );
}

View File

@ -373,7 +373,7 @@ void MODULE::CopyNetlistSettings( MODULE* aModule, bool aCopyLocalSettings )
// because we copy settings from the first pad found.
// When old and new footprints have very few differences, a better
// algo can be used.
D_PAD* oldPad = FindPadByName( pad->GetPadName() );
D_PAD* oldPad = FindPadByName( pad->GetName() );
if( oldPad )
oldPad->CopyNetlistSettings( pad, aCopyLocalSettings );
@ -644,7 +644,7 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const
{
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
if( pad->GetPadName().CmpNoCase( aPadName ) == 0 ) // why case insensitive?
if( pad->GetName().CmpNoCase( aPadName ) == 0 ) // why case insensitive?
return pad;
}
@ -721,7 +721,7 @@ unsigned MODULE::GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH ) const
// Skip pads with no name, because they are usually "mechanical"
// pads, not "electrical" pads
if( pad->GetPadName().IsEmpty() )
if( pad->GetName().IsEmpty() )
continue;
if( !aIncludeNPTH )
@ -733,7 +733,7 @@ unsigned MODULE::GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH ) const
}
}
usedNames.insert( pad->GetPadName() );
usedNames.insert( pad->GetName() );
}
return usedNames.size();
@ -1208,7 +1208,7 @@ wxString MODULE::GetNextPadName( bool aFillSequenceGaps ) const
// Create a set of used pad numbers
for( D_PAD* pad = PadsList(); pad; pad = pad->Next() )
{
int padNumber = getTrailingInt( pad->GetPadName() );
int padNumber = getTrailingInt( pad->GetName() );
usedNumbers.insert( padNumber );
}

View File

@ -517,7 +517,7 @@ bool D_PAD::IncrementPadName( bool aSkipUnconnectable, bool aFillSequenceGaps )
bool skip = aSkipUnconnectable && ( GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED );
if( !skip )
SetPadName( GetParent()->GetNextPadName( aFillSequenceGaps ) );
SetName( GetParent()->GetNextPadName( aFillSequenceGaps ) );
return !skip;
}
@ -1180,7 +1180,7 @@ wxString D_PAD::GetSelectMenuText() const
{
wxString text;
wxString padlayers( LayerMaskDescribe( GetBoard(), m_layerMask ) );
wxString padname( GetPadName() );
wxString padname( GetName() );
if( padname.IsEmpty() )
{
@ -1191,7 +1191,7 @@ wxString D_PAD::GetSelectMenuText() const
else
{
text.Printf( _( "Pad %s on %s of %s" ),
GetChars(GetPadName() ), GetChars( padlayers ),
GetChars(GetName() ), GetChars( padlayers ),
GetChars(GetParent()->GetReference() ) );
}
@ -1253,7 +1253,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
wxString msg;
msg.Printf( wxT( "footprint %s, pad %s: could not find valid layer for pad" ),
GetParent() ? GetParent()->GetReference() : "<null>",
GetPadName().IsEmpty() ? "(unnamed)" : GetPadName() );
GetName().IsEmpty() ? "(unnamed)" : GetName() );
wxLogWarning( msg );
}
#endif

View File

@ -164,7 +164,7 @@ public:
* Set the pad name (sometimes called pad number, although
* it can be an array reference like AA12).
*/
void SetPadName( const wxString& aName )
void SetName( const wxString& aName )
{
m_name = aName;
}
@ -172,7 +172,7 @@ public:
/**
* @return the pad name
*/
const wxString& GetPadName() const
const wxString& GetName() const
{
return m_name;
}

View File

@ -174,7 +174,7 @@ std::string FormatProbeItem( BOARD_ITEM* aItem )
case PCB_PAD_T:
{
module = (MODULE*) aItem->GetParent();
wxString pad = ((D_PAD*)aItem)->GetPadName();
wxString pad = ((D_PAD*)aItem)->GetName();
return StrPrintf( "$PART: \"%s\" $PAD: \"%s\"",
TO_UTF8( module->GetReference() ),

View File

@ -464,7 +464,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_staticTextWarningPadFlipped->Show(m_isFlipped);
m_PadNumCtrl->SetValue( m_dummyPad->GetPadName() );
m_PadNumCtrl->SetValue( m_dummyPad->GetName() );
m_PadNetNameCtrl->SetValue( m_dummyPad->GetNetname() );
// Set the unit name in dialog:
@ -1306,7 +1306,7 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) );
}
m_currentPad->SetPadName( m_padMaster->GetPadName() );
m_currentPad->SetName( m_padMaster->GetName() );
wxString padNetname;
@ -1513,7 +1513,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
aPad->SetOffset( wxPoint( x, y ) );
aPad->SetOrientation( m_OrientValue * 10.0 );
aPad->SetPadName( m_PadNumCtrl->GetValue() );
aPad->SetName( m_PadNumCtrl->GetValue() );
// Check if user has set an existing net name
const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() );
@ -1593,7 +1593,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
// Mechanical purpose only:
// no offset, no net name, no pad name allowed
aPad->SetOffset( wxPoint( 0, 0 ) );
aPad->SetPadName( wxEmptyString );
aPad->SetName( wxEmptyString );
aPad->SetNetCode( NETINFO_LIST::UNCONNECTED );
break;

View File

@ -858,7 +858,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
// update the nets within the pads of the clone
for( D_PAD* pad = m->PadsList(); pad; pad = pad->Next() )
{
string pn_key = makeKey( e.name, TO_UTF8( pad->GetPadName() ) );
string pn_key = makeKey( e.name, TO_UTF8( pad->GetName() ) );
NET_MAP_CITER ni = m_pads_to_nets.find( pn_key );
if( ni != m_pads_to_nets.end() )
@ -1255,7 +1255,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, wxXmlNode* aTree ) const
D_PAD* pad = new D_PAD( aModule );
aModule->PadsList().PushBack( pad );
pad->SetPadName( FROM_UTF8( e.name.c_str() ) );
pad->SetName( FROM_UTF8( e.name.c_str() ) );
// pad's "Position" is not relative to the module's,
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
@ -1572,7 +1572,7 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, wxXmlNode* aTree ) const
// Mechanical purpose only:
// no offset, no net name, no pad name allowed
// pad->SetOffset( wxPoint( 0, 0 ) );
// pad->SetPadName( wxEmptyString );
// pad->SetName( wxEmptyString );
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
@ -1601,7 +1601,7 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
D_PAD* pad = new D_PAD( aModule );
aModule->PadsList().PushBack( pad );
pad->SetPadName( FROM_UTF8( e.name.c_str() ) );
pad->SetName( FROM_UTF8( e.name.c_str() ) );
pad->SetShape( PAD_SHAPE_RECT );
pad->SetAttribute( PAD_ATTRIB_SMD );

View File

@ -128,7 +128,7 @@ static void build_pad_testpoints( BOARD *aPcb,
if( rk.access != -1 )
{
rk.netname = pad->GetNetname();
rk.pin = pad->GetPadName();
rk.pin = pad->GetName();
rk.refdes = module->GetReference();
rk.midpoint = false; // XXX MAYBE need to be computed (how?)
const wxSize& drill = pad->GetDrillSize();

View File

@ -660,7 +660,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb )
layer = module->GetFlag() ? "BOTTOM" : "TOP";
}
pinname = pad->GetPadName();
pinname = pad->GetName();
if( pinname.IsEmpty() )
pinname = wxT( "none" );
@ -801,7 +801,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb )
msg.Printf( wxT( "NODE %s %s" ),
GetChars( module->GetReference() ),
GetChars( pad->GetPadName() ) );
GetChars( pad->GetName() ) );
fputs( TO_UTF8( msg ), aFile );
fputs( "\n", aFile );

View File

@ -303,7 +303,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
kplate = IDF3::PTH;
// hole type
tstr = TO_UTF8( pad->GetPadName() );
tstr = TO_UTF8( pad->GetName() );
if( tstr.empty() || !tstr.compare( "0" ) || !tstr.compare( "~" )
|| ( kplate == IDF3::NPTH )

View File

@ -719,7 +719,7 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
for( D_PAD* pad = Module->PadsList(); pad != NULL; pad = pad->Next() )
{
fprintf( rptfile, "$PAD \"%s\"\n", TO_UTF8( pad->GetPadName() ) );
fprintf( rptfile, "$PAD \"%s\"\n", TO_UTF8( pad->GetName() ) );
int layer = 0;
if( pad->GetLayerSet()[B_Cu] )

View File

@ -667,7 +667,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader )
// and set to the pin name of the netlist on instantiation. Many gEDA
// bare footprints use identical strings for name and number, so this
// can be a bit confusing.
pad->SetPadName( parameters[paramCnt-3] );
pad->SetName( parameters[paramCnt-3] );
int x1 = parseInt( parameters[2], conv_unit );
int x2 = parseInt( parameters[4], conv_unit );
@ -749,7 +749,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader )
// Pcbnew pad name is used for electrical connection calculations.
// Accordingly it should be mapped to gEDA's pin/pad number,
// which is used for the same purpose.
pad->SetPadName( parameters[paramCnt-3] );
pad->SetName( parameters[paramCnt-3] );
wxPoint padPos( parseInt( parameters[2], conv_unit ),
parseInt( parameters[3], conv_unit ) );

View File

@ -1264,7 +1264,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
}
m_out->Print( aNestLevel, "(pad %s %s %s",
m_out->Quotew( aPad->GetPadName() ).c_str(),
m_out->Quotew( aPad->GetName() ).c_str(),
type, shape );
m_out->Print( 0, " (at %s", FMT_IU( aPad->GetPos0() ).c_str() );

View File

@ -1453,7 +1453,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
}
// chances are both were ASCII, but why take chances?
pad->SetPadName( padname );
pad->SetName( padname );
pad->SetShape( PAD_SHAPE_T( padshape ) );
pad->SetSize( wxSize( size_x, size_y ) );
pad->SetDelta( wxSize( delta_x, delta_y ) );

View File

@ -215,7 +215,7 @@ MODULE* PCB_EDIT_FRAME::CreateMuWaveBaseFootprint( const wxString& aValue,
pad->SetLayerSet( F_Cu );
Line.Printf( wxT( "%d" ), pad_num );
pad->SetPadName( Line );
pad->SetName( Line );
pad_num++;
}
@ -329,7 +329,7 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type )
break;
case 1: //Stub :
pad->SetPadName( wxT( "1" ) );
pad->SetName( wxT( "1" ) );
pad = pad->Next();
pad->SetY0( -( gap_size + pad->GetSize().y ) / 2 );
pad->SetSize( wxSize( pad->GetSize().x, gap_size ) );

View File

@ -369,7 +369,7 @@ MODULE* MWAVE::CreateMicrowaveInductor( INDUCTOR_PATTERN& inductorPattern,
module->PadsList().PushFront( pad );
pad->SetPadName( "1" );
pad->SetName( "1" );
pad->SetPosition( inductorPattern.m_End );
pad->SetPos0( pad->GetPosition() - module->GetPosition() );
@ -384,7 +384,7 @@ MODULE* MWAVE::CreateMicrowaveInductor( INDUCTOR_PATTERN& inductorPattern,
module->PadsList().Insert( newpad, pad->Next() );
pad = newpad;
pad->SetPadName( "2" );
pad->SetName( "2" );
pad->SetPosition( inductorPattern.m_Start );
pad->SetPos0( pad->GetPosition() - module->GetPosition() );

View File

@ -142,11 +142,11 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw )
if( pad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
{
padName = GetNextPadName( GetDesignSettings()
.m_Pad_Master.GetPadName() );
.m_Pad_Master.GetName() );
}
pad->SetPadName( padName );
GetDesignSettings().m_Pad_Master.SetPadName( padName );
pad->SetName( padName );
GetDesignSettings().m_Pad_Master.SetName( padName );
aModule->CalculateBoundingBox();
SetMsgPanel( pad );

View File

@ -374,7 +374,7 @@ void PCB::DoPCBComponents( XNODE* aNode,
break;
mNode->GetAttribute( wxT( "Name" ), &propValue );
mc->SetPadName( str, propValue );
mc->SetName( str, propValue );
mNode = mNode->GetNext();
}
else

View File

@ -372,7 +372,7 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
}
void PCB_MODULE::SetPadName( wxString aPin, wxString aName )
void PCB_MODULE::SetName( wxString aPin, wxString aName )
{
int i;
long num;
@ -465,7 +465,7 @@ void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
break;
mNode->GetAttribute( wxT( "Name" ), &propValue );
SetPadName( str, propValue );
SetName( str, propValue );
mNode = mNode->GetNext();
}
else

View File

@ -57,7 +57,7 @@ public:
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
void SetPadName( wxString aPin, wxString aName );
void SetName( wxString aPin, wxString aName );
virtual void Parse( XNODE* aNode, wxStatusBar* aStatusBar,
wxString aDefaultMeasurementUnit, wxString aActualConversion );

View File

@ -245,7 +245,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
// actually this is a thru-hole pad
pad->SetLayerSet( LSET::AllCuMask() | LSET( 2, B_Mask, F_Mask ) );
pad->SetPadName( m_name.text );
pad->SetName( m_name.text );
if( padShapeName == wxT( "Oval" )
|| padShapeName == wxT( "Ellipse" )

View File

@ -623,7 +623,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
if( m_pcbSettings.m_padNumbers )
{
const wxString& padName = aPad->GetPadName();
const wxString& padName = aPad->GetName();
textpos.y = -textpos.y;
double tsize = 1.5 * padsize.x / padName.Length();
tsize = std::min( tsize, size );

View File

@ -2248,7 +2248,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
std::unique_ptr< D_PAD > pad( new D_PAD( aParent ) );
NeedSYMBOLorNUMBER();
pad->SetPadName( FromUTF8() );
pad->SetName( FromUTF8() );
T token = NextTok();

View File

@ -80,7 +80,7 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
gbr_metadata.SetCopper( true );
if( isOnExternalCopperLayer )
gbr_metadata.SetPadName( aPad->GetPadName() );
gbr_metadata.SetPadName( aPad->GetName() );
gbr_metadata.SetNetName( aPad->GetNetname() );
@ -88,7 +88,7 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
// when this is the case, they have no pad name and/or are not plated.
// In this case gerber files have slightly different attributes.
if( aPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ||
aPad->GetPadName().IsEmpty() )
aPad->GetName().IsEmpty() )
gbr_metadata.m_NetlistMetadata.m_NotInNet = true;
if( !isOnExternalCopperLayer || !isPadOnBoardTechLayers )

View File

@ -27,7 +27,7 @@ def smdRectPad(module,size,pos,name):
pad.SetAttribute(PAD_ATTRIB_SMD)
pad.SetLayerSet(pad.SMDMask())
pad.SetPos0(pos)
pad.SetPadName(name)
pad.SetName(name)
return pad
for n in range (0,pads):

View File

@ -27,7 +27,7 @@ for y in range (0,10):
pt = wxPointMM(1.27*x,1.27*y)
pad.SetPos0(pt);
#pad.SetPosition(pt)
pad.SetPadName(str(n))
pad.SetName(str(n))
module.Add(pad)
n+=1
@ -42,7 +42,7 @@ print map( lambda x: x.GetReference() , list(pcb.GetModules()))
for m in pcb.GetModules():
for p in m.Pads():
print p.GetPadName(), p.GetPosition(), p.GetOffset()
print p.GetName(), p.GetPosition(), p.GetOffset()
# pcb.GetDesignSettings()

View File

@ -51,7 +51,7 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard):
pad.SetLayerSet( pad.SMDMask() )
pad.SetPos0(pos)
pad.SetPosition(pos)
pad.SetPadName(name)
pad.SetName(name)
return pad
def CheckParameters(self):

View File

@ -165,7 +165,7 @@ class PadGridArray(PadArray):
posY = pin1posY + (self.py * y)
pos = dc.TransformPoint(posX, posY)
pad = self.GetPad(x == 0 and y == 0, pos)
pad.SetPadName(self.GetName(x,y))
pad.SetName(self.GetName(x,y))
self.AddPad(pad)
class EPADGridArray(PadGridArray):
@ -207,7 +207,7 @@ class PadZGridArray(PadArray):
pos = dc.TransformPoint(posX, posY)
pad = self.GetPad(padnum == 0, pos)
pad.SetPadName(self.GetName(padnum))
pad.SetName(self.GetName(padnum))
self.AddPad(pad)
line += 1
@ -255,7 +255,7 @@ class PadCircleArray(PadArray):
pos_y = -math.cos(angle * math.pi / 180) * self.r
pos = dc.TransformPoint(pos_x, pos_y)
pad = self.GetPad(pin == 0, pos)
pad.SetPadName(self.GetName(pin))
pad.SetName(self.GetName(pin))
self.AddPad(pad)
class PadCustomArray(PadArray):
@ -277,5 +277,5 @@ class PadCustomArray(PadArray):
for i in range(len(self.array)):
pos = dc.TransformPoint(self.array[i][0], self.array[i][1])
pad = self.GetPad(i == 0, pos)
pad.SetPadName(self.GetName(i))
pad.SetName(self.GetName(i))
self.AddPad(pad)

View File

@ -74,7 +74,7 @@ class PadStaggeredZGridArray(PA.PadArray):
pos = dc.TransformPoint(posX, posY)
pad = self.GetPad(padnum == 0, pos)
pad.SetPadName(self.GetName(padnum))
pad.SetName(self.GetName(padnum))
self.AddPad(pad)
line += 1

View File

@ -150,7 +150,7 @@ class QFNWizard(FootprintWizardBase.FootprintWizard):
layers = pcbnew.LSET(pcbnew.F_Mask)
layers.AddLayer(pcbnew.F_Cu)
layers.AddLayer(pcbnew.F_Paste)
epad.SetPadName(epad_num)
epad.SetName(epad_num)
array = PA.EPADGridArray( epad, epad_ny, epad_nx, epad_l, epad_w, pcbnew.wxPoint(0,0) )
array.SetFirstPadInArray(epad_num)

View File

@ -86,7 +86,7 @@ class QRCodeWizard(FootprintWizardBase.FootprintWizard):
layerset.AddLayer(pcbnew.F_Mask)
pad.SetLayerSet( layerset )
pad.SetPosition(pcbnew.wxPoint(xposition,yposition))
pad.SetPadName("1")
pad.SetName("1")
self.module.Add(pad)
if self.UseSilkS:
polygon=self.drawSquareArea(pcbnew.F_SilkS, self.X, xposition, yposition)

View File

@ -70,7 +70,7 @@ class TouchSliderWizard(FootprintWizardBase.FootprintWizard):
pad.SetLayerSet(pad.ConnSMDMask())
pad.SetPos0(pos)
pad.SetPosition(pos)
pad.SetPadName(name)
pad.SetName(name)
return pad
@ -82,7 +82,7 @@ class TouchSliderWizard(FootprintWizardBase.FootprintWizard):
pad.SetLayerSet(pad.ConnSMDMask())
pad.SetPos0(pos)
pad.SetPosition(pos)
pad.SetPadName(name)
pad.SetName(name)
pad.SetDelta(wxSize(left_right*size[1],up_down*size[0]))
return pad

View File

@ -562,7 +562,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
PIN* pin = new PIN( image );
padName = pad->GetPadName();
padName = pad->GetName();
pin->pin_id = TO_UTF8( padName );
if( padName!=wxEmptyString && pinmap.find( padName )==pinmap.end() )

View File

@ -5,7 +5,7 @@ pcb = pcbnew.GetBoard()
for m in pcb.GetModules():
print m.GetPosition()
for p in m.Pads():
print "p=>",p.GetPosition(),p.GetPadName()
print "p=>",p.GetPosition(),p.GetName()
print p.GetPosition()

View File

@ -5,4 +5,4 @@ pcb = pcbnew.GetBoard()
for m in pcb.GetModules():
print m.GetReference(),"(",m.GetValue(),") at ", m.GetPosition()
for p in m.Pads():
print " pad",p.GetPadName(), "at",p.GetPosition()
print " pad",p.GetName(), "at",p.GetPosition()

View File

@ -209,8 +209,8 @@ int MODULE_EDITOR_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent )
// Rename pad and store the old name
wxString newName = wxString::Format( wxT( "%s%d" ), padPrefix.c_str(), padNumber++ );
oldNames[newName] = pad->GetPadName();
pad->SetPadName( newName );
oldNames[newName] = pad->GetName();
pad->SetName( newName );
pad->SetSelected();
getView()->Update( pad );
}
@ -218,12 +218,12 @@ int MODULE_EDITOR_TOOLS::EnumeratePads( const TOOL_EVENT& aEvent )
// ..or restore the old name if it was enumerated and clicked again
else if( pad->IsSelected() && evt->IsClick( BUT_LEFT ) )
{
auto it = oldNames.find( pad->GetPadName() );
auto it = oldNames.find( pad->GetName() );
wxASSERT( it != oldNames.end() );
if( it != oldNames.end() )
{
pad->SetPadName( it->second );
pad->SetName( it->second );
oldNames.erase( it );
}