diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 94d86784b5..de31b167af 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -20,7 +20,7 @@ set( PCB_CALCULATOR_SRCS panel_regulator.cpp panel_color_code.cpp tracks_width_versus_current.cpp - via.cpp + panel_via_size.cpp transline_ident.cpp widgets/unit_selector.cpp transline/transline.cpp @@ -39,6 +39,7 @@ set( PCB_CALCULATOR_SRCS dialogs/panel_attenuators_base.cpp dialogs/panel_regulator_base.cpp dialogs/panel_color_code_base.cpp + dialogs/panel_via_size_base.cpp ../common/env_vars.cpp # needed on MSW to avoid a link issue (a symbol not found) ) diff --git a/pcb_calculator/dialogs/panel_via_size.h b/pcb_calculator/dialogs/panel_via_size.h new file mode 100644 index 0000000000..e65b186ba2 --- /dev/null +++ b/pcb_calculator/dialogs/panel_via_size.h @@ -0,0 +1,78 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef PANEL_VIA_SIZE_H +#define PANEL_VIA_SIZE_H + +#include "panel_via_size_base.h" + +class PCB_CALCULATOR_SETTINGS; + + +class PANEL_VIA_SIZE : public PANEL_VIA_SIZE_BASE +{ +public: + 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 ); + /** + * Write via size parameters in configuration. + */ + void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ); + + /** + * Called when the user changes any value in the via calculator. + */ + void OnViaCalculate( wxCommandEvent& event ) override; + + /** + * Shows a list of current relative dielectric constant(Er) and select a value + */ + void OnViaEpsilonR_Button( wxCommandEvent& event ) override; + + /** + * Shows a list of current Specific resistance list (rho) and select a value + */ + void OnViaRho_Button( wxCommandEvent& event ) override; + + /** + * Update the Error message in via calculation panel. + */ + void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) override; + + /** + * Called when the user clicks the reset button; sets the parameters to their default values. + */ + void OnViaResetButtonClick( wxCommandEvent& event ) override; + + /** + * Display the results of the calculation. + */ + void VSDisplayValues( double aViaResistance, double aVoltageDrop, double aPowerLoss, + double aEstimatedAmpacity, double aThermalResistance, + double aCapacitance, double aTimeDegradation, double aInductance, + double aReactance ); +private: +}; + +#endif \ No newline at end of file diff --git a/pcb_calculator/dialogs/panel_via_size_base.cpp b/pcb_calculator/dialogs/panel_via_size_base.cpp new file mode 100644 index 0000000000..9d07387134 --- /dev/null +++ b/pcb_calculator/dialogs/panel_via_size_base.cpp @@ -0,0 +1,419 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Oct 26 2018) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "widgets/unit_selector.h" + +#include "panel_via_size_base.h" + +/////////////////////////////////////////////////////////////////////////// + +PANEL_VIA_SIZE_BASE::PANEL_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) +{ + wxBoxSizer* bSizerViaSize; + bSizerViaSize = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizerViaLeftColumn; + bSizerViaLeftColumn = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerVS_Inputs; + sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Parameters") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizerVS_Inputs; + fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 4, 0 ); + fgSizerVS_Inputs->AddGrowableCol( 1 ); + fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH ); + fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextHoleDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Finished hole diameter (D):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHoleDia->Wrap( -1 ); + m_staticTextHoleDia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + + fgSizerVS_Inputs->Add( m_staticTextHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlHoleDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choiceHoleDiaChoices; + m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 ); + m_choiceHoleDia->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choiceHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating thickness (T):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPlatingThickness->Wrap( -1 ); + fgSizerVS_Inputs->Add( m_staticTextPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlPlatingThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choicePlatingThicknessChoices; + m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 ); + m_choicePlatingThickness->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choicePlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextViaLength->Wrap( -1 ); + m_staticTextViaLength->SetToolTip( _("Via length is the board thickness for through hole vias") ); + + fgSizerVS_Inputs->Add( m_staticTextViaLength, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlViaLength = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choiceViaLengthChoices; + m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 ); + m_choiceViaLength->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choiceViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextViaPadDia->Wrap( -1 ); + m_staticTextViaPadDia->SetToolTip( _("Diameter of pad surrounding via (annular ring)") ); + + fgSizerVS_Inputs->Add( m_staticTextViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlViaPadDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choiceViaPadDiaChoices; + m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 ); + m_choiceViaPadDia->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choiceViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextClearanceDia->Wrap( -1 ); + m_staticTextClearanceDia->SetToolTip( _("Diameter of clearance hole in ground plane(s)") ); + + fgSizerVS_Inputs->Add( m_staticTextClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlClearanceDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choiceClearanceDiaChoices; + m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 ); + m_choiceClearanceDia->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choiceClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextImpedance->Wrap( -1 ); + m_staticTextImpedance->SetToolTip( _("Characteristic impedance of conductor") ); + + fgSizerVS_Inputs->Add( m_staticTextImpedance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlImpedance = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_choiceImpedanceChoices; + m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 ); + m_choiceImpedance->SetSelection( 0 ); + fgSizerVS_Inputs->Add( m_choiceImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticAppliedCurrent->Wrap( -1 ); + fgSizerVS_Inputs->Add( m_staticAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlAppliedCurrent = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAppliedCurrentUnits->Wrap( -1 ); + fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextResistivity->Wrap( -1 ); + m_staticTextResistivity->SetToolTip( _("Specific resistance in ohms * meters") ); + + fgSizerVS_Inputs->Add( m_staticTextResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizerResistivity; + bSizerResistivity = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlPlatingResistivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerResistivity->Add( m_textCtrlPlatingResistivity, 1, wxEXPAND|wxLEFT, 5 ); + + m_button_ResistivityVia = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizerResistivity->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + + fgSizerVS_Inputs->Add( bSizerResistivity, 1, wxEXPAND, 5 ); + + m_viaResistivityUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); + m_viaResistivityUnits->Wrap( -1 ); + fgSizerVS_Inputs->Add( m_viaResistivityUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Substrate relative permittivity:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPermittivity->Wrap( -1 ); + m_staticTextPermittivity->SetToolTip( _("Relative dielectric constant (epsilon r)") ); + + fgSizerVS_Inputs->Add( m_staticTextPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizerPermittivity; + bSizerPermittivity = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlPlatingPermittivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerPermittivity->Add( m_textCtrlPlatingPermittivity, 1, wxEXPAND|wxLEFT, 5 ); + + m_button_Permittivity = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizerPermittivity->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + + fgSizerVS_Inputs->Add( bSizerPermittivity, 1, wxEXPAND, 5 ); + + + fgSizerVS_Inputs->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTemperatureDiff->Wrap( -1 ); + m_staticTextTemperatureDiff->SetToolTip( _("Maximum acceptable rise in temperature") ); + + fgSizerVS_Inputs->Add( m_staticTextTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlTemperatureDiff = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_viaTempUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); + m_viaTempUnits->Wrap( -1 ); + fgSizerVS_Inputs->Add( m_viaTempUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRiseTime->Wrap( -1 ); + m_staticTextRiseTime->SetToolTip( _("Pulse rise time to calculate reactance") ); + + fgSizerVS_Inputs->Add( m_staticTextRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_textCtrlRiseTime = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerVS_Inputs->Add( m_textCtrlRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRiseTimeUnits->Wrap( -1 ); + m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") ); + + fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + + sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 ); + + + bSizerViaLeftColumn->Add( sbSizerVS_Inputs, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_staticTextWarning = new wxStaticText( this, wxID_ANY, _("Warning:\nVia pad diameter >= Clearance hole diameter.\nSome parameters cannot be calculated for a via inside a copper zone."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextWarning->Wrap( -1 ); + m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + bSizerViaLeftColumn->Add( m_staticTextWarning, 0, wxALL|wxEXPAND, 10 ); + + + bSizerViaSize->Add( bSizerViaLeftColumn, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerRight; + bSizerRight = new wxBoxSizer( wxVERTICAL ); + + bSizerRight->SetMinSize( wxSize( -1,460 ) ); + wxStaticBoxSizer* sbSizerVS_Result; + sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Results") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizerTW_Results11; + fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 3, 0 ); + fgSizerTW_Results11->AddGrowableCol( 1 ); + fgSizerTW_Results11->AddGrowableCol( 2 ); + fgSizerTW_Results11->SetFlexibleDirection( wxBOTH ); + fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextArea11 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextArea11->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticTextArea11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_ViaResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaResistance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_viaResUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_viaResUnits->Wrap( -1 ); + fgSizerTW_Results11->Add( m_viaResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticText65111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText65111->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticText65111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_ViaVoltageDrop = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaVoltageDrop->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaVoltageDrop, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticText8411 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8411->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticText8411, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticText66111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText66111->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticText66111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_ViaPowerLoss = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaPowerLoss->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaPowerLoss, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticText8311 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("W"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8311->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticText8311, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticText79211 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Thermal resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText79211->Wrap( -1 ); + m_staticText79211->SetToolTip( _("Using thermal conductivity value 401 Watts/(meter-Kelvin)") ); + + fgSizerTW_Results11->Add( m_staticText79211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_ViaThermalResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaThermalResistance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_viaThermalResUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/W"), wxDefaultPosition, wxDefaultSize, 0 ); + m_viaThermalResUnits->Wrap( -1 ); + fgSizerTW_Results11->Add( m_viaThermalResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Estimated ampacity:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAmpacity->Wrap( -1 ); + m_staticTextAmpacity->SetToolTip( _("Based on temperature rise") ); + + fgSizerTW_Results11->Add( m_staticTextAmpacity, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_ViaAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaAmpacity->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticTextAmpacityUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAmpacityUnits->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticTextAmpacityUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Capacitance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCapacitance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticTextCapacitance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_ViaCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ViaCapacitance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_ViaCapacitance, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticTextCapacitanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("pF"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCapacitanceUnits->Wrap( -1 ); + m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") ); + + fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxRIGHT, 5 ); + + m_staticTextRiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Rise time degradation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRiseTimeOutput->Wrap( -1 ); + m_staticTextRiseTimeOutput->SetToolTip( _("Rise time degradation for given Z0 and calculated capacitance") ); + + fgSizerTW_Results11->Add( m_staticTextRiseTimeOutput, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_RiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_RiseTimeOutput->Wrap( -1 ); + fgSizerTW_Results11->Add( m_RiseTimeOutput, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticTextRiseTimeOutputUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ps"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRiseTimeOutputUnits->Wrap( -1 ); + m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") ); + + fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxRIGHT, 5 ); + + m_staticTextInductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Inductance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInductance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_staticTextInductance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_Inductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Inductance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_Inductance, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticTextInductanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("nH"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInductanceUnits->Wrap( -1 ); + m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") ); + + fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxRIGHT, 5 ); + + m_staticTextReactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Reactance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextReactance->Wrap( -1 ); + m_staticTextReactance->SetToolTip( _("Inductive reactance for given rise time and calculated inductance") ); + + fgSizerTW_Results11->Add( m_staticTextReactance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + + m_Reactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Reactance->Wrap( -1 ); + fgSizerTW_Results11->Add( m_Reactance, 0, wxRIGHT|wxLEFT, 5 ); + + m_viaReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_viaReactanceUnits->Wrap( -1 ); + fgSizerTW_Results11->Add( m_viaReactanceUnits, 0, wxRIGHT, 5 ); + + + sbSizerVS_Result->Add( fgSizerTW_Results11, 0, wxEXPAND, 5 ); + + + bSizerRight->Add( sbSizerVS_Result, 0, wxEXPAND|wxALL, 5 ); + + m_viaBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_viaBitmap->SetToolTip( _("Top view of via") ); + + bSizerRight->Add( m_viaBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 10 ); + + + bSizerRight->Add( 0, 0, 1, 0, 5 ); + + m_buttonViaReset = new wxButton( this, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerRight->Add( m_buttonViaReset, 0, wxALIGN_RIGHT|wxALL, 5 ); + + + bSizerViaSize->Add( bSizerRight, 0, wxEXPAND, 5 ); + + + this->SetSizer( bSizerViaSize ); + this->Layout(); + + // Connect Events + m_textCtrlHoleDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceHoleDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlPlatingThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choicePlatingThickness->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlViaLength->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceViaLength->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlViaPadDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceViaPadDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlClearanceDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceClearanceDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlImpedance->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceImpedance->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlAppliedCurrent->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlPlatingResistivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_button_ResistivityVia->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaRho_Button ), NULL, this ); + m_textCtrlPlatingPermittivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_button_Permittivity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaEpsilonR_Button ), NULL, this ); + m_textCtrlTemperatureDiff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlRiseTime->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_staticTextWarning->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_VIA_SIZE_BASE::onUpdateViaCalcErrorText ), NULL, this ); + m_buttonViaReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaResetButtonClick ), NULL, this ); +} + +PANEL_VIA_SIZE_BASE::~PANEL_VIA_SIZE_BASE() +{ + // Disconnect Events + m_textCtrlHoleDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceHoleDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlPlatingThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choicePlatingThickness->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlViaLength->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceViaLength->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlViaPadDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceViaPadDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlClearanceDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceClearanceDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlImpedance->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_choiceImpedance->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlAppliedCurrent->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlPlatingResistivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_button_ResistivityVia->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaRho_Button ), NULL, this ); + m_textCtrlPlatingPermittivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_button_Permittivity->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaEpsilonR_Button ), NULL, this ); + m_textCtrlTemperatureDiff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_textCtrlRiseTime->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaCalculate ), NULL, this ); + m_staticTextWarning->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_VIA_SIZE_BASE::onUpdateViaCalcErrorText ), NULL, this ); + m_buttonViaReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_VIA_SIZE_BASE::OnViaResetButtonClick ), NULL, this ); + +} diff --git a/pcb_calculator/dialogs/panel_via_size_base.fbp b/pcb_calculator/dialogs/panel_via_size_base.fbp new file mode 100644 index 0000000000..12d3a00198 --- /dev/null +++ b/pcb_calculator/dialogs/panel_via_size_base.fbp @@ -0,0 +1,4194 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + panel_via_size_base + 1000 + none + + 1 + panel_via_size_base + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 1 + impl_virtual + + + 0 + wxID_ANY + + + PANEL_VIA_SIZE_BASE + + 554,417 + ; ; forward_declare + + + + wxTAB_TRAVERSAL + + + bSizerViaSize + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizerViaLeftColumn + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Parameters + + sbSizerVS_Inputs + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 0 + + 3 + wxBOTH + 1 + + 0 + + fgSizerVS_Inputs + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 4 + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,70,0 + 0 + 0 + wxID_ANY + Finished hole diameter (D): + 0 + + 0 + + + 0 + + 1 + m_staticTextHoleDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlHoleDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceHoleDia + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_LEN; widgets/unit_selector.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plating thickness (T): + 0 + + 0 + + + 0 + + 1 + m_staticTextPlatingThickness + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlPlatingThickness + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choicePlatingThickness + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Via length: + 0 + + 0 + + + 0 + + 1 + m_staticTextViaLength + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Via length is the board thickness for through hole vias + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlViaLength + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceViaLength + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Via pad diameter: + 0 + + 0 + + + 0 + + 1 + m_staticTextViaPadDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Diameter of pad surrounding via (annular ring) + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlViaPadDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceViaPadDia + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clearance hole diameter: + 0 + + 0 + + + 0 + + 1 + m_staticTextClearanceDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Diameter of clearance hole in ground plane(s) + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlClearanceDia + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceClearanceDia + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Z0: + 0 + + 0 + + + 0 + + 1 + m_staticTextImpedance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Characteristic impedance of conductor + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlImpedance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceImpedance + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Applied current: + 0 + + 0 + + + 0 + + 1 + m_staticAppliedCurrent + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlAppliedCurrent + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + A + 0 + + 0 + + + 0 + + 1 + m_staticTextAppliedCurrentUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plating resistivity: + 0 + + 0 + + + 0 + + 1 + m_staticTextResistivity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Specific resistance in ohms * meters + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizerResistivity + wxHORIZONTAL + none + + 5 + wxEXPAND|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlPlatingResistivity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + ... + + 0 + + 0 + + + 0 + + 1 + m_button_ResistivityVia + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaRho_Button + + + + + + 5 + wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ohm-meter + 0 + + 0 + + + 0 + + 1 + m_viaResistivityUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Substrate relative permittivity: + 0 + + 0 + + + 0 + + 1 + m_staticTextPermittivity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Relative dielectric constant (epsilon r) + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizerPermittivity + wxHORIZONTAL + none + + 5 + wxEXPAND|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlPlatingPermittivity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + ... + + 0 + + 0 + + + 0 + + 1 + m_button_Permittivity + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaEpsilonR_Button + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Temperature rise: + 0 + + 0 + + + 0 + + 1 + m_staticTextTemperatureDiff + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Maximum acceptable rise in temperature + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlTemperatureDiff + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + deg C + 0 + + 0 + + + 0 + + 1 + m_viaTempUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pulse rise time: + 0 + + 0 + + + 0 + + 1 + m_staticTextRiseTime + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Pulse rise time to calculate reactance + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlRiseTime + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnViaCalculate + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ns + 0 + + 0 + + + 0 + + 1 + m_staticTextRiseTimeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + nanoseconds + + + + -1 + + + + + + + + 10 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Warning: Via pad diameter >= Clearance hole diameter. Some parameters cannot be calculated for a via inside a copper zone. + 0 + + 0 + + + 0 + + 1 + m_staticTextWarning + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + onUpdateViaCalcErrorText + + + + + + 5 + wxEXPAND + 0 + + -1,460 + bSizerRight + wxVERTICAL + none + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Results + + sbSizerVS_Result + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 0 + + 3 + wxBOTH + 1,2 + + 0 + + fgSizerTW_Results11 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 3 + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Resistance: + 0 + + 0 + + + 0 + + 1 + m_staticTextArea11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaResistance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ohm + 0 + + 0 + + + 0 + + 1 + m_viaResUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Voltage drop: + 0 + + 0 + + + 0 + + 1 + m_staticText65111 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaVoltageDrop + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + V + 0 + + 0 + + + 0 + + 1 + m_staticText8411 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Power loss: + 0 + + 0 + + + 0 + + 1 + m_staticText66111 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaPowerLoss + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + W + 0 + + 0 + + + 0 + + 1 + m_staticText8311 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Thermal resistance: + 0 + + 0 + + + 0 + + 1 + m_staticText79211 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Using thermal conductivity value 401 Watts/(meter-Kelvin) + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaThermalResistance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + deg C/W + 0 + + 0 + + + 0 + + 1 + m_viaThermalResUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Estimated ampacity: + 0 + + 0 + + + 0 + + 1 + m_staticTextAmpacity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Based on temperature rise + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaAmpacity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + A + 0 + + 0 + + + 0 + + 1 + m_staticTextAmpacityUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Capacitance: + 0 + + 0 + + + 0 + + 1 + m_staticTextCapacitance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_ViaCapacitance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + pF + 0 + + 0 + + + 0 + + 1 + m_staticTextCapacitanceUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + pico-Farad + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rise time degradation: + 0 + + 0 + + + 0 + + 1 + m_staticTextRiseTimeOutput + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Rise time degradation for given Z0 and calculated capacitance + + + + -1 + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_RiseTimeOutput + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ps + 0 + + 0 + + + 0 + + 1 + m_staticTextRiseTimeOutputUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + picoseconds + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inductance: + 0 + + 0 + + + 0 + + 1 + m_staticTextInductance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_Inductance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + nH + 0 + + 0 + + + 0 + + 1 + m_staticTextInductanceUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + nano-Henry + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Reactance: + 0 + + 0 + + + 0 + + 1 + m_staticTextReactance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Inductive reactance for given rise time and calculated inductance + + + + -1 + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + dummy + 0 + + 0 + + + 0 + + 1 + m_Reactance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + ohm + 0 + + 0 + + + 0 + + 1 + m_viaReactanceUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + 10 + wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_viaBitmap + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + Top view of via + + + + + + + 5 + + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Reset to Defaults + + 0 + + 0 + + + 0 + + 1 + m_buttonViaReset + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnViaResetButtonClick + + + + + + + + diff --git a/pcb_calculator/dialogs/panel_via_size_base.h b/pcb_calculator/dialogs/panel_via_size_base.h new file mode 100644 index 0000000000..9b389d690b --- /dev/null +++ b/pcb_calculator/dialogs/panel_via_size_base.h @@ -0,0 +1,123 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Oct 26 2018) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +class UNIT_SELECTOR_LEN; + +#include "widgets/unit_selector.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class PANEL_VIA_SIZE_BASE +/////////////////////////////////////////////////////////////////////////////// +class PANEL_VIA_SIZE_BASE : public wxPanel +{ + private: + + protected: + wxStaticText* m_staticTextHoleDia; + wxTextCtrl* m_textCtrlHoleDia; + UNIT_SELECTOR_LEN* m_choiceHoleDia; + wxStaticText* m_staticTextPlatingThickness; + wxTextCtrl* m_textCtrlPlatingThickness; + UNIT_SELECTOR_LEN* m_choicePlatingThickness; + wxStaticText* m_staticTextViaLength; + wxTextCtrl* m_textCtrlViaLength; + UNIT_SELECTOR_LEN* m_choiceViaLength; + wxStaticText* m_staticTextViaPadDia; + wxTextCtrl* m_textCtrlViaPadDia; + UNIT_SELECTOR_LEN* m_choiceViaPadDia; + wxStaticText* m_staticTextClearanceDia; + wxTextCtrl* m_textCtrlClearanceDia; + UNIT_SELECTOR_LEN* m_choiceClearanceDia; + wxStaticText* m_staticTextImpedance; + wxTextCtrl* m_textCtrlImpedance; + UNIT_SELECTOR_RESISTOR* m_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; + + // Virtual event handlers, overide them in your derived class + virtual void OnViaCalculate( wxCommandEvent& event ) { event.Skip(); } + virtual void OnViaRho_Button( wxCommandEvent& event ) { event.Skip(); } + virtual void OnViaEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); } + virtual void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void OnViaResetButtonClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + PANEL_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 554,417 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + ~PANEL_VIA_SIZE_BASE(); + +}; + diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index e7e695f4e3..3bca2e7817 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -674,361 +674,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_panelTransline->Layout(); bSizeTransline->Fit( m_panelTransline ); m_Notebook->AddPage( m_panelTransline, _("TransLine"), false ); - m_panelViaSize = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizerViaSize; - bSizerViaSize = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizerViaLeftColumn; - bSizerViaLeftColumn = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizerVS_Inputs; - sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Parameters") ), wxVERTICAL ); - - wxFlexGridSizer* fgSizerVS_Inputs; - fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 4, 0 ); - fgSizerVS_Inputs->AddGrowableCol( 1 ); - fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH ); - fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextHoleDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Finished hole diameter (D):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHoleDia->Wrap( -1 ); - m_staticTextHoleDia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - - fgSizerVS_Inputs->Add( m_staticTextHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlHoleDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceHoleDiaChoices; - m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 ); - m_choiceHoleDia->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choiceHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating thickness (T):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPlatingThickness->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_staticTextPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlPlatingThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choicePlatingThicknessChoices; - m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 ); - m_choicePlatingThickness->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choicePlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextViaLength->Wrap( -1 ); - m_staticTextViaLength->SetToolTip( _("Via length is the board thickness for through hole vias") ); - - fgSizerVS_Inputs->Add( m_staticTextViaLength, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlViaLength = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceViaLengthChoices; - m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 ); - m_choiceViaLength->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choiceViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextViaPadDia->Wrap( -1 ); - m_staticTextViaPadDia->SetToolTip( _("Diameter of pad surrounding via (annular ring)") ); - - fgSizerVS_Inputs->Add( m_staticTextViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlViaPadDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceViaPadDiaChoices; - m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 ); - m_choiceViaPadDia->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choiceViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextClearanceDia->Wrap( -1 ); - m_staticTextClearanceDia->SetToolTip( _("Diameter of clearance hole in ground plane(s)") ); - - fgSizerVS_Inputs->Add( m_staticTextClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlClearanceDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceClearanceDiaChoices; - m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 ); - m_choiceClearanceDia->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choiceClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextImpedance->Wrap( -1 ); - m_staticTextImpedance->SetToolTip( _("Characteristic impedance of conductor") ); - - fgSizerVS_Inputs->Add( m_staticTextImpedance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlImpedance = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceImpedanceChoices; - m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 ); - m_choiceImpedance->SetSelection( 0 ); - fgSizerVS_Inputs->Add( m_choiceImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticAppliedCurrent->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_staticAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlAppliedCurrent = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAppliedCurrentUnits->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextResistivity->Wrap( -1 ); - m_staticTextResistivity->SetToolTip( _("Specific resistance in ohms * meters") ); - - fgSizerVS_Inputs->Add( m_staticTextResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizerResistivity; - bSizerResistivity = new wxBoxSizer( wxHORIZONTAL ); - - m_textCtrlPlatingResistivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerResistivity->Add( m_textCtrlPlatingResistivity, 1, wxEXPAND|wxLEFT, 5 ); - - m_button_ResistivityVia = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - bSizerResistivity->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - - fgSizerVS_Inputs->Add( bSizerResistivity, 1, wxEXPAND, 5 ); - - m_viaResistivityUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); - m_viaResistivityUnits->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_viaResistivityUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Substrate relative permittivity:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPermittivity->Wrap( -1 ); - m_staticTextPermittivity->SetToolTip( _("Relative dielectric constant (epsilon r)") ); - - fgSizerVS_Inputs->Add( m_staticTextPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizerPermittivity; - bSizerPermittivity = new wxBoxSizer( wxHORIZONTAL ); - - m_textCtrlPlatingPermittivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerPermittivity->Add( m_textCtrlPlatingPermittivity, 1, wxEXPAND|wxLEFT, 5 ); - - m_button_Permittivity = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - bSizerPermittivity->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - - fgSizerVS_Inputs->Add( bSizerPermittivity, 1, wxEXPAND, 5 ); - - - fgSizerVS_Inputs->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTemperatureDiff->Wrap( -1 ); - m_staticTextTemperatureDiff->SetToolTip( _("Maximum acceptable rise in temperature") ); - - fgSizerVS_Inputs->Add( m_staticTextTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlTemperatureDiff = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_viaTempUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); - m_viaTempUnits->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_viaTempUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRiseTime->Wrap( -1 ); - m_staticTextRiseTime->SetToolTip( _("Pulse rise time to calculate reactance") ); - - fgSizerVS_Inputs->Add( m_staticTextRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_textCtrlRiseTime = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerVS_Inputs->Add( m_textCtrlRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRiseTimeUnits->Wrap( -1 ); - m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") ); - - fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - - sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 ); - - - bSizerViaLeftColumn->Add( sbSizerVS_Inputs, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_staticTextWarning = new wxStaticText( m_panelViaSize, wxID_ANY, _("Warning:\nVia pad diameter >= Clearance hole diameter.\nSome parameters cannot be calculated for a via inside a copper zone."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextWarning->Wrap( -1 ); - m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - - bSizerViaLeftColumn->Add( m_staticTextWarning, 0, wxALL|wxEXPAND, 10 ); - - - bSizerViaSize->Add( bSizerViaLeftColumn, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizerRight; - bSizerRight = new wxBoxSizer( wxVERTICAL ); - - bSizerRight->SetMinSize( wxSize( -1,460 ) ); - wxStaticBoxSizer* sbSizerVS_Result; - sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results") ), wxVERTICAL ); - - wxFlexGridSizer* fgSizerTW_Results11; - fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 3, 0 ); - fgSizerTW_Results11->AddGrowableCol( 1 ); - fgSizerTW_Results11->AddGrowableCol( 2 ); - fgSizerTW_Results11->SetFlexibleDirection( wxBOTH ); - fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextArea11 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextArea11->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticTextArea11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_ViaResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaResistance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_viaResUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_viaResUnits->Wrap( -1 ); - fgSizerTW_Results11->Add( m_viaResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticText65111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText65111->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticText65111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_ViaVoltageDrop = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaVoltageDrop->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaVoltageDrop, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticText8411 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8411->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticText8411, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticText66111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText66111->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticText66111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_ViaPowerLoss = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaPowerLoss->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaPowerLoss, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticText8311 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("W"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8311->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticText8311, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticText79211 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Thermal resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText79211->Wrap( -1 ); - m_staticText79211->SetToolTip( _("Using thermal conductivity value 401 Watts/(meter-Kelvin)") ); - - fgSizerTW_Results11->Add( m_staticText79211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_ViaThermalResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaThermalResistance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_viaThermalResUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/W"), wxDefaultPosition, wxDefaultSize, 0 ); - m_viaThermalResUnits->Wrap( -1 ); - fgSizerTW_Results11->Add( m_viaThermalResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Estimated ampacity:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAmpacity->Wrap( -1 ); - m_staticTextAmpacity->SetToolTip( _("Based on temperature rise") ); - - fgSizerTW_Results11->Add( m_staticTextAmpacity, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_ViaAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaAmpacity->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticTextAmpacityUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAmpacityUnits->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticTextAmpacityUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Capacitance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCapacitance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticTextCapacitance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_ViaCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ViaCapacitance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_ViaCapacitance, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticTextCapacitanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("pF"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCapacitanceUnits->Wrap( -1 ); - m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") ); - - fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxRIGHT, 5 ); - - m_staticTextRiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Rise time degradation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRiseTimeOutput->Wrap( -1 ); - m_staticTextRiseTimeOutput->SetToolTip( _("Rise time degradation for given Z0 and calculated capacitance") ); - - fgSizerTW_Results11->Add( m_staticTextRiseTimeOutput, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_RiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_RiseTimeOutput->Wrap( -1 ); - fgSizerTW_Results11->Add( m_RiseTimeOutput, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticTextRiseTimeOutputUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ps"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRiseTimeOutputUnits->Wrap( -1 ); - m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") ); - - fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxRIGHT, 5 ); - - m_staticTextInductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Inductance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInductance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticTextInductance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_Inductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Inductance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_Inductance, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticTextInductanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("nH"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInductanceUnits->Wrap( -1 ); - m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") ); - - fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxRIGHT, 5 ); - - m_staticTextReactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Reactance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextReactance->Wrap( -1 ); - m_staticTextReactance->SetToolTip( _("Inductive reactance for given rise time and calculated inductance") ); - - fgSizerTW_Results11->Add( m_staticTextReactance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); - - m_Reactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Reactance->Wrap( -1 ); - fgSizerTW_Results11->Add( m_Reactance, 0, wxRIGHT|wxLEFT, 5 ); - - m_viaReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_viaReactanceUnits->Wrap( -1 ); - fgSizerTW_Results11->Add( m_viaReactanceUnits, 0, wxRIGHT, 5 ); - - - sbSizerVS_Result->Add( fgSizerTW_Results11, 0, wxEXPAND, 5 ); - - - bSizerRight->Add( sbSizerVS_Result, 0, wxEXPAND|wxALL, 5 ); - - m_viaBitmap = new wxStaticBitmap( m_panelViaSize, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_viaBitmap->SetToolTip( _("Top view of via") ); - - bSizerRight->Add( m_viaBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 10 ); - - - bSizerRight->Add( 0, 0, 1, 0, 5 ); - - m_buttonViaReset = new wxButton( m_panelViaSize, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRight->Add( m_buttonViaReset, 0, wxALIGN_RIGHT|wxALL, 5 ); - - - bSizerViaSize->Add( bSizerRight, 0, wxEXPAND, 5 ); - - - m_panelViaSize->SetSizer( bSizerViaSize ); - m_panelViaSize->Layout(); - bSizerViaSize->Fit( m_panelViaSize ); + m_panelViaSize = new PANEL_VIA_SIZE( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_Notebook->AddPage( m_panelViaSize, _("Via Size"), false ); m_panelTrackWidth = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizerTrackWidth; @@ -1533,27 +1179,6 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_SynthetizeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this ); m_bpButtonSynthetize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this ); m_buttonTransLineReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTransLineResetButtonClick ), NULL, this ); - m_textCtrlHoleDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceHoleDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlPlatingThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choicePlatingThickness->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlViaLength->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceViaLength->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlViaPadDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceViaPadDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlClearanceDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceClearanceDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlImpedance->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceImpedance->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlAppliedCurrent->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlPlatingResistivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_button_ResistivityVia->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaRho_Button ), NULL, this ); - m_textCtrlPlatingPermittivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_button_Permittivity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaEpsilonR_Button ), NULL, this ); - m_textCtrlTemperatureDiff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlRiseTime->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_staticTextWarning->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this ); - m_buttonViaReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaResetButtonClick ), NULL, this ); m_TrackCurrentValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWCalculateFromCurrent ), NULL, this ); m_TrackDeltaTValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this ); m_TrackLengthValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this ); @@ -1592,27 +1217,6 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE() m_SynthetizeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this ); m_bpButtonSynthetize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this ); m_buttonTransLineReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTransLineResetButtonClick ), NULL, this ); - m_textCtrlHoleDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceHoleDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlPlatingThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choicePlatingThickness->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlViaLength->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceViaLength->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlViaPadDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceViaPadDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlClearanceDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceClearanceDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlImpedance->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_choiceImpedance->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlAppliedCurrent->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlPlatingResistivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_button_ResistivityVia->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaRho_Button ), NULL, this ); - m_textCtrlPlatingPermittivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_button_Permittivity->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaEpsilonR_Button ), NULL, this ); - m_textCtrlTemperatureDiff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_textCtrlRiseTime->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); - m_staticTextWarning->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this ); - m_buttonViaReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaResetButtonClick ), NULL, this ); m_TrackCurrentValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWCalculateFromCurrent ), NULL, this ); m_TrackDeltaTValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this ); m_TrackLengthValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this ); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index c00078d53a..28f9021c19 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -7710,11 +7710,11 @@ - + Via Size 0 - + 1 1 1 @@ -7759,4152 +7759,12 @@ Resizable 1 - + PANEL_VIA_SIZE; panel_via_size.h; Not forward_declare 0 wxTAB_TRAVERSAL - - - bSizerViaSize - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizerViaLeftColumn - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - wxID_ANY - Parameters - - sbSizerVS_Inputs - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 0 - - 3 - wxBOTH - 1 - - 0 - - fgSizerVS_Inputs - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 4 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,90,-1,70,0 - 0 - 0 - wxID_ANY - Finished hole diameter (D): - 0 - - 0 - - - 0 - - 1 - m_staticTextHoleDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlHoleDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceHoleDia - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_LEN; widgets/unit_selector.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plating thickness (T): - 0 - - 0 - - - 0 - - 1 - m_staticTextPlatingThickness - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlPlatingThickness - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choicePlatingThickness - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Via length: - 0 - - 0 - - - 0 - - 1 - m_staticTextViaLength - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Via length is the board thickness for through hole vias - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlViaLength - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceViaLength - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Via pad diameter: - 0 - - 0 - - - 0 - - 1 - m_staticTextViaPadDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Diameter of pad surrounding via (annular ring) - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlViaPadDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceViaPadDia - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Clearance hole diameter: - 0 - - 0 - - - 0 - - 1 - m_staticTextClearanceDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Diameter of clearance hole in ground plane(s) - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlClearanceDia - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceClearanceDia - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Z0: - 0 - - 0 - - - 0 - - 1 - m_staticTextImpedance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Characteristic impedance of conductor - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlImpedance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceImpedance - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Applied current: - 0 - - 0 - - - 0 - - 1 - m_staticAppliedCurrent - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlAppliedCurrent - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - A - 0 - - 0 - - - 0 - - 1 - m_staticTextAppliedCurrentUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plating resistivity: - 0 - - 0 - - - 0 - - 1 - m_staticTextResistivity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Specific resistance in ohms * meters - - - - -1 - - - - 5 - wxEXPAND - 1 - - - bSizerResistivity - wxHORIZONTAL - none - - 5 - wxEXPAND|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlPlatingResistivity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - ... - - 0 - - 0 - - - 0 - - 1 - m_button_ResistivityVia - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaRho_Button - - - - - - 5 - wxRIGHT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - ohm-meter - 0 - - 0 - - - 0 - - 1 - m_viaResistivityUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Substrate relative permittivity: - 0 - - 0 - - - 0 - - 1 - m_staticTextPermittivity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Relative dielectric constant (epsilon r) - - - - -1 - - - - 5 - wxEXPAND - 1 - - - bSizerPermittivity - wxHORIZONTAL - none - - 5 - wxEXPAND|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlPlatingPermittivity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - ... - - 0 - - 0 - - - 0 - - 1 - m_button_Permittivity - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaEpsilonR_Button - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Temperature rise: - 0 - - 0 - - - 0 - - 1 - m_staticTextTemperatureDiff - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Maximum acceptable rise in temperature - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlTemperatureDiff - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - deg C - 0 - - 0 - - - 0 - - 1 - m_viaTempUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pulse rise time: - 0 - - 0 - - - 0 - - 1 - m_staticTextRiseTime - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Pulse rise time to calculate reactance - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlRiseTime - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnViaCalculate - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - ns - 0 - - 0 - - - 0 - - 1 - m_staticTextRiseTimeUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - nanoseconds - - - - -1 - - - - - - - - 10 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Warning: Via pad diameter >= Clearance hole diameter. Some parameters cannot be calculated for a via inside a copper zone. - 0 - - 0 - - - 0 - - 1 - m_staticTextWarning - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - onUpdateViaCalcErrorText - - - - - - 5 - wxEXPAND - 0 - - -1,460 - bSizerRight - wxVERTICAL - none - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Results - - sbSizerVS_Result - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 0 - - 3 - wxBOTH - 1,2 - - 0 - - fgSizerTW_Results11 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 3 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Resistance: - 0 - - 0 - - - 0 - - 1 - m_staticTextArea11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaResistance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - ohm - 0 - - 0 - - - 0 - - 1 - m_viaResUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Voltage drop: - 0 - - 0 - - - 0 - - 1 - m_staticText65111 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaVoltageDrop - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - V - 0 - - 0 - - - 0 - - 1 - m_staticText8411 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Power loss: - 0 - - 0 - - - 0 - - 1 - m_staticText66111 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaPowerLoss - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - W - 0 - - 0 - - - 0 - - 1 - m_staticText8311 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Thermal resistance: - 0 - - 0 - - - 0 - - 1 - m_staticText79211 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Using thermal conductivity value 401 Watts/(meter-Kelvin) - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaThermalResistance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - deg C/W - 0 - - 0 - - - 0 - - 1 - m_viaThermalResUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Estimated ampacity: - 0 - - 0 - - - 0 - - 1 - m_staticTextAmpacity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Based on temperature rise - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaAmpacity - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - A - 0 - - 0 - - - 0 - - 1 - m_staticTextAmpacityUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Capacitance: - 0 - - 0 - - - 0 - - 1 - m_staticTextCapacitance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_ViaCapacitance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - pF - 0 - - 0 - - - 0 - - 1 - m_staticTextCapacitanceUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - pico-Farad - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rise time degradation: - 0 - - 0 - - - 0 - - 1 - m_staticTextRiseTimeOutput - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Rise time degradation for given Z0 and calculated capacitance - - - - -1 - - - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_RiseTimeOutput - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - ps - 0 - - 0 - - - 0 - - 1 - m_staticTextRiseTimeOutputUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - picoseconds - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inductance: - 0 - - 0 - - - 0 - - 1 - m_staticTextInductance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_Inductance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - nH - 0 - - 0 - - - 0 - - 1 - m_staticTextInductanceUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - nano-Henry - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Reactance: - 0 - - 0 - - - 0 - - 1 - m_staticTextReactance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Inductive reactance for given rise time and calculated inductance - - - - -1 - - - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - dummy - 0 - - 0 - - - 0 - - 1 - m_Reactance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - ohm - 0 - - 0 - - - 0 - - 1 - m_viaReactanceUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - 10 - wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_viaBitmap - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - Top view of via - - - - - - - 5 - - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Reset to Defaults - - 0 - - 0 - - - 0 - - 1 - m_buttonViaReset - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnViaResetButtonClick - - - - - diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h index 034c7bcebc..3820e82f5e 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h @@ -19,7 +19,7 @@ class UNIT_SELECTOR_THICKNESS; #include "panel_regulator.h" #include "panel_attenuators.h" #include "panel_color_code.h" -#include "widgets/unit_selector.h" +#include "panel_via_size.h" #include "kiway_player.h" #include #include @@ -174,71 +174,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticText* m_left_message8; wxStaticText* m_Message8; wxButton* m_buttonTransLineReset; - wxPanel* m_panelViaSize; - wxStaticText* m_staticTextHoleDia; - wxTextCtrl* m_textCtrlHoleDia; - UNIT_SELECTOR_LEN* m_choiceHoleDia; - wxStaticText* m_staticTextPlatingThickness; - wxTextCtrl* m_textCtrlPlatingThickness; - UNIT_SELECTOR_LEN* m_choicePlatingThickness; - wxStaticText* m_staticTextViaLength; - wxTextCtrl* m_textCtrlViaLength; - UNIT_SELECTOR_LEN* m_choiceViaLength; - wxStaticText* m_staticTextViaPadDia; - wxTextCtrl* m_textCtrlViaPadDia; - UNIT_SELECTOR_LEN* m_choiceViaPadDia; - wxStaticText* m_staticTextClearanceDia; - wxTextCtrl* m_textCtrlClearanceDia; - UNIT_SELECTOR_LEN* m_choiceClearanceDia; - wxStaticText* m_staticTextImpedance; - wxTextCtrl* m_textCtrlImpedance; - UNIT_SELECTOR_RESISTOR* m_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; + PANEL_VIA_SIZE* m_panelViaSize; wxPanel* m_panelTrackWidth; wxStaticText* m_staticTextCurrent; wxTextCtrl* m_TrackCurrentValue; @@ -324,11 +260,6 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER virtual void OnTranslineAnalyse( wxCommandEvent& event ) { event.Skip(); } virtual void OnTranslineSynthetize( wxCommandEvent& event ) { event.Skip(); } virtual void OnTransLineResetButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnViaCalculate( wxCommandEvent& event ) { event.Skip(); } - virtual void OnViaRho_Button( wxCommandEvent& event ) { event.Skip(); } - virtual void OnViaEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); } - virtual void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) { event.Skip(); } - virtual void OnViaResetButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnTWCalculateFromCurrent( wxCommandEvent& event ) { event.Skip(); } virtual void OnTWParametersChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnTWCalculateFromExtWidth( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcb_calculator/via.cpp b/pcb_calculator/panel_via_size.cpp similarity index 65% rename from pcb_calculator/via.cpp rename to pcb_calculator/panel_via_size.cpp index 424275b523..55ca3c36ae 100644 --- a/pcb_calculator/via.cpp +++ b/pcb_calculator/panel_via_size.cpp @@ -45,47 +45,66 @@ #include #include -#include +//#include +#include #include "attenuators/attenuator_classes.h" #include "common_data.h" -#include "class_regulator_data.h" -#include "pcb_calculator_frame.h" +//#include "pcb_calculator_frame.h" #include "pcb_calculator_settings.h" #include "units_scales.h" +#include "panel_via_size.h" extern double DoubleFromString( const wxString& TextValue ); -/** - * Shows a list of current relative dielectric constant(Er) - * and set the selected value in main dialog frame - */ -void PCB_CALCULATOR_FRAME::OnViaEpsilonR_Button( wxCommandEvent& event ) + +PANEL_VIA_SIZE::PANEL_VIA_SIZE( wxWindow* parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + long style, const wxString& name ) : + PANEL_VIA_SIZE_BASE( parent, id, pos, size, style, name ) { + m_viaResistivityUnits->SetLabel( wxT( "Ω•m" ) ); + m_viaTempUnits->SetLabel( wxT( "°C" ) ); + m_viaResUnits->SetLabel( wxT( "Ω" ) ); + m_viaThermalResUnits->SetLabel( wxT( "°C/W" ) ); + m_viaReactanceUnits->SetLabel( wxT( "Ω" ) ); + + m_viaBitmap->SetBitmap( KiBitmap( BITMAPS::viacalc ) ); +} + + +PANEL_VIA_SIZE::~PANEL_VIA_SIZE() +{ +} + + +void PANEL_VIA_SIZE::OnViaEpsilonR_Button( wxCommandEvent& event ) +{ + //Shows a list of current relative dielectric constant(Er) and select a value. wxArrayString list = StandardRelativeDielectricConstantList(); - wxString value = wxGetSingleChoice( wxEmptyString, - _("Relative Dielectric Constants"), list).BeforeFirst( ' ' ); + wxString value = wxGetSingleChoice( wxEmptyString, _("Relative Dielectric Constants"), + list).BeforeFirst( ' ' ); + if( ! value.IsEmpty() ) m_textCtrlPlatingPermittivity->SetValue( value ); } -/** - * Shows a list of current Specific resistance list (rho) - * and set the selected value in main dialog frame - */ -void PCB_CALCULATOR_FRAME::OnViaRho_Button( wxCommandEvent& event ) + +void PANEL_VIA_SIZE::OnViaRho_Button( wxCommandEvent& event ) { wxArrayString list = StandardResistivityList(); + // Shows a list of current Specific resistance list (rho) and select a value wxString value = wxGetSingleChoice( wxEmptyString, _("Electrical Resistivity in Ohm*m"), list).BeforeFirst( ' ' ); + if( ! value.IsEmpty() ) m_textCtrlPlatingResistivity->SetValue( value ); } -void PCB_CALCULATOR_FRAME::onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) +void PANEL_VIA_SIZE::onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) { // Update the Error message if a via has a external diameter // bigger than the clearance area diameter @@ -99,7 +118,7 @@ void PCB_CALCULATOR_FRAME::onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) } -void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event ) +void PANEL_VIA_SIZE::OnViaResetButtonClick( wxCommandEvent& event ) { #define DEFAULT_UNIT_SEL_MM 0 #define DEFAULT_UNIT_SEL_OHM 0 @@ -124,61 +143,57 @@ void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event ) } -void PCB_CALCULATOR_FRAME::initViaSizePanel() +void PANEL_VIA_SIZE::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { - auto cfg = static_cast( Kiface().KifaceSettings() ); + m_textCtrlHoleDia->SetValue( aCfg->m_ViaSize.hole_diameter ); + m_choiceHoleDia->SetSelection( aCfg->m_ViaSize.hole_diameter_units ); - m_textCtrlHoleDia->SetValue( cfg->m_ViaSize.hole_diameter ); - m_choiceHoleDia->SetSelection( cfg->m_ViaSize.hole_diameter_units ); + m_textCtrlPlatingThickness->SetValue( aCfg->m_ViaSize.thickness ); + m_choicePlatingThickness->SetSelection( aCfg->m_ViaSize.thickness_units ); - m_textCtrlPlatingThickness->SetValue( cfg->m_ViaSize.thickness ); - m_choicePlatingThickness->SetSelection( cfg->m_ViaSize.thickness_units ); + m_textCtrlViaLength->SetValue( aCfg->m_ViaSize.length ); + m_choiceViaLength->SetSelection( aCfg->m_ViaSize.length_units ); - m_textCtrlViaLength->SetValue( cfg->m_ViaSize.length ); - m_choiceViaLength->SetSelection( cfg->m_ViaSize.length_units ); + m_textCtrlViaPadDia->SetValue( aCfg->m_ViaSize.pad_diameter ); + m_choiceViaPadDia->SetSelection( aCfg->m_ViaSize.pad_diameter_units ); - m_textCtrlViaPadDia->SetValue( cfg->m_ViaSize.pad_diameter ); - m_choiceViaPadDia->SetSelection( cfg->m_ViaSize.pad_diameter_units ); + m_textCtrlClearanceDia->SetValue( aCfg->m_ViaSize.clearance_diameter ); + m_choiceClearanceDia->SetSelection( aCfg->m_ViaSize.clearance_diameter_units ); - m_textCtrlClearanceDia->SetValue( cfg->m_ViaSize.clearance_diameter ); - m_choiceClearanceDia->SetSelection( cfg->m_ViaSize.clearance_diameter_units ); + m_textCtrlImpedance->SetValue( aCfg->m_ViaSize.characteristic_impedance ); + m_choiceImpedance->SetSelection( aCfg->m_ViaSize.characteristic_impedance_units ); - m_textCtrlImpedance->SetValue( cfg->m_ViaSize.characteristic_impedance ); - m_choiceImpedance->SetSelection( cfg->m_ViaSize.characteristic_impedance_units ); - - m_textCtrlAppliedCurrent->SetValue( cfg->m_ViaSize.applied_current ); - m_textCtrlPlatingResistivity->SetValue( cfg->m_ViaSize.plating_resistivity ); - m_textCtrlPlatingPermittivity->SetValue( cfg->m_ViaSize.permittivity ); - m_textCtrlTemperatureDiff->SetValue( cfg->m_ViaSize.temp_rise ); - m_textCtrlRiseTime->SetValue( cfg->m_ViaSize.pulse_rise_time ); + m_textCtrlAppliedCurrent->SetValue( aCfg->m_ViaSize.applied_current ); + m_textCtrlPlatingResistivity->SetValue( aCfg->m_ViaSize.plating_resistivity ); + m_textCtrlPlatingPermittivity->SetValue( aCfg->m_ViaSize.permittivity ); + m_textCtrlTemperatureDiff->SetValue( aCfg->m_ViaSize.temp_rise ); + m_textCtrlRiseTime->SetValue( aCfg->m_ViaSize.pulse_rise_time ); } -void PCB_CALCULATOR_FRAME::writeViaSizeConfig() +void PANEL_VIA_SIZE::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { - auto cfg = static_cast( Kiface().KifaceSettings() ); - - cfg->m_ViaSize.hole_diameter = m_textCtrlHoleDia->GetValue(); - cfg->m_ViaSize.hole_diameter_units = m_choiceHoleDia->GetSelection(); - cfg->m_ViaSize.thickness = m_textCtrlPlatingThickness->GetValue(); - cfg->m_ViaSize.thickness_units = m_choicePlatingThickness->GetSelection(); - cfg->m_ViaSize.length = m_textCtrlViaLength->GetValue(); - cfg->m_ViaSize.length_units = m_choiceViaLength->GetSelection(); - cfg->m_ViaSize.pad_diameter = m_textCtrlViaPadDia->GetValue(); - cfg->m_ViaSize.pad_diameter_units = m_choiceViaPadDia->GetSelection(); - cfg->m_ViaSize.clearance_diameter = m_textCtrlClearanceDia->GetValue(); - cfg->m_ViaSize.clearance_diameter_units = m_choiceClearanceDia->GetSelection(); - cfg->m_ViaSize.characteristic_impedance = m_textCtrlImpedance->GetValue(); - cfg->m_ViaSize.characteristic_impedance_units = m_choiceImpedance->GetSelection(); - cfg->m_ViaSize.applied_current = m_textCtrlAppliedCurrent->GetValue(); - cfg->m_ViaSize.plating_resistivity = m_textCtrlPlatingResistivity->GetValue(); - cfg->m_ViaSize.permittivity = m_textCtrlPlatingPermittivity->GetValue(); - cfg->m_ViaSize.temp_rise = m_textCtrlTemperatureDiff->GetValue(); - cfg->m_ViaSize.pulse_rise_time = m_textCtrlRiseTime->GetValue(); + aCfg->m_ViaSize.hole_diameter = m_textCtrlHoleDia->GetValue(); + aCfg->m_ViaSize.hole_diameter_units = m_choiceHoleDia->GetSelection(); + aCfg->m_ViaSize.thickness = m_textCtrlPlatingThickness->GetValue(); + aCfg->m_ViaSize.thickness_units = m_choicePlatingThickness->GetSelection(); + aCfg->m_ViaSize.length = m_textCtrlViaLength->GetValue(); + aCfg->m_ViaSize.length_units = m_choiceViaLength->GetSelection(); + aCfg->m_ViaSize.pad_diameter = m_textCtrlViaPadDia->GetValue(); + aCfg->m_ViaSize.pad_diameter_units = m_choiceViaPadDia->GetSelection(); + aCfg->m_ViaSize.clearance_diameter = m_textCtrlClearanceDia->GetValue(); + aCfg->m_ViaSize.clearance_diameter_units = m_choiceClearanceDia->GetSelection(); + aCfg->m_ViaSize.characteristic_impedance = m_textCtrlImpedance->GetValue(); + aCfg->m_ViaSize.characteristic_impedance_units = m_choiceImpedance->GetSelection(); + aCfg->m_ViaSize.applied_current = m_textCtrlAppliedCurrent->GetValue(); + aCfg->m_ViaSize.plating_resistivity = m_textCtrlPlatingResistivity->GetValue(); + aCfg->m_ViaSize.permittivity = m_textCtrlPlatingPermittivity->GetValue(); + aCfg->m_ViaSize.temp_rise = m_textCtrlTemperatureDiff->GetValue(); + aCfg->m_ViaSize.pulse_rise_time = m_textCtrlRiseTime->GetValue(); } -void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event ) +void PANEL_VIA_SIZE::OnViaCalculate( wxCommandEvent& event ) { // Load parameters double finishedHoleDia = std::abs( DoubleFromString( m_textCtrlHoleDia->GetValue() ) ); @@ -244,7 +259,7 @@ void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event ) thermalResistance, capacitance, timeDegradation, inductance, reactance ); } -void PCB_CALCULATOR_FRAME::VSDisplayValues( double aViaResistance, double aVoltageDrop, +void PANEL_VIA_SIZE::VSDisplayValues( double aViaResistance, double aVoltageDrop, double aPowerLoss, double aEstimatedAmpacity, double aThermalResistance, double aCapacitance, double aTimeDegradation, double aInductance, double aReactance ) { diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index aaa8be12ba..3441344476 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -72,13 +72,6 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_trackTempUnits->SetLabel( wxT( "°C" ) ); m_resistivityUnits->SetLabel( wxT( "Ω•m" ) ); - m_viaResistivityUnits->SetLabel( wxT( "Ω•m" ) ); - - m_viaTempUnits->SetLabel( wxT( "°C" ) ); - m_viaResUnits->SetLabel( wxT( "Ω" ) ); - m_viaThermalResUnits->SetLabel( wxT( "°C/W" ) ); - m_viaReactanceUnits->SetLabel( wxT( "Ω" ) ); - m_extTrackResUnits->SetLabel( wxT( "Ω" ) ); m_intTrackResUnits->SetLabel( wxT( "Ω" ) ); @@ -90,7 +83,6 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_TranslineSelection->SetSelection( m_currTransLineType ); initTrackWidthPanel(); - initViaSizePanel(); initESeriesPanel(); BoardClassesUpdateData( m_BoardClassesUnitsSelector->GetUnitScale() ); @@ -160,7 +152,6 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event ) m_panelAttenuators->UpdateUI(); - m_viaBitmap->SetBitmap( KiBitmap( BITMAPS::viacalc ) ); m_panelViaSize->Layout(); m_panelRegulators->Layout(); @@ -258,6 +249,8 @@ void PCB_CALCULATOR_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) for( TRANSLINE_IDENT* transline : m_transline_list ) transline->ReadConfig(); + + m_panelViaSize->LoadSettings( cfg ); } @@ -283,11 +276,11 @@ void PCB_CALCULATOR_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) m_panelRegulators->Regulators_WriteConfig( cfg ); m_panelAttenuators->SaveSettings( cfg ); m_panelColorCode->SaveSettings( cfg ); + m_panelViaSize->SaveSettings( cfg ); } writeTrackWidthConfig(); - writeViaSizeConfig(); for( unsigned ii = 0; ii < m_transline_list.size(); ii++ ) m_transline_list[ii]->WriteConfig(); diff --git a/pcb_calculator/pcb_calculator_frame.h b/pcb_calculator/pcb_calculator_frame.h index d223d911ef..7ea7c23fd2 100644 --- a/pcb_calculator/pcb_calculator_frame.h +++ b/pcb_calculator/pcb_calculator_frame.h @@ -104,7 +104,6 @@ private: */ void initTrackWidthPanel(); void initESeriesPanel(); - void initViaSizePanel(); /** * Called on calculate button and executes all E-series calculations @@ -173,37 +172,6 @@ private: */ void TWUpdateModeDisplay(); - /** - * Write via size parameters in configuration. - */ - void writeViaSizeConfig(); - - /** - * Called when the user changes any value in the via calculator. - */ - void OnViaCalculate( wxCommandEvent& event ) override; - - void OnViaEpsilonR_Button( wxCommandEvent& event ) override; - - void OnViaRho_Button( wxCommandEvent& event ) override; - - /** - * Update the Error message in via calculation panel. - */ - void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) override; - - /** - * Called when the user clicks the reset button; sets the parameters to their default values. - */ - void OnViaResetButtonClick( wxCommandEvent& event ) override; - - /** - * Display the results of the calculation. - */ - void VSDisplayValues( double aViaResistance, double aVoltageDrop, double aPowerLoss, - double aEstimatedAmpacity, double aThermalResistance, - double aCapacitance, double aTimeDegradation, double aInductance, - double aReactance ); // Electrical spacing panel: void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) override;