KiCad PCB EDA Suite
PAD_DESC Struct Reference

Public Member Functions


Detailed Description

Definition at line 1681 of file pad.cpp.

Constructor & Destructor Documentation



Definition at line 1683 of file pad.cpp.

1684 {
1686 .Map( PAD_ATTRIB::PTH, _HKI( "Through-hole" ) )
1687 .Map( PAD_ATTRIB::SMD, _HKI( "SMD" ) )
1688 .Map( PAD_ATTRIB::CONN, _HKI( "Edge connector" ) )
1689 .Map( PAD_ATTRIB::NPTH, _HKI( "NPTH, mechanical" ) );
1692 .Map( PAD_SHAPE::CIRCLE, _HKI( "Circle" ) )
1693 .Map( PAD_SHAPE::RECT, _HKI( "Rectangle" ) )
1694 .Map( PAD_SHAPE::OVAL, _HKI( "Oval" ) )
1695 .Map( PAD_SHAPE::TRAPEZOID, _HKI( "Trapezoid" ) )
1696 .Map( PAD_SHAPE::ROUNDRECT, _HKI( "Rounded rectangle" ) )
1697 .Map( PAD_SHAPE::CHAMFERED_RECT, _HKI( "Chamfered rectangle" ) )
1698 .Map( PAD_SHAPE::CUSTOM, _HKI( "Custom" ) );
1701 .Map( PAD_PROP::NONE, _HKI( "None" ) )
1702 .Map( PAD_PROP::BGA, _HKI( "BGA pad" ) )
1703 .Map( PAD_PROP::FIDUCIAL_GLBL, _HKI( "Fiducial, global to board" ) )
1704 .Map( PAD_PROP::FIDUCIAL_LOCAL, _HKI( "Fiducial, local to footprint" ) )
1705 .Map( PAD_PROP::TESTPOINT, _HKI( "Test point pad" ) )
1706 .Map( PAD_PROP::HEATSINK, _HKI( "Heatsink pad" ) )
1707 .Map( PAD_PROP::CASTELLATED, _HKI( "Castellated pad" ) );
1713 auto padType = new PROPERTY_ENUM<PAD, PAD_ATTRIB>( _HKI( "Pad Type" ),
1715 propMgr.AddProperty( padType );
1717 auto shape = new PROPERTY_ENUM<PAD, PAD_SHAPE>( _HKI( "Shape" ),
1719 propMgr.AddProperty( shape );
1721 propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pad Number" ),
1723 propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pin Name" ),
1725 propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pin Type" ),
1727 propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Orientation" ),
1730 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size X" ),
1733 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size Y" ),
1736 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size X" ),
1739 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size Y" ),
1742 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Pad To Die Length" ),
1745 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Soldermask Margin Override" ),
1748 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Solderpaste Margin Override" ),
1751 propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Solderpaste Margin Ratio Override" ),
1753 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief Spoke Width" ),
1756 propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Thermal Relief Spoke Angle" ),
1759 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief Gap" ),
1762 propMgr.AddProperty( new PROPERTY_ENUM<PAD, PAD_PROP>( _HKI( "Fabrication Property" ),
1765 auto roundRadiusRatio = new PROPERTY<PAD, double>( _HKI( "Round Radius Ratio" ),
1767 roundRadiusRatio->SetAvailableFunc(
1768 [=]( INSPECTABLE* aItem ) -> bool
1769 {
1770 return aItem->Get( shape ) == static_cast<int>( PAD_SHAPE::ROUNDRECT );
1771 } );
1772 propMgr.AddProperty( roundRadiusRatio );
1774 propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Clearance Override" ),
1777 propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Parent" ),
1778 NO_SETTER( PAD, wxString ), &PAD::GetParentAsString ) );
1780 // TODO delta, drill shape offset, layer set, zone connection
1781 }
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
static ENUM_MAP< T > & Instance()
Definition: property.h:512
Class that other classes need to inherit from, in order to be inspectable.
Definition: inspectable.h:36
wxAny Get(PROPERTY_BASE *aProperty) const
Definition: inspectable.h:84
Definition: pad.h:58
void SetAttribute(PAD_ATTRIB aAttribute)
Definition: pad.cpp:653
PAD_PROP GetProperty() const
Definition: pad.h:397
void SetPinType(const wxString &aType)
Set the pad electrical type.
Definition: pad.h:150
int GetSizeX() const
Definition: pad.h:253
int GetDrillSizeY() const
Definition: pad.h:265
const wxString & GetPinType() const
Definition: pad.h:151
PAD_ATTRIB GetAttribute() const
Definition: pad.h:394
void SetLocalSolderPasteMargin(int aMargin)
Definition: pad.h:417
const wxString & GetPinFunction() const
Definition: pad.h:145
void SetThermalGap(int aGap)
Definition: pad.h:534
const wxString & GetNumber() const
Definition: pad.h:134
double GetLocalSolderPasteMarginRatio() const
Definition: pad.h:419
void SetProperty(PAD_PROP aProperty)
Definition: pad.cpp:664
void SetThermalSpokeAngleDegrees(double aAngle)
Definition: pad.h:525
double GetOrientationDegrees() const
Definition: pad.h:371
int GetDrillSizeX() const
Definition: pad.h:263
void SetLocalClearance(int aClearance)
Definition: pad.h:414
void SetNumber(const wxString &aNumber)
Set the pad number (note that it can be alphanumeric, such as the array reference "AA12").
Definition: pad.h:133
int GetLocalSolderMaskMargin() const
Definition: pad.h:409
void SetDrillSizeX(const int aX)
Definition: pad.h:262
int GetLocalClearance() const
Definition: pad.h:413
PAD_SHAPE GetShape() const
Definition: pad.h:188
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: pad.h:420
void SetShape(PAD_SHAPE aShape)
Set the new shape of this pad.
Definition: pad.h:179
int GetSizeY() const
Definition: pad.h:255
wxString GetParentAsString() const
Definition: pad.h:112
int GetThermalSpokeWidth() const
Definition: pad.h:512
void SetPinFunction(const wxString &aName)
Set the pad function (pin name in schematic)
Definition: pad.h:144
int GetLocalSolderPasteMargin() const
Definition: pad.h:416
void SetRoundRectRadiusRatio(double aRadiusScale)
Has meaning only for rounded rectangle pads.
Definition: pad.cpp:322
void SetLocalSolderMaskMargin(int aMargin)
Definition: pad.h:410
void SetSizeX(const int aX)
Definition: pad.h:252
void SetThermalSpokeWidth(int aWidth)
Set the width of the thermal spokes connecting the pad to a zone.
Definition: pad.h:511
void SetDrillSizeY(const int aY)
Definition: pad.h:264
double GetThermalSpokeAngleDegrees() const
Definition: pad.h:529
double GetRoundRectRadiusRatio() const
Definition: pad.h:556
int GetThermalGap() const
Definition: pad.h:535
void SetOrientationDegrees(double aOrientation)
Definition: pad.h:367
void SetPadToDieLength(int aLength)
Definition: pad.h:406
void SetSizeY(const int aY)
Definition: pad.h:254
int GetPadToDieLength() const
Definition: pad.h:407
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:63
void AddProperty(PROPERTY_BASE *aProperty)
Register a property.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:65
#define _HKI(x)
like PAD_PTH, but not plated
Smd pad, appears on the solder paste layer (default)
Plated through hole pad.
Like smd, does not appear on the solder paste layer (default)
a fiducial (usually a smd) local to the parent footprint
a fiducial (usually a smd) for the full board
a pad used as heat sink, usually in SMD footprints
no special fabrication property
a test point pad
a pad with a castellated through hole
Smd pad, used in BGA footprints.
#define TYPE_HASH(x)
Definition: property.h:60
#define NO_SETTER(owner, type)
Definition: property.h:623
Angle expressed in degrees.
Definition: property.h:55
Size expressed in distance units (mm/inch)
Definition: property.h:53
#define REGISTER_TYPE(x)
Definition: property_mgr.h:248

References _HKI, PROPERTY_MANAGER::AddProperty(), BGA, CASTELLATED, CHAMFERED_RECT, CIRCLE, CONN, CUSTOM, 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::GetThermalSpokeAngleDegrees(), PAD::GetThermalSpokeWidth(), HEATSINK, PROPERTY_MANAGER::InheritsAfter(), ENUM_MAP< T >::Instance(), PROPERTY_MANAGER::Instance(), NO_SETTER, NONE, NPTH, OVAL, PT_DEGREE, PT_SIZE, 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::SetThermalSpokeAngleDegrees(), PAD::SetThermalSpokeWidth(), SMD, TESTPOINT, TRAPEZOID, and TYPE_HASH.

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