KiCad PCB EDA Suite
FOOTPRINT_DESC Struct Reference

Public Member Functions

 FOOTPRINT_DESC ()
 

Detailed Description

Definition at line 2190 of file footprint.cpp.

Constructor & Destructor Documentation

◆ FOOTPRINT_DESC()

FOOTPRINT_DESC::FOOTPRINT_DESC ( )
inline

Definition at line 2192 of file footprint.cpp.

2193  {
2195 
2196  if( layerEnum.Choices().GetCount() == 0 )
2197  {
2198  layerEnum.Undefined( UNDEFINED_LAYER );
2199 
2200  for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
2201  layerEnum.Map( *seq, LSET::Name( *seq ) );
2202  }
2203 
2204  wxPGChoices fpLayers; // footprints might be placed only on F.Cu & B.Cu
2205  fpLayers.Add( LSET::Name( F_Cu ), F_Cu );
2206  fpLayers.Add( LSET::Name( B_Cu ), B_Cu );
2207 
2214 
2215  auto layer = new PROPERTY_ENUM<FOOTPRINT, PCB_LAYER_ID, BOARD_ITEM>( _HKI( "Layer" ),
2217  layer->SetChoices( fpLayers );
2218  propMgr.ReplaceProperty( TYPE_HASH( BOARD_ITEM ), _HKI( "Layer" ), layer );
2219 
2220  propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Reference" ),
2222  propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Value" ),
2224  propMgr.AddProperty( new PROPERTY<FOOTPRINT, double>( _HKI( "Orientation" ),
2227  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Clearance Override" ),
2230  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Solderpaste Margin Override" ),
2233  propMgr.AddProperty( new PROPERTY<FOOTPRINT,
2234  double>( _HKI( "Solderpaste Margin Ratio Override" ),
2237  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Width" ),
2241  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Gap" ),
2245  // TODO zone connection, FPID?
2246  }
void SetReference(const wxString &aReference)
Definition: footprint.h:472
Display value expressed in degrees.
Definition: property.h:54
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:65
#define TYPE_HASH(x)
Definition: property.h:59
const wxString & GetValue() const
Definition: footprint.h:485
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:161
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
ENUM_MAP & Undefined(T aValue)
Definition: property.h:523
static ENUM_MAP< T > & Instance()
Definition: property.h:510
void SetLocalSolderPasteMarginRatio(double aRatio)
Definition: footprint.h:224
void SetOrientationDegrees(double aOrientation)
Definition: footprint.h:189
wxPGChoices & Choices()
Definition: property.h:559
void SetThermalGap(int aGap)
Definition: footprint.h:232
#define REGISTER_TYPE(x)
Definition: property_mgr.h:248
void SetThermalWidth(int aWidth)
Definition: footprint.h:229
Display value expressed in distance units (mm/inch)
Definition: property.h:53
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
Definition: lset.cpp:82
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
int GetLocalClearance() const
Definition: footprint.h:209
void SetLocalClearance(int aClearance)
Definition: footprint.h:210
const wxString & GetReference() const
Definition: footprint.h:463
static LSET AllLayersMask()
Definition: lset.cpp:787
void SetValue(const wxString &aValue)
Definition: footprint.h:493
int GetThermalWidth() const
Definition: footprint.h:230
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:465
double GetOrientationDegrees() const
Definition: footprint.h:191
Definition: layer_ids.h:71
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
void AddProperty(PROPERTY_BASE *aProperty)
Register a property.
double GetLocalSolderPasteMarginRatio() const
Definition: footprint.h:223
void ReplaceProperty(size_t aBase, const wxString &aName, PROPERTY_BASE *aNew)
Replace an existing property for a specific type.
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:62
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int GetLocalSolderPasteMargin() const
Definition: footprint.h:220
ENUM_MAP & Map(T aValue, const wxString &aName)
Definition: property.h:516
#define _HKI(x)
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:140
int GetThermalGap() const
Definition: footprint.h:233
void SetLocalSolderPasteMargin(int aMargin)
Definition: footprint.h:221

References _HKI, PROPERTY_MANAGER::AddProperty(), PROPERTY_MANAGER::AddTypeCast(), LSET::AllLayersMask(), B_Cu, ENUM_MAP< T >::Choices(), DEGREE, DISTANCE, F_Cu, BOARD_ITEM::GetLayer(), FOOTPRINT::GetLocalClearance(), FOOTPRINT::GetLocalSolderPasteMargin(), FOOTPRINT::GetLocalSolderPasteMarginRatio(), FOOTPRINT::GetOrientationDegrees(), FOOTPRINT::GetReference(), FOOTPRINT::GetThermalGap(), FOOTPRINT::GetThermalWidth(), FOOTPRINT::GetValue(), PROPERTY_MANAGER::InheritsAfter(), PROPERTY_MANAGER::Instance(), ENUM_MAP< T >::Instance(), ENUM_MAP< T >::Map(), LSET::Name(), REGISTER_TYPE, PROPERTY_MANAGER::ReplaceProperty(), BOARD_ITEM::SetLayer(), FOOTPRINT::SetLocalClearance(), FOOTPRINT::SetLocalSolderPasteMargin(), FOOTPRINT::SetLocalSolderPasteMarginRatio(), FOOTPRINT::SetOrientationDegrees(), FOOTPRINT::SetReference(), FOOTPRINT::SetThermalGap(), FOOTPRINT::SetThermalWidth(), FOOTPRINT::SetValue(), TYPE_HASH, ENUM_MAP< T >::Undefined(), and UNDEFINED_LAYER.


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