Enum class PAD_PROP_T
Renamed such that it does not affect python
This commit is contained in:
parent
03cf2b517f
commit
3a9a85b373
|
@ -92,15 +92,15 @@ enum class PAD_ATTRIB
|
|||
* Ghe set of pad properties used in Gerber files (Draw files, and P&P files)
|
||||
* to define some properties in fabrication or test files.
|
||||
*/
|
||||
enum PAD_PROP_T
|
||||
enum class PAD_PROP
|
||||
{
|
||||
PAD_PROP_NONE, ///< no special fabrication property
|
||||
PAD_PROP_BGA, ///< Smd pad, used in BGA footprints
|
||||
PAD_PROP_FIDUCIAL_GLBL, ///< a fiducial (usually a smd) for the full board
|
||||
PAD_PROP_FIDUCIAL_LOCAL, ///< a fiducial (usually a smd) local to the parent footprint
|
||||
PAD_PROP_TESTPOINT, ///< a test point pad
|
||||
PAD_PROP_HEATSINK, ///< a pad used as heat sink, usually in SMD footprints
|
||||
PAD_PROP_CASTELLATED ///< a pad with a castellated through hole
|
||||
NONE, ///< no special fabrication property
|
||||
BGA, ///< Smd pad, used in BGA footprints
|
||||
FIDUCIAL_GLBL, ///< a fiducial (usually a smd) for the full board
|
||||
FIDUCIAL_LOCAL, ///< a fiducial (usually a smd) local to the parent footprint
|
||||
TESTPOINT, ///< a test point pad
|
||||
HEATSINK, ///< a pad used as heat sink, usually in SMD footprints
|
||||
CASTELLATED ///< a pad with a castellated through hole
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -629,13 +629,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
|
||||
switch( m_dummyPad->GetProperty() )
|
||||
{
|
||||
case PAD_PROP_NONE: m_choiceFabProperty->SetSelection( 0 ); break;
|
||||
case PAD_PROP_BGA: m_choiceFabProperty->SetSelection( 1 ); break;
|
||||
case PAD_PROP_FIDUCIAL_LOCAL: m_choiceFabProperty->SetSelection( 2 ); break;
|
||||
case PAD_PROP_FIDUCIAL_GLBL: m_choiceFabProperty->SetSelection( 3 ); break;
|
||||
case PAD_PROP_TESTPOINT: m_choiceFabProperty->SetSelection( 4 ); break;
|
||||
case PAD_PROP_HEATSINK: m_choiceFabProperty->SetSelection( 5 ); break;
|
||||
case PAD_PROP_CASTELLATED: m_choiceFabProperty->SetSelection( 6 ); break;
|
||||
case PAD_PROP::NONE: m_choiceFabProperty->SetSelection( 0 ); break;
|
||||
case PAD_PROP::BGA: m_choiceFabProperty->SetSelection( 1 ); break;
|
||||
case PAD_PROP::FIDUCIAL_LOCAL: m_choiceFabProperty->SetSelection( 2 ); break;
|
||||
case PAD_PROP::FIDUCIAL_GLBL: m_choiceFabProperty->SetSelection( 3 ); break;
|
||||
case PAD_PROP::TESTPOINT: m_choiceFabProperty->SetSelection( 4 ); break;
|
||||
case PAD_PROP::HEATSINK: m_choiceFabProperty->SetSelection( 5 ); break;
|
||||
case PAD_PROP::CASTELLATED: m_choiceFabProperty->SetSelection( 6 ); break;
|
||||
}
|
||||
|
||||
// Ensure the pad property is compatible with the pad type
|
||||
|
@ -1341,32 +1341,32 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
|||
break;
|
||||
}
|
||||
|
||||
if( ( m_dummyPad->GetProperty() == PAD_PROP_FIDUCIAL_GLBL ||
|
||||
m_dummyPad->GetProperty() == PAD_PROP_FIDUCIAL_LOCAL ) &&
|
||||
if( ( m_dummyPad->GetProperty() == PAD_PROP::FIDUCIAL_GLBL ||
|
||||
m_dummyPad->GetProperty() == PAD_PROP::FIDUCIAL_LOCAL ) &&
|
||||
m_dummyPad->GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
{
|
||||
warning_msgs.Add( _( "Warning: Fiducial property makes no sense on NPTH pads." ) );
|
||||
}
|
||||
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP_TESTPOINT &&
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP::TESTPOINT &&
|
||||
m_dummyPad->GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
{
|
||||
warning_msgs.Add( _( "Warning: Testpoint property makes no sense on NPTH pads." ) );
|
||||
}
|
||||
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP_HEATSINK &&
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP::HEATSINK &&
|
||||
m_dummyPad->GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
{
|
||||
warning_msgs.Add( _( "Warning: Heatsink property makes no sense of NPTH pads." ) );
|
||||
}
|
||||
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP_CASTELLATED &&
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP::CASTELLATED &&
|
||||
m_dummyPad->GetAttribute() != PAD_ATTRIB::PTH )
|
||||
{
|
||||
warning_msgs.Add( _( "Warning: Castellated property is for PTH pads." ) );
|
||||
}
|
||||
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP_BGA &&
|
||||
if( m_dummyPad->GetProperty() == PAD_PROP::BGA &&
|
||||
m_dummyPad->GetAttribute() != PAD_ATTRIB::SMD )
|
||||
{
|
||||
warning_msgs.Add( _( "Warning: BGA property is for SMD pads." ) );
|
||||
|
@ -1642,19 +1642,19 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
PAD_PROP_T DIALOG_PAD_PROPERTIES::getSelectedProperty()
|
||||
PAD_PROP DIALOG_PAD_PROPERTIES::getSelectedProperty()
|
||||
{
|
||||
PAD_PROP_T prop = PAD_PROP_NONE;
|
||||
PAD_PROP prop = PAD_PROP::NONE;
|
||||
|
||||
switch( m_choiceFabProperty->GetSelection() )
|
||||
{
|
||||
case 0: prop = PAD_PROP_NONE; break;
|
||||
case 1: prop = PAD_PROP_BGA; break;
|
||||
case 2: prop = PAD_PROP_FIDUCIAL_LOCAL; break;
|
||||
case 3: prop = PAD_PROP_FIDUCIAL_GLBL; break;
|
||||
case 4: prop = PAD_PROP_TESTPOINT; break;
|
||||
case 5: prop = PAD_PROP_HEATSINK; break;
|
||||
case 6: prop = PAD_PROP_CASTELLATED; break;
|
||||
case 0: prop = PAD_PROP::NONE; break;
|
||||
case 1: prop = PAD_PROP::BGA; break;
|
||||
case 2: prop = PAD_PROP::FIDUCIAL_LOCAL; break;
|
||||
case 3: prop = PAD_PROP::FIDUCIAL_GLBL; break;
|
||||
case 4: prop = PAD_PROP::TESTPOINT; break;
|
||||
case 5: prop = PAD_PROP::HEATSINK; break;
|
||||
case 6: prop = PAD_PROP::CASTELLATED; break;
|
||||
}
|
||||
|
||||
return prop;
|
||||
|
|
|
@ -164,7 +164,7 @@ private:
|
|||
void OnPrimitiveSelection( wxListEvent& event ) override;
|
||||
|
||||
/// Return the pad property currently selected
|
||||
PAD_PROP_T getSelectedProperty();
|
||||
PAD_PROP getSelectedProperty();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -198,7 +198,7 @@ int GERBER_WRITER::createDrillFile( wxString& aFullFilename, bool aIsNpth,
|
|||
last_item_is_via = false;
|
||||
const PAD* pad = dyn_cast<const PAD*>( hole_descr.m_ItemParent );
|
||||
|
||||
if( pad->GetProperty() == PAD_PROP_CASTELLATED )
|
||||
if( pad->GetProperty() == PAD_PROP::CASTELLATED )
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CASTELLATEDDRILL );
|
||||
else
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ PAD::PAD( FOOTPRINT* parent ) :
|
|||
// is PAD_CIRCLE.
|
||||
SetDrillShape( PAD_DRILL_SHAPE_CIRCLE ); // Default pad drill shape is a circle.
|
||||
m_attribute = PAD_ATTRIB::PTH; // Default pad type is plated through hole
|
||||
SetProperty( PAD_PROP_NONE ); // no special fabrication property
|
||||
SetProperty( PAD_PROP::NONE ); // no special fabrication property
|
||||
m_localClearance = 0;
|
||||
m_localSolderMaskMargin = 0;
|
||||
m_localSolderPasteMargin = 0;
|
||||
|
@ -218,7 +218,7 @@ bool PAD::FlashLayer( int aLayer ) const
|
|||
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
||||
|
||||
/// Heatsink pads always get copper
|
||||
if( GetProperty() == PAD_PROP_HEATSINK )
|
||||
if( GetProperty() == PAD_PROP::HEATSINK )
|
||||
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
||||
|
||||
if( !m_removeUnconnectedLayer )
|
||||
|
@ -567,7 +567,7 @@ void PAD::SetAttribute( PAD_ATTRIB aAttribute )
|
|||
}
|
||||
|
||||
|
||||
void PAD::SetProperty( PAD_PROP_T aProperty )
|
||||
void PAD::SetProperty( PAD_PROP aProperty )
|
||||
{
|
||||
m_property = aProperty;
|
||||
|
||||
|
@ -877,18 +877,18 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||
// Show the pad shape, attribute and property
|
||||
wxString props = ShowPadAttr();
|
||||
|
||||
if( GetProperty() != PAD_PROP_NONE )
|
||||
if( GetProperty() != PAD_PROP::NONE )
|
||||
props += ',';
|
||||
|
||||
switch( GetProperty() )
|
||||
{
|
||||
case PAD_PROP_NONE: break;
|
||||
case PAD_PROP_BGA: props += _("BGA" ); break;
|
||||
case PAD_PROP_FIDUCIAL_GLBL: props += _("Fiducial global" ); break;
|
||||
case PAD_PROP_FIDUCIAL_LOCAL: props += _("Fiducial local" ); break;
|
||||
case PAD_PROP_TESTPOINT: props += _("Test point" ); break;
|
||||
case PAD_PROP_HEATSINK: props += _("Heat sink" ); break;
|
||||
case PAD_PROP_CASTELLATED: props += _("Castellated" ); break;
|
||||
case PAD_PROP::NONE: break;
|
||||
case PAD_PROP::BGA: props += _("BGA" ); break;
|
||||
case PAD_PROP::FIDUCIAL_GLBL: props += _("Fiducial global" ); break;
|
||||
case PAD_PROP::FIDUCIAL_LOCAL: props += _("Fiducial local" ); break;
|
||||
case PAD_PROP::TESTPOINT: props += _("Test point" ); break;
|
||||
case PAD_PROP::HEATSINK: props += _("Heat sink" ); break;
|
||||
case PAD_PROP::CASTELLATED: props += _("Castellated" ); break;
|
||||
}
|
||||
|
||||
aList.emplace_back( ShowPadShape(), props );
|
||||
|
@ -1448,14 +1448,14 @@ static struct PAD_DESC
|
|||
.Map( PAD_SHAPE::CHAMFERED_RECT, _HKI( "Chamfered rectangle" ) )
|
||||
.Map( PAD_SHAPE::CUSTOM, _HKI( "Custom" ) );
|
||||
|
||||
ENUM_MAP<PAD_PROP_T>::Instance()
|
||||
.Map( PAD_PROP_NONE, _HKI( "None" ) )
|
||||
.Map( PAD_PROP_BGA, _HKI( "BGA pad" ) )
|
||||
.Map( PAD_PROP_FIDUCIAL_GLBL, _HKI( "Fiducial, global to board" ) )
|
||||
.Map( PAD_PROP_FIDUCIAL_LOCAL, _HKI( "Fiducial, local to footprint" ) )
|
||||
.Map( PAD_PROP_TESTPOINT, _HKI( "Test point pad" ) )
|
||||
.Map( PAD_PROP_HEATSINK, _HKI( "Heatsink pad" ) )
|
||||
.Map( PAD_PROP_CASTELLATED, _HKI( "Castellated pad" ) );
|
||||
ENUM_MAP<PAD_PROP>::Instance()
|
||||
.Map( PAD_PROP::NONE, _HKI( "None" ) )
|
||||
.Map( PAD_PROP::BGA, _HKI( "BGA pad" ) )
|
||||
.Map( PAD_PROP::FIDUCIAL_GLBL, _HKI( "Fiducial, global to board" ) )
|
||||
.Map( PAD_PROP::FIDUCIAL_LOCAL, _HKI( "Fiducial, local to footprint" ) )
|
||||
.Map( PAD_PROP::TESTPOINT, _HKI( "Test point pad" ) )
|
||||
.Map( PAD_PROP::HEATSINK, _HKI( "Heatsink pad" ) )
|
||||
.Map( PAD_PROP::CASTELLATED, _HKI( "Castellated pad" ) );
|
||||
|
||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||
REGISTER_TYPE( PAD );
|
||||
|
@ -1507,7 +1507,7 @@ static struct PAD_DESC
|
|||
propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief" ),
|
||||
&PAD::SetThermalGap, &PAD::GetThermalGap,
|
||||
PROPERTY_DISPLAY::DISTANCE ) );
|
||||
propMgr.AddProperty( new PROPERTY_ENUM<PAD, PAD_PROP_T>( _HKI( "Fabrication Property" ),
|
||||
propMgr.AddProperty( new PROPERTY_ENUM<PAD, PAD_PROP>( _HKI( "Fabrication Property" ),
|
||||
&PAD::SetProperty, &PAD::GetProperty ) );
|
||||
|
||||
auto roundRadiusRatio = new PROPERTY<PAD, double>( _HKI( "Round Radius Ratio" ),
|
||||
|
@ -1531,4 +1531,4 @@ static struct PAD_DESC
|
|||
|
||||
ENUM_TO_WXANY( PAD_ATTRIB );
|
||||
ENUM_TO_WXANY( PAD_SHAPE );
|
||||
ENUM_TO_WXANY( PAD_PROP_T );
|
||||
ENUM_TO_WXANY( PAD_PROP );
|
||||
|
|
|
@ -370,8 +370,8 @@ public:
|
|||
void SetAttribute( PAD_ATTRIB aAttribute );
|
||||
PAD_ATTRIB GetAttribute() const { return m_attribute; }
|
||||
|
||||
void SetProperty( PAD_PROP_T aProperty );
|
||||
PAD_PROP_T GetProperty() const { return m_property; }
|
||||
void SetProperty( PAD_PROP aProperty );
|
||||
PAD_PROP GetProperty() const { return m_property; }
|
||||
|
||||
// We don't currently have an attribute for APERTURE, and adding one will change the file
|
||||
// format, so for now just infer a copper-less pad to be an APERTURE pad.
|
||||
|
@ -746,7 +746,7 @@ private:
|
|||
|
||||
PAD_ATTRIB m_attribute; // PAD_ATTRIB_NORMAL, PAD_ATTRIB::SMD, PAD_ATTRIB::CONN,
|
||||
// PAD_ATTRIB::NPTH
|
||||
PAD_PROP_T m_property; // Property in fab files (BGA, FIDUCIAL, TESTPOINT, etc.)
|
||||
PAD_PROP m_property; // Property in fab files (BGA, FIDUCIAL, TESTPOINT, etc.)
|
||||
|
||||
double m_orient; // in 1/10 degrees
|
||||
|
||||
|
|
|
@ -170,33 +170,33 @@ void BRDITEMS_PLOTTER::PlotPad( const PAD* aPad, COLOR4D aColor, OUTLINE_MODE aP
|
|||
// that replace previous aperture attribute:
|
||||
switch( aPad->GetProperty() )
|
||||
{
|
||||
case PAD_PROP_BGA: // Only applicable to outer layers
|
||||
case PAD_PROP::BGA: // Only applicable to outer layers
|
||||
if( plotOnExternalCopperLayer )
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_BGAPAD_CUDEF );
|
||||
break;
|
||||
|
||||
case PAD_PROP_FIDUCIAL_GLBL:
|
||||
case PAD_PROP::FIDUCIAL_GLBL:
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_GLBL );
|
||||
break;
|
||||
|
||||
case PAD_PROP_FIDUCIAL_LOCAL:
|
||||
case PAD_PROP::FIDUCIAL_LOCAL:
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_LOCAL );
|
||||
break;
|
||||
|
||||
case PAD_PROP_TESTPOINT: // Only applicable to outer layers
|
||||
case PAD_PROP::TESTPOINT: // Only applicable to outer layers
|
||||
if( plotOnExternalCopperLayer )
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_TESTPOINT );
|
||||
break;
|
||||
|
||||
case PAD_PROP_HEATSINK:
|
||||
case PAD_PROP::HEATSINK:
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_HEATSINKPAD );
|
||||
break;
|
||||
|
||||
case PAD_PROP_CASTELLATED:
|
||||
case PAD_PROP::CASTELLATED:
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CASTELLATEDPAD );
|
||||
break;
|
||||
|
||||
case PAD_PROP_NONE:
|
||||
case PAD_PROP::NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1336,13 +1336,13 @@ void PCB_IO::format( const PAD* aPad, int aNestLevel ) const
|
|||
|
||||
switch( aPad->GetProperty() )
|
||||
{
|
||||
case PAD_PROP_NONE: break; // could be "none"
|
||||
case PAD_PROP_BGA: property = "pad_prop_bga"; break;
|
||||
case PAD_PROP_FIDUCIAL_GLBL: property = "pad_prop_fiducial_glob"; break;
|
||||
case PAD_PROP_FIDUCIAL_LOCAL: property = "pad_prop_fiducial_loc"; break;
|
||||
case PAD_PROP_TESTPOINT: property = "pad_prop_testpoint"; break;
|
||||
case PAD_PROP_HEATSINK: property = "pad_prop_heatsink"; break;
|
||||
case PAD_PROP_CASTELLATED: property = "pad_prop_castellated"; break;
|
||||
case PAD_PROP::NONE: break; // could be "none"
|
||||
case PAD_PROP::BGA: property = "PAD_PROP::BGA"; break;
|
||||
case PAD_PROP::FIDUCIAL_GLBL: property = "pad_prop_fiducial_glob"; break;
|
||||
case PAD_PROP::FIDUCIAL_LOCAL: property = "pad_prop_fiducial_loc"; break;
|
||||
case PAD_PROP::TESTPOINT: property = "PAD_PROP::TESTPOINT"; break;
|
||||
case PAD_PROP::HEATSINK: property = "PAD_PROP::HEATSINK"; break;
|
||||
case PAD_PROP::CASTELLATED: property = "PAD_PROP::CASTELLATED"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( "unknown pad property: %d", aPad->GetProperty() ) );
|
||||
|
|
|
@ -4051,31 +4051,31 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
|||
switch( token )
|
||||
{
|
||||
case T_pad_prop_bga:
|
||||
pad->SetProperty( PAD_PROP_BGA );
|
||||
pad->SetProperty( PAD_PROP::BGA );
|
||||
break;
|
||||
|
||||
case T_pad_prop_fiducial_glob:
|
||||
pad->SetProperty( PAD_PROP_FIDUCIAL_GLBL );
|
||||
pad->SetProperty( PAD_PROP::FIDUCIAL_GLBL );
|
||||
break;
|
||||
|
||||
case T_pad_prop_fiducial_loc:
|
||||
pad->SetProperty( PAD_PROP_FIDUCIAL_LOCAL );
|
||||
pad->SetProperty( PAD_PROP::FIDUCIAL_LOCAL );
|
||||
break;
|
||||
|
||||
case T_pad_prop_testpoint:
|
||||
pad->SetProperty( PAD_PROP_TESTPOINT );
|
||||
pad->SetProperty( PAD_PROP::TESTPOINT );
|
||||
break;
|
||||
|
||||
case T_pad_prop_castellated:
|
||||
pad->SetProperty( PAD_PROP_CASTELLATED );
|
||||
pad->SetProperty( PAD_PROP::CASTELLATED );
|
||||
break;
|
||||
|
||||
case T_pad_prop_heatsink:
|
||||
pad->SetProperty( PAD_PROP_HEATSINK );
|
||||
pad->SetProperty( PAD_PROP::HEATSINK );
|
||||
break;
|
||||
|
||||
case T_none:
|
||||
pad->SetProperty( PAD_PROP_NONE );
|
||||
pad->SetProperty( PAD_PROP::NONE );
|
||||
break;
|
||||
|
||||
case T_RIGHT:
|
||||
|
|
Loading…
Reference in New Issue