KiCad PCB EDA Suite
FOOTPRINT_DESC Struct Reference

Public Member Functions


Detailed Description

Definition at line 2333 of file footprint.cpp.

Constructor & Destructor Documentation



Definition at line 2335 of file footprint.cpp.

2336  {
2339  if( layerEnum.Choices().GetCount() == 0 )
2340  {
2341  layerEnum.Undefined( UNDEFINED_LAYER );
2343  for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
2344  layerEnum.Map( *seq, LSET::Name( *seq ) );
2345  }
2347  wxPGChoices fpLayers; // footprints might be placed only on F.Cu & B.Cu
2348  fpLayers.Add( LSET::Name( F_Cu ), F_Cu );
2349  fpLayers.Add( LSET::Name( B_Cu ), B_Cu );
2358  auto layer = new PROPERTY_ENUM<FOOTPRINT, PCB_LAYER_ID, BOARD_ITEM>( _HKI( "Layer" ),
2360  layer->SetChoices( fpLayers );
2361  propMgr.ReplaceProperty( TYPE_HASH( BOARD_ITEM ), _HKI( "Layer" ), layer );
2363  propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Reference" ),
2365  propMgr.AddProperty( new PROPERTY<FOOTPRINT, wxString>( _HKI( "Value" ),
2367  propMgr.AddProperty( new PROPERTY<FOOTPRINT, double>( _HKI( "Orientation" ),
2370  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Clearance Override" ),
2373  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Solderpaste Margin Override" ),
2376  propMgr.AddProperty( new PROPERTY<FOOTPRINT,
2377  double>( _HKI( "Solderpaste Margin Ratio Override" ),
2380  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Width" ),
2384  propMgr.AddProperty( new PROPERTY<FOOTPRINT, int>( _HKI( "Thermal Relief Gap" ),
2388  // TODO zone connection, FPID?
2389  }
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:164
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:225
void SetOrientationDegrees(double aOrientation)
Definition: footprint.h:190
wxPGChoices & Choices()
Definition: property.h:559
void SetThermalGap(int aGap)
Definition: footprint.h:233
#define REGISTER_TYPE(x)
Definition: property_mgr.h:248
void SetThermalWidth(int aWidth)
Definition: footprint.h:230
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:210
void SetLocalClearance(int aClearance)
Definition: footprint.h:211
const wxString & GetReference() const
Definition: footprint.h:463
static LSET AllLayersMask()
Definition: lset.cpp:796
void SetValue(const wxString &aValue)
Definition: footprint.h:493
int GetThermalWidth() const
Definition: footprint.h:231
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:477
double GetOrientationDegrees() const
Definition: footprint.h:192
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:224
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:221
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:143
int GetThermalGap() const
Definition: footprint.h:234
void SetLocalSolderPasteMargin(int aMargin)
Definition: footprint.h:222

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: