KiCad PCB EDA Suite
PANEL_VIA_SIZE Class Reference

#include <panel_via_size.h>

Inheritance diagram for PANEL_VIA_SIZE:
PANEL_VIA_SIZE_BASE CALCULATOR_PANEL

Public Member Functions

 PANEL_VIA_SIZE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_VIA_SIZE ()
 
void LoadSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Load the settings into the panel. More...
 
void SaveSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Save the settings from the panel. More...
 
void ThemeChanged () override
 Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme. More...
 
void OnViaCalculate (wxCommandEvent &event) override
 Called when the user changes any value in the via calculator. More...
 
void OnViaEpsilonR_Button (wxCommandEvent &event) override
 Shows a list of current relative dielectric constant(Er) and select a value. More...
 
void OnViaRho_Button (wxCommandEvent &event) override
 Shows a list of current Specific resistance list (rho) and select a value. More...
 
void onUpdateViaCalcErrorText (wxUpdateUIEvent &event) override
 Update the Error message in via calculation panel. More...
 
void OnViaResetButtonClick (wxCommandEvent &event) override
 Called when the user clicks the reset button; sets the parameters to their default values. More...
 
void VSDisplayValues (double aViaResistance, double aVoltageDrop, double aPowerLoss, double aEstimatedAmpacity, double aThermalResistance, double aCapacitance, double aTimeDegradation, double aInductance, double aReactance)
 Display the results of the calculation. More...
 

Protected Attributes

wxStaticText * m_staticTextHoleDia
 
wxTextCtrl * m_textCtrlHoleDia
 
UNIT_SELECTOR_LENm_choiceHoleDia
 
wxStaticText * m_staticTextPlatingThickness
 
wxTextCtrl * m_textCtrlPlatingThickness
 
UNIT_SELECTOR_LENm_choicePlatingThickness
 
wxStaticText * m_staticTextViaLength
 
wxTextCtrl * m_textCtrlViaLength
 
UNIT_SELECTOR_LENm_choiceViaLength
 
wxStaticText * m_staticTextViaPadDia
 
wxTextCtrl * m_textCtrlViaPadDia
 
UNIT_SELECTOR_LENm_choiceViaPadDia
 
wxStaticText * m_staticTextClearanceDia
 
wxTextCtrl * m_textCtrlClearanceDia
 
UNIT_SELECTOR_LENm_choiceClearanceDia
 
wxStaticText * m_staticTextImpedance
 
wxTextCtrl * m_textCtrlImpedance
 
UNIT_SELECTOR_RESISTORm_choiceImpedance
 
wxStaticText * m_staticAppliedCurrent
 
wxTextCtrl * m_textCtrlAppliedCurrent
 
wxStaticText * m_staticTextAppliedCurrentUnits
 
wxStaticText * m_staticTextResistivity
 
wxTextCtrl * m_textCtrlPlatingResistivity
 
wxButton * m_button_ResistivityVia
 
wxStaticText * m_viaResistivityUnits
 
wxStaticText * m_staticTextPermittivity
 
wxTextCtrl * m_textCtrlPlatingPermittivity
 
wxButton * m_button_Permittivity
 
wxStaticText * m_staticTextTemperatureDiff
 
wxTextCtrl * m_textCtrlTemperatureDiff
 
wxStaticText * m_viaTempUnits
 
wxStaticText * m_staticTextRiseTime
 
wxTextCtrl * m_textCtrlRiseTime
 
wxStaticText * m_staticTextRiseTimeUnits
 
wxStaticText * m_staticTextWarning
 
wxStaticText * m_staticTextArea11
 
wxStaticText * m_ViaResistance
 
wxStaticText * m_viaResUnits
 
wxStaticText * m_staticText65111
 
wxStaticText * m_ViaVoltageDrop
 
wxStaticText * m_staticText8411
 
wxStaticText * m_staticText66111
 
wxStaticText * m_ViaPowerLoss
 
wxStaticText * m_staticText8311
 
wxStaticText * m_staticText79211
 
wxStaticText * m_ViaThermalResistance
 
wxStaticText * m_viaThermalResUnits
 
wxStaticText * m_staticTextAmpacity
 
wxStaticText * m_ViaAmpacity
 
wxStaticText * m_staticTextAmpacityUnits
 
wxStaticText * m_staticTextCapacitance
 
wxStaticText * m_ViaCapacitance
 
wxStaticText * m_staticTextCapacitanceUnits
 
wxStaticText * m_staticTextRiseTimeOutput
 
wxStaticText * m_RiseTimeOutput
 
wxStaticText * m_staticTextRiseTimeOutputUnits
 
wxStaticText * m_staticTextInductance
 
wxStaticText * m_Inductance
 
wxStaticText * m_staticTextInductanceUnits
 
wxStaticText * m_staticTextReactance
 
wxStaticText * m_Reactance
 
wxStaticText * m_viaReactanceUnits
 
wxStaticBitmap * m_viaBitmap
 
wxButton * m_buttonViaReset
 

Detailed Description

Definition at line 28 of file panel_via_size.h.

Constructor & Destructor Documentation

◆ PANEL_VIA_SIZE()

PANEL_VIA_SIZE::PANEL_VIA_SIZE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 58 of file panel_via_size.cpp.

60 :
61 PANEL_VIA_SIZE_BASE( parent, id, pos, size, style, name )
62{
63 m_viaResistivityUnits->SetLabel( wxT( "Ω⋅m" ) );
64 m_viaTempUnits->SetLabel( wxT( "°C" ) );
65 m_viaResUnits->SetLabel( wxT( "Ω" ) );
66 m_viaThermalResUnits->SetLabel( wxT( "°C/W" ) );
67 m_viaReactanceUnits->SetLabel( wxT( "Ω" ) );
68
69 m_viaBitmap->SetBitmap( KiBitmap( BITMAPS::viacalc ) );
70
71 // Needed on wxWidgets 3.0 to ensure sizers are correctly set
72 GetSizer()->SetSizeHints( this );
73}
const char * name
Definition: DXF_plotter.cpp:56
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:106
PANEL_VIA_SIZE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxStaticText * m_viaResUnits
wxStaticText * m_viaReactanceUnits
wxStaticBitmap * m_viaBitmap
wxStaticText * m_viaResistivityUnits
wxStaticText * m_viaTempUnits
wxStaticText * m_viaThermalResUnits

References KiBitmap(), PANEL_VIA_SIZE_BASE::m_viaBitmap, PANEL_VIA_SIZE_BASE::m_viaReactanceUnits, PANEL_VIA_SIZE_BASE::m_viaResistivityUnits, PANEL_VIA_SIZE_BASE::m_viaResUnits, PANEL_VIA_SIZE_BASE::m_viaTempUnits, PANEL_VIA_SIZE_BASE::m_viaThermalResUnits, and viacalc.

◆ ~PANEL_VIA_SIZE()

PANEL_VIA_SIZE::~PANEL_VIA_SIZE ( )

Definition at line 76 of file panel_via_size.cpp.

77{
78}

Member Function Documentation

◆ LoadSettings()

void PANEL_VIA_SIZE::LoadSettings ( PCB_CALCULATOR_SETTINGS aCfg)
overridevirtual

Load the settings into the panel.

Parameters
aCfgis the settings structure to load from

Implements CALCULATOR_PANEL.

Definition at line 152 of file panel_via_size.cpp.

153{
154 m_textCtrlHoleDia->SetValue( aCfg->m_ViaSize.hole_diameter );
155 m_choiceHoleDia->SetSelection( aCfg->m_ViaSize.hole_diameter_units );
156
159
160 m_textCtrlViaLength->SetValue( aCfg->m_ViaSize.length );
161 m_choiceViaLength->SetSelection( aCfg->m_ViaSize.length_units );
162
163 m_textCtrlViaPadDia->SetValue( aCfg->m_ViaSize.pad_diameter );
164 m_choiceViaPadDia->SetSelection( aCfg->m_ViaSize.pad_diameter_units );
165
168
171
177}
wxTextCtrl * m_textCtrlPlatingResistivity
wxTextCtrl * m_textCtrlClearanceDia
wxTextCtrl * m_textCtrlPlatingThickness
UNIT_SELECTOR_LEN * m_choiceClearanceDia
wxTextCtrl * m_textCtrlViaLength
wxTextCtrl * m_textCtrlAppliedCurrent
wxTextCtrl * m_textCtrlViaPadDia
wxTextCtrl * m_textCtrlRiseTime
wxTextCtrl * m_textCtrlHoleDia
wxTextCtrl * m_textCtrlImpedance
UNIT_SELECTOR_LEN * m_choiceViaPadDia
UNIT_SELECTOR_RESISTOR * m_choiceImpedance
wxTextCtrl * m_textCtrlTemperatureDiff
wxTextCtrl * m_textCtrlPlatingPermittivity
UNIT_SELECTOR_LEN * m_choiceViaLength
UNIT_SELECTOR_LEN * m_choiceHoleDia
UNIT_SELECTOR_LEN * m_choicePlatingThickness

References PCB_CALCULATOR_SETTINGS::VIA_SIZE::applied_current, PCB_CALCULATOR_SETTINGS::VIA_SIZE::characteristic_impedance, PCB_CALCULATOR_SETTINGS::VIA_SIZE::characteristic_impedance_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::clearance_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::clearance_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::hole_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::hole_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::length, PCB_CALCULATOR_SETTINGS::VIA_SIZE::length_units, PANEL_VIA_SIZE_BASE::m_choiceClearanceDia, PANEL_VIA_SIZE_BASE::m_choiceHoleDia, PANEL_VIA_SIZE_BASE::m_choiceImpedance, PANEL_VIA_SIZE_BASE::m_choicePlatingThickness, PANEL_VIA_SIZE_BASE::m_choiceViaLength, PANEL_VIA_SIZE_BASE::m_choiceViaPadDia, PANEL_VIA_SIZE_BASE::m_textCtrlAppliedCurrent, PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia, PANEL_VIA_SIZE_BASE::m_textCtrlHoleDia, PANEL_VIA_SIZE_BASE::m_textCtrlImpedance, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingThickness, PANEL_VIA_SIZE_BASE::m_textCtrlRiseTime, PANEL_VIA_SIZE_BASE::m_textCtrlTemperatureDiff, PANEL_VIA_SIZE_BASE::m_textCtrlViaLength, PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia, PCB_CALCULATOR_SETTINGS::m_ViaSize, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pad_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pad_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::permittivity, PCB_CALCULATOR_SETTINGS::VIA_SIZE::plating_resistivity, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pulse_rise_time, PCB_CALCULATOR_SETTINGS::VIA_SIZE::temp_rise, PCB_CALCULATOR_SETTINGS::VIA_SIZE::thickness, and PCB_CALCULATOR_SETTINGS::VIA_SIZE::thickness_units.

◆ onUpdateViaCalcErrorText()

void PANEL_VIA_SIZE::onUpdateViaCalcErrorText ( wxUpdateUIEvent &  event)
overridevirtual

Update the Error message in via calculation panel.

Reimplemented from PANEL_VIA_SIZE_BASE.

Definition at line 113 of file panel_via_size.cpp.

114{
115 // Update the Error message if a via has a external diameter
116 // bigger than the clearance area diameter
117 // (therefore the via is inside a copper zone and some parameters cannot be calculated)
118 double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
119 clearanceDia *= m_choiceClearanceDia->GetUnitScale();
120 double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
121 padDia *= m_choiceViaPadDia->GetUnitScale();
122
123 m_staticTextWarning->Show( clearanceDia <= padDia );
124}
wxStaticText * m_staticTextWarning
double GetUnitScale() override
Function GetUnitScale.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition: eda_angle.h:418
double DoubleFromString(const wxString &TextValue)

References std::abs(), DoubleFromString(), UNIT_SELECTOR_LEN::GetUnitScale(), PANEL_VIA_SIZE_BASE::m_choiceClearanceDia, PANEL_VIA_SIZE_BASE::m_choiceViaPadDia, PANEL_VIA_SIZE_BASE::m_staticTextWarning, PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia, and PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia.

◆ OnViaCalculate()

void PANEL_VIA_SIZE::OnViaCalculate ( wxCommandEvent &  event)
overridevirtual

Called when the user changes any value in the via calculator.

Reimplemented from PANEL_VIA_SIZE_BASE.

Definition at line 202 of file panel_via_size.cpp.

203{
204 // Load parameters
205 double finishedHoleDia = std::abs( DoubleFromString( m_textCtrlHoleDia->GetValue() ) );
206 double platingThickness = std::abs( DoubleFromString( m_textCtrlPlatingThickness->GetValue() ) );
207 double viaLength = std::abs( DoubleFromString( m_textCtrlViaLength->GetValue() ) );
208 double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
209 double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
210 double charImpedance = std::abs( DoubleFromString( m_textCtrlImpedance->GetValue() ) );
211 double appliedCurrent = std::abs( DoubleFromString( m_textCtrlAppliedCurrent->GetValue() ) );
212 double platingResistivity = std::abs( DoubleFromString( m_textCtrlPlatingResistivity->GetValue() ) );
213 double relativePermitivity = std::abs( DoubleFromString( m_textCtrlPlatingPermittivity->GetValue() ) );
214 double temperatureDiff = std::abs( DoubleFromString( m_textCtrlTemperatureDiff->GetValue() ) );
215 double pulseRiseTime = std::abs( DoubleFromString( m_textCtrlRiseTime->GetValue() ) );
216
217 // Normalize units
218 finishedHoleDia *= m_choiceHoleDia->GetUnitScale();
219 platingThickness *= m_choicePlatingThickness->GetUnitScale();
220 viaLength *= m_choiceViaLength->GetUnitScale();
221 padDia *= m_choiceViaPadDia->GetUnitScale();
222 clearanceDia *= m_choiceClearanceDia->GetUnitScale();
223 charImpedance *= m_choiceImpedance->GetUnitScale();
224 // platingResistivity is ok: it is in Ohm*m in tables
225
226 // Calculate cross-sectional area of the via's cylindrical structure [3]
227 double area = M_PI * ( finishedHoleDia + platingThickness ) * platingThickness; // m^2
228
229 double viaResistance = platingResistivity * viaLength / area; // Ohms
230
231 // Using thermal resistivity value 2.49e-3 meter-Kelvin/Watt, equivalent to
232 // thermal conductivity of 401 Watt/(meter-Kelvin) [5][6]
233 const double thermalResistivity = 2.49e-3; // m K/W
234 double thermalResistance = thermalResistivity * viaLength / area; // deg C/W
235
236 double voltageDrop = appliedCurrent * viaResistance;
237
238 double powerLoss = appliedCurrent * voltageDrop;
239
240 // Estimate current carrying capacity of the via
241 // See comment #17 in [1] for a brief discussion on the formula
242 // This formula from IPC-2221 [4] is also used in the Track Width calculator
243 area /= pow( UNIT_MIL, 2 ); // m^2 to mil^2
244 const double k = 0.048;
245 const double b = 0.44;
246 const double c = 0.725;
247 double estimatedAmpacity = k * pow( temperatureDiff, b ) * pow( area, c );
248
249 // Equation 7.6 in [7]
250 double capacitance = 55.51 * relativePermitivity * viaLength * padDia;
251 capacitance /= clearanceDia - padDia;
252
253 // Equation 7.8 in [7]
254 double timeDegradation = 2.2 * capacitance * charImpedance / 2;
255
256 // Equation 7.9 in [7]
257 double inductance = 200 * viaLength;
258 inductance *= log( 4 * viaLength / finishedHoleDia ) + 1;
259
260 // Equation 7.11 in [7]
261 double reactance = M_PI * inductance / pulseRiseTime;
262
263 // Update the display
264 VSDisplayValues( viaResistance, voltageDrop, powerLoss, estimatedAmpacity,
265 thermalResistance, capacitance, timeDegradation, inductance, reactance );
266}
void VSDisplayValues(double aViaResistance, double aVoltageDrop, double aPowerLoss, double aEstimatedAmpacity, double aThermalResistance, double aCapacitance, double aTimeDegradation, double aInductance, double aReactance)
Display the results of the calculation.
double GetUnitScale() override
Function GetUnitScale.
#define UNIT_MIL
Definition: units_scales.h:37

References std::abs(), DoubleFromString(), UNIT_SELECTOR_LEN::GetUnitScale(), UNIT_SELECTOR_RESISTOR::GetUnitScale(), PANEL_VIA_SIZE_BASE::m_choiceClearanceDia, PANEL_VIA_SIZE_BASE::m_choiceHoleDia, PANEL_VIA_SIZE_BASE::m_choiceImpedance, PANEL_VIA_SIZE_BASE::m_choicePlatingThickness, PANEL_VIA_SIZE_BASE::m_choiceViaLength, PANEL_VIA_SIZE_BASE::m_choiceViaPadDia, PANEL_VIA_SIZE_BASE::m_textCtrlAppliedCurrent, PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia, PANEL_VIA_SIZE_BASE::m_textCtrlHoleDia, PANEL_VIA_SIZE_BASE::m_textCtrlImpedance, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingThickness, PANEL_VIA_SIZE_BASE::m_textCtrlRiseTime, PANEL_VIA_SIZE_BASE::m_textCtrlTemperatureDiff, PANEL_VIA_SIZE_BASE::m_textCtrlViaLength, PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia, UNIT_MIL, and VSDisplayValues().

◆ OnViaEpsilonR_Button()

void PANEL_VIA_SIZE::OnViaEpsilonR_Button ( wxCommandEvent &  event)
overridevirtual

Shows a list of current relative dielectric constant(Er) and select a value.

Reimplemented from PANEL_VIA_SIZE_BASE.

Definition at line 87 of file panel_via_size.cpp.

88{
89 //Shows a list of current relative dielectric constant(Er) and select a value.
90 wxArrayString list = StandardRelativeDielectricConstantList();
91
92 wxString value = wxGetSingleChoice( wxEmptyString, _( "Relative Dielectric Constants" ), list )
93 .BeforeFirst( ' ' );
94
95 if( !value.IsEmpty() )
96 m_textCtrlPlatingPermittivity->SetValue( value );
97}
wxArrayString StandardRelativeDielectricConstantList()
Definition: common_data.cpp:28
#define _(s)

References _, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity, and StandardRelativeDielectricConstantList().

◆ OnViaResetButtonClick()

void PANEL_VIA_SIZE::OnViaResetButtonClick ( wxCommandEvent &  event)
overridevirtual

Called when the user clicks the reset button; sets the parameters to their default values.

Reimplemented from PANEL_VIA_SIZE_BASE.

Definition at line 127 of file panel_via_size.cpp.

128{
129 #define DEFAULT_UNIT_SEL_MM 0
130 #define DEFAULT_UNIT_SEL_OHM 0
131
132 m_textCtrlHoleDia->SetValue( wxString::Format( "%g", 0.4 ) );
133 m_choiceHoleDia->SetSelection( DEFAULT_UNIT_SEL_MM );
134 m_textCtrlPlatingThickness->SetValue( wxString::Format( "%g", 0.035 ) );
136 m_textCtrlViaLength->SetValue( wxString::Format( "%g", 1.6 ) );
137 m_choiceViaLength->SetSelection( DEFAULT_UNIT_SEL_MM );
138 m_textCtrlViaPadDia->SetValue( wxString::Format( "%g", 0.6 ) );
139 m_choiceViaPadDia->SetSelection( DEFAULT_UNIT_SEL_MM );
140 m_textCtrlClearanceDia->SetValue( wxString::Format( "%g", 1.0 ) );
142 m_textCtrlImpedance->SetValue( wxString::Format( "%g", 50.0 ) );
144 m_textCtrlAppliedCurrent->SetValue( wxString::Format( "%g", 1.0 ) );
145 m_textCtrlPlatingResistivity->SetValue( wxString::Format( "%g", 1.72e-8 ) );
146 m_textCtrlPlatingPermittivity->SetValue( wxString::Format( "%g", 4.5 ) );
147 m_textCtrlTemperatureDiff->SetValue( wxString::Format( "%g", 10.0 ) );
148 m_textCtrlRiseTime->SetValue( wxString::Format( "%g", 1.0 ) );
149}
#define DEFAULT_UNIT_SEL_OHM
#define DEFAULT_UNIT_SEL_MM
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References DEFAULT_UNIT_SEL_MM, DEFAULT_UNIT_SEL_OHM, Format(), PANEL_VIA_SIZE_BASE::m_choiceClearanceDia, PANEL_VIA_SIZE_BASE::m_choiceHoleDia, PANEL_VIA_SIZE_BASE::m_choiceImpedance, PANEL_VIA_SIZE_BASE::m_choicePlatingThickness, PANEL_VIA_SIZE_BASE::m_choiceViaLength, PANEL_VIA_SIZE_BASE::m_choiceViaPadDia, PANEL_VIA_SIZE_BASE::m_textCtrlAppliedCurrent, PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia, PANEL_VIA_SIZE_BASE::m_textCtrlHoleDia, PANEL_VIA_SIZE_BASE::m_textCtrlImpedance, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingThickness, PANEL_VIA_SIZE_BASE::m_textCtrlRiseTime, PANEL_VIA_SIZE_BASE::m_textCtrlTemperatureDiff, PANEL_VIA_SIZE_BASE::m_textCtrlViaLength, and PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia.

◆ OnViaRho_Button()

void PANEL_VIA_SIZE::OnViaRho_Button ( wxCommandEvent &  event)
overridevirtual

Shows a list of current Specific resistance list (rho) and select a value.

Reimplemented from PANEL_VIA_SIZE_BASE.

Definition at line 100 of file panel_via_size.cpp.

101{
102 wxArrayString list = StandardResistivityList();
103
104 // Shows a list of current Specific resistance list (rho) and select a value
105 wxString value = wxGetSingleChoice( wxEmptyString, _( "Electrical Resistivity in Ohm*m" ),
106 list ).BeforeFirst( ' ' );
107
108 if( !value.IsEmpty() )
109 m_textCtrlPlatingResistivity->SetValue( value );
110}
wxArrayString StandardResistivityList()
Definition: common_data.cpp:84

References _, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity, and StandardResistivityList().

◆ SaveSettings()

void PANEL_VIA_SIZE::SaveSettings ( PCB_CALCULATOR_SETTINGS aCfg)
overridevirtual

Save the settings from the panel.

Parameters
aCfgis the settings structure to save to

Implements CALCULATOR_PANEL.

Definition at line 180 of file panel_via_size.cpp.

References PCB_CALCULATOR_SETTINGS::VIA_SIZE::applied_current, PCB_CALCULATOR_SETTINGS::VIA_SIZE::characteristic_impedance, PCB_CALCULATOR_SETTINGS::VIA_SIZE::characteristic_impedance_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::clearance_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::clearance_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::hole_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::hole_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::length, PCB_CALCULATOR_SETTINGS::VIA_SIZE::length_units, PANEL_VIA_SIZE_BASE::m_choiceClearanceDia, PANEL_VIA_SIZE_BASE::m_choiceHoleDia, PANEL_VIA_SIZE_BASE::m_choiceImpedance, PANEL_VIA_SIZE_BASE::m_choicePlatingThickness, PANEL_VIA_SIZE_BASE::m_choiceViaLength, PANEL_VIA_SIZE_BASE::m_choiceViaPadDia, PANEL_VIA_SIZE_BASE::m_textCtrlAppliedCurrent, PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia, PANEL_VIA_SIZE_BASE::m_textCtrlHoleDia, PANEL_VIA_SIZE_BASE::m_textCtrlImpedance, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity, PANEL_VIA_SIZE_BASE::m_textCtrlPlatingThickness, PANEL_VIA_SIZE_BASE::m_textCtrlRiseTime, PANEL_VIA_SIZE_BASE::m_textCtrlTemperatureDiff, PANEL_VIA_SIZE_BASE::m_textCtrlViaLength, PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia, PCB_CALCULATOR_SETTINGS::m_ViaSize, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pad_diameter, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pad_diameter_units, PCB_CALCULATOR_SETTINGS::VIA_SIZE::permittivity, PCB_CALCULATOR_SETTINGS::VIA_SIZE::plating_resistivity, PCB_CALCULATOR_SETTINGS::VIA_SIZE::pulse_rise_time, PCB_CALCULATOR_SETTINGS::VIA_SIZE::temp_rise, PCB_CALCULATOR_SETTINGS::VIA_SIZE::thickness, and PCB_CALCULATOR_SETTINGS::VIA_SIZE::thickness_units.

◆ ThemeChanged()

void PANEL_VIA_SIZE::ThemeChanged ( )
overridevirtual

Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.

Implements CALCULATOR_PANEL.

Definition at line 81 of file panel_via_size.cpp.

82{
83 m_viaBitmap->SetBitmap( KiBitmap( BITMAPS::viacalc ) );
84}

References KiBitmap(), PANEL_VIA_SIZE_BASE::m_viaBitmap, and viacalc.

◆ VSDisplayValues()

void PANEL_VIA_SIZE::VSDisplayValues ( double  aViaResistance,
double  aVoltageDrop,
double  aPowerLoss,
double  aEstimatedAmpacity,
double  aThermalResistance,
double  aCapacitance,
double  aTimeDegradation,
double  aInductance,
double  aReactance 
)

Display the results of the calculation.

Definition at line 268 of file panel_via_size.cpp.

272{
273 wxString msg;
274
275 msg.Printf( "%g", aViaResistance );
276 m_ViaResistance->SetLabel( msg );
277
278 msg.Printf( "%g", aVoltageDrop );
279 m_ViaVoltageDrop->SetLabel( msg );
280
281 msg.Printf( "%g", aPowerLoss );
282 m_ViaPowerLoss->SetLabel( msg );
283
284 msg.Printf( "%g", aEstimatedAmpacity );
285 m_ViaAmpacity->SetLabel( msg );
286
287 msg.Printf( "%g", aThermalResistance );
288 m_ViaThermalResistance->SetLabel( msg );
289
290 msg.Printf( "%g", aCapacitance );
291 m_ViaCapacitance->SetLabel( msg );
292
293 msg.Printf( "%g", aTimeDegradation );
294 m_RiseTimeOutput->SetLabel( msg );
295
296 msg.Printf( "%g", aInductance );
297 m_Inductance->SetLabel( msg );
298
299 msg.Printf( "%g", aReactance );
300 m_Reactance->SetLabel( msg );
301}
wxStaticText * m_RiseTimeOutput
wxStaticText * m_ViaThermalResistance
wxStaticText * m_ViaAmpacity
wxStaticText * m_ViaCapacitance
wxStaticText * m_ViaResistance
wxStaticText * m_Inductance
wxStaticText * m_ViaVoltageDrop
wxStaticText * m_Reactance
wxStaticText * m_ViaPowerLoss

References PANEL_VIA_SIZE_BASE::m_Inductance, PANEL_VIA_SIZE_BASE::m_Reactance, PANEL_VIA_SIZE_BASE::m_RiseTimeOutput, PANEL_VIA_SIZE_BASE::m_ViaAmpacity, PANEL_VIA_SIZE_BASE::m_ViaCapacitance, PANEL_VIA_SIZE_BASE::m_ViaPowerLoss, PANEL_VIA_SIZE_BASE::m_ViaResistance, PANEL_VIA_SIZE_BASE::m_ViaThermalResistance, and PANEL_VIA_SIZE_BASE::m_ViaVoltageDrop.

Referenced by OnViaCalculate().

Member Data Documentation

◆ m_button_Permittivity

wxButton* PANEL_VIA_SIZE_BASE::m_button_Permittivity
protectedinherited

◆ m_button_ResistivityVia

wxButton* PANEL_VIA_SIZE_BASE::m_button_ResistivityVia
protectedinherited

◆ m_buttonViaReset

wxButton* PANEL_VIA_SIZE_BASE::m_buttonViaReset
protectedinherited

◆ m_choiceClearanceDia

◆ m_choiceHoleDia

◆ m_choiceImpedance

◆ m_choicePlatingThickness

UNIT_SELECTOR_LEN* PANEL_VIA_SIZE_BASE::m_choicePlatingThickness
protectedinherited

◆ m_choiceViaLength

◆ m_choiceViaPadDia

◆ m_Inductance

wxStaticText* PANEL_VIA_SIZE_BASE::m_Inductance
protectedinherited

◆ m_Reactance

wxStaticText* PANEL_VIA_SIZE_BASE::m_Reactance
protectedinherited

◆ m_RiseTimeOutput

wxStaticText* PANEL_VIA_SIZE_BASE::m_RiseTimeOutput
protectedinherited

◆ m_staticAppliedCurrent

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticAppliedCurrent
protectedinherited

Definition at line 63 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticText65111

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticText65111
protectedinherited

Definition at line 83 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticText66111

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticText66111
protectedinherited

Definition at line 86 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticText79211

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticText79211
protectedinherited

Definition at line 89 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticText8311

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticText8311
protectedinherited

Definition at line 88 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticText8411

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticText8411
protectedinherited

Definition at line 85 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextAmpacity

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextAmpacity
protectedinherited

Definition at line 92 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextAmpacityUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextAmpacityUnits
protectedinherited

Definition at line 94 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextAppliedCurrentUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextAppliedCurrentUnits
protectedinherited

Definition at line 65 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextArea11

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextArea11
protectedinherited

Definition at line 80 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextCapacitance

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextCapacitance
protectedinherited

Definition at line 95 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextCapacitanceUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextCapacitanceUnits
protectedinherited

Definition at line 97 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextClearanceDia

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextClearanceDia
protectedinherited

Definition at line 57 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextHoleDia

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextHoleDia
protectedinherited

Definition at line 45 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextImpedance

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextImpedance
protectedinherited

Definition at line 60 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextInductance

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextInductance
protectedinherited

Definition at line 101 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextInductanceUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextInductanceUnits
protectedinherited

Definition at line 103 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextPermittivity

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextPermittivity
protectedinherited

Definition at line 70 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextPlatingThickness

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextPlatingThickness
protectedinherited

Definition at line 48 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextReactance

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextReactance
protectedinherited

Definition at line 104 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextResistivity

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextResistivity
protectedinherited

Definition at line 66 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextRiseTime

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextRiseTime
protectedinherited

Definition at line 76 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextRiseTimeOutput

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextRiseTimeOutput
protectedinherited

Definition at line 98 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextRiseTimeOutputUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextRiseTimeOutputUnits
protectedinherited

Definition at line 100 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextRiseTimeUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextRiseTimeUnits
protectedinherited

Definition at line 78 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextTemperatureDiff

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextTemperatureDiff
protectedinherited

Definition at line 73 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextViaLength

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextViaLength
protectedinherited

Definition at line 51 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextViaPadDia

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextViaPadDia
protectedinherited

Definition at line 54 of file panel_via_size_base.h.

Referenced by PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE().

◆ m_staticTextWarning

wxStaticText* PANEL_VIA_SIZE_BASE::m_staticTextWarning
protectedinherited

◆ m_textCtrlAppliedCurrent

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlAppliedCurrent
protectedinherited

◆ m_textCtrlClearanceDia

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlClearanceDia
protectedinherited

◆ m_textCtrlHoleDia

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlHoleDia
protectedinherited

◆ m_textCtrlImpedance

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlImpedance
protectedinherited

◆ m_textCtrlPlatingPermittivity

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlPlatingPermittivity
protectedinherited

◆ m_textCtrlPlatingResistivity

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlPlatingResistivity
protectedinherited

◆ m_textCtrlPlatingThickness

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlPlatingThickness
protectedinherited

◆ m_textCtrlRiseTime

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlRiseTime
protectedinherited

◆ m_textCtrlTemperatureDiff

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlTemperatureDiff
protectedinherited

◆ m_textCtrlViaLength

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlViaLength
protectedinherited

◆ m_textCtrlViaPadDia

wxTextCtrl* PANEL_VIA_SIZE_BASE::m_textCtrlViaPadDia
protectedinherited

◆ m_ViaAmpacity

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaAmpacity
protectedinherited

◆ m_viaBitmap

wxStaticBitmap* PANEL_VIA_SIZE_BASE::m_viaBitmap
protectedinherited

◆ m_ViaCapacitance

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaCapacitance
protectedinherited

◆ m_ViaPowerLoss

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaPowerLoss
protectedinherited

◆ m_viaReactanceUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_viaReactanceUnits
protectedinherited

◆ m_ViaResistance

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaResistance
protectedinherited

◆ m_viaResistivityUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_viaResistivityUnits
protectedinherited

◆ m_viaResUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_viaResUnits
protectedinherited

◆ m_viaTempUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_viaTempUnits
protectedinherited

◆ m_ViaThermalResistance

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaThermalResistance
protectedinherited

◆ m_viaThermalResUnits

wxStaticText* PANEL_VIA_SIZE_BASE::m_viaThermalResUnits
protectedinherited

◆ m_ViaVoltageDrop

wxStaticText* PANEL_VIA_SIZE_BASE::m_ViaVoltageDrop
protectedinherited

The documentation for this class was generated from the following files: