KiCad PCB EDA Suite
PAD_DESC Struct Reference

Public Member Functions

 PAD_DESC ()
 

Detailed Description

Definition at line 1452 of file pad.cpp.

Constructor & Destructor Documentation

◆ PAD_DESC()

PAD_DESC::PAD_DESC ( )
inline

Definition at line 1454 of file pad.cpp.

1455  {
1457  .Map( PAD_ATTRIB::PTH, _HKI( "Through-hole" ) )
1458  .Map( PAD_ATTRIB::SMD, _HKI( "SMD" ) )
1459  .Map( PAD_ATTRIB::CONN, _HKI( "Edge connector" ) )
1460  .Map( PAD_ATTRIB::NPTH, _HKI( "NPTH, mechanical" ) );
1461 
1463  .Map( PAD_SHAPE::CIRCLE, _HKI( "Circle" ) )
1464  .Map( PAD_SHAPE::RECT, _HKI( "Rectangle" ) )
1465  .Map( PAD_SHAPE::OVAL, _HKI( "Oval" ) )
1466  .Map( PAD_SHAPE::TRAPEZOID, _HKI( "Trapezoid" ) )
1467  .Map( PAD_SHAPE::ROUNDRECT, _HKI( "Rounded rectangle" ) )
1468  .Map( PAD_SHAPE::CHAMFERED_RECT, _HKI( "Chamfered rectangle" ) )
1469  .Map( PAD_SHAPE::CUSTOM, _HKI( "Custom" ) );
1470 
1472  .Map( PAD_PROP::NONE, _HKI( "None" ) )
1473  .Map( PAD_PROP::BGA, _HKI( "BGA pad" ) )
1474  .Map( PAD_PROP::FIDUCIAL_GLBL, _HKI( "Fiducial, global to board" ) )
1475  .Map( PAD_PROP::FIDUCIAL_LOCAL, _HKI( "Fiducial, local to footprint" ) )
1476  .Map( PAD_PROP::TESTPOINT, _HKI( "Test point pad" ) )
1477  .Map( PAD_PROP::HEATSINK, _HKI( "Heatsink pad" ) )
1478  .Map( PAD_PROP::CASTELLATED, _HKI( "Castellated pad" ) );
1479 
1481  REGISTER_TYPE( PAD );
1483 
1484  auto padType = new PROPERTY_ENUM<PAD, PAD_ATTRIB>( _HKI( "Pad Type" ),
1486  propMgr.AddProperty( padType );
1487 
1488  auto shape = new PROPERTY_ENUM<PAD, PAD_SHAPE>( _HKI( "Shape" ),
1490  propMgr.AddProperty( shape );
1491 
1492  propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pad Number" ),
1494  propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pin Name" ),
1496  propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pin Type" ),
1498  propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Orientation" ),
1501  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size X" ),
1504  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size Y" ),
1507  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size X" ),
1510  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size Y" ),
1513  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Pad To Die Length" ),
1516  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Soldermask Margin Override" ),
1519  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Solderpaste Margin Override" ),
1522  propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Solderpaste Margin Ratio Override" ),
1524  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief Width" ),
1527  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief Gap" ),
1530  propMgr.AddProperty( new PROPERTY_ENUM<PAD, PAD_PROP>( _HKI( "Fabrication Property" ),
1532 
1533  auto roundRadiusRatio = new PROPERTY<PAD, double>( _HKI( "Round Radius Ratio" ),
1535  roundRadiusRatio->SetAvailableFunc(
1536  [=]( INSPECTABLE* aItem ) -> bool
1537  {
1538  return aItem->Get( shape ) == static_cast<int>( PAD_SHAPE::ROUNDRECT );
1539  } );
1540  propMgr.AddProperty( roundRadiusRatio );
1541 
1542  propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Clearance Override" ),
1545  propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Parent" ),
1546  NO_SETTER( PAD, wxString ), &PAD::GetParentAsString ) );
1547 
1548  // TODO delta, drill shape offset, layer set, zone connection
1549  }
Display value expressed in degrees.
Definition: property.h:54
int GetLocalSolderMaskMargin() const
Definition: pad.h:386
const int GetSizeY() const
Definition: pad.h:237
int GetLocalClearance() const
Definition: pad.h:390
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:65
#define TYPE_HASH(x)
Definition: property.h:59
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: pad.h:397
void SetAttribute(PAD_ATTRIB aAttribute)
Definition: pad.cpp:578
const int GetDrillSizeX() const
Definition: pad.h:245
int GetLocalSolderPasteMargin() const
Definition: pad.h:393
double GetRoundRectRadiusRatio() const
Definition: pad.h:523
void SetLocalClearance(int aClearance)
Definition: pad.h:391
void SetThermalSpokeWidth(int aWidth)
Set the width of the thermal spokes connecting the pad to a zone.
Definition: pad.h:490
void SetDrillSizeY(const int aY)
Definition: pad.h:246
PAD_PROP GetProperty() const
Definition: pad.h:374
Like smd, does not appear on the solder paste layer (default)
void SetOrientationDegrees(double aOrientation)
Set orientation in degrees.
Definition: pad.h:343
Smd pad, appears on the solder paste layer (default)
static ENUM_MAP< T > & Instance()
Definition: property.h:510
void SetSizeX(const int aX)
Definition: pad.h:234
void SetPinType(const wxString &aType)
Set the pad electrical type.
Definition: pad.h:145
a test point pad
#define NO_SETTER(owner, type)
Definition: property.h:621
int GetThermalGap() const
Definition: pad.h:499
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
#define REGISTER_TYPE(x)
Definition: property_mgr.h:248
Plated through hole pad.
void SetPadToDieLength(int aLength)
Definition: pad.h:383
void SetProperty(PAD_PROP aProperty)
Definition: pad.cpp:589
a pad used as heat sink, usually in SMD footprints
void SetLocalSolderMaskMargin(int aMargin)
Definition: pad.h:387
void SetDrillSizeX(const int aX)
Definition: pad.h:244
like PAD_PTH, but not plated
Display value expressed in distance units (mm/inch)
Definition: property.h:53
int GetThermalSpokeWidth() const
Definition: pad.h:491
void SetThermalGap(int aGap)
Definition: pad.h:498
wxAny Get(PROPERTY_BASE *aProperty)
Definition: inspectable.h:86
Smd pad, used in BGA footprints.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
const wxString & GetNumber() const
Definition: pad.h:129
const wxString & GetPinType() const
Definition: pad.h:146
PAD_SHAPE GetShape() const
Definition: pad.h:170
a fiducial (usually a smd) local to the parent footprint
void SetPinFunction(const wxString &aName)
Set the pad function (pin name in schematic)
Definition: pad.h:139
Class that other classes need to inherit from, in order to be inspectable.
Definition: inspectable.h:35
void SetRoundRectRadiusRatio(double aRadiusScale)
Has meaning only for rounded rectangle pads.
Definition: pad.cpp:272
double GetLocalSolderPasteMarginRatio() const
Definition: pad.h:396
void SetSizeY(const int aY)
Definition: pad.h:236
a fiducial (usually a smd) for the full board
void SetLocalSolderPasteMargin(int aMargin)
Definition: pad.h:394
no special fabrication property
const int GetDrillSizeY() const
Definition: pad.h:247
PAD_ATTRIB GetAttribute() const
Definition: pad.h:371
void SetNumber(const wxString &aNumber)
Set the pad number (note that it can be alphanumeric, such as the array reference "AA12").
Definition: pad.h:128
double GetOrientationDegrees() const
Definition: pad.h:350
void AddProperty(PROPERTY_BASE *aProperty)
Register a property.
const int GetSizeX() const
Definition: pad.h:235
void SetShape(PAD_SHAPE aShape)
Set the new shape of this pad.
Definition: pad.h:161
wxString GetParentAsString() const
Definition: pad.h:107
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:62
a pad with a castellated through hole
Definition: pad.h:57
#define _HKI(x)
int GetPadToDieLength() const
Definition: pad.h:384
const wxString & GetPinFunction() const
Definition: pad.h:140

References _HKI, PROPERTY_MANAGER::AddProperty(), BGA, CASTELLATED, CHAMFERED_RECT, CIRCLE, CONN, CUSTOM, DEGREE, DISTANCE, FIDUCIAL_GLBL, FIDUCIAL_LOCAL, INSPECTABLE::Get(), PAD::GetAttribute(), PAD::GetDrillSizeX(), PAD::GetDrillSizeY(), PAD::GetLocalClearance(), PAD::GetLocalSolderMaskMargin(), PAD::GetLocalSolderPasteMargin(), PAD::GetLocalSolderPasteMarginRatio(), PAD::GetNumber(), PAD::GetOrientationDegrees(), PAD::GetPadToDieLength(), PAD::GetParentAsString(), PAD::GetPinFunction(), PAD::GetPinType(), PAD::GetProperty(), PAD::GetRoundRectRadiusRatio(), PAD::GetShape(), PAD::GetSizeX(), PAD::GetSizeY(), PAD::GetThermalGap(), PAD::GetThermalSpokeWidth(), HEATSINK, PROPERTY_MANAGER::InheritsAfter(), PROPERTY_MANAGER::Instance(), ENUM_MAP< T >::Instance(), NO_SETTER, NONE, NPTH, OVAL, PTH, RECT, REGISTER_TYPE, ROUNDRECT, PAD::SetAttribute(), PAD::SetDrillSizeX(), PAD::SetDrillSizeY(), PAD::SetLocalClearance(), PAD::SetLocalSolderMaskMargin(), PAD::SetLocalSolderPasteMargin(), PAD::SetLocalSolderPasteMarginRatio(), PAD::SetNumber(), PAD::SetOrientationDegrees(), PAD::SetPadToDieLength(), PAD::SetPinFunction(), PAD::SetPinType(), PAD::SetProperty(), PAD::SetRoundRectRadiusRatio(), PAD::SetShape(), PAD::SetSizeX(), PAD::SetSizeY(), PAD::SetThermalGap(), PAD::SetThermalSpokeWidth(), SMD, TESTPOINT, TRAPEZOID, and TYPE_HASH.


The documentation for this struct was generated from the following file: