From ef894954202a68d011c83e4514c69b18271b4ec9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 24 May 2023 10:25:52 +0200 Subject: [PATCH] pcb_calculator, panel_cable_size.*: code cleanup. No actual change. --- .../calculator_panels/panel_cable_size.cpp | 106 ++++----- .../calculator_panels/panel_cable_size.h | 13 +- .../panel_cable_size_base.cpp | 204 +++++++++--------- .../panel_cable_size_base.fbp | 87 ++++++-- .../calculator_panels/panel_cable_size_base.h | 38 ++-- 5 files changed, 253 insertions(+), 195 deletions(-) diff --git a/pcb_calculator/calculator_panels/panel_cable_size.cpp b/pcb_calculator/calculator_panels/panel_cable_size.cpp index 36034870b8..b7ba13df6a 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size.cpp +++ b/pcb_calculator/calculator_panels/panel_cable_size.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 1992-2022 Kicad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 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 @@ -26,11 +26,11 @@ extern double DoubleFromString( const wxString& TextValue ); -#define M2_to_MM2 1000000.0 - #define VACCUM_PERMEABILITY 1.256637e-6 #define RELATIVE_PERMEABILITY 1 +// The default current density in ampere by mm2 (3A/mm2 is common to make transformers) +#define AMP_DENSITY_BY_MM2 3.0 CABLE_SIZE_ENTRY::CABLE_SIZE_ENTRY( wxString aName, double aRadius_meter ) : m_Name( aName ), @@ -42,6 +42,55 @@ CABLE_SIZE_ENTRY::CABLE_SIZE_ENTRY( wxString aName, double aRadius_meter ) : PANEL_CABLE_SIZE::PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : PANEL_CABLE_SIZE_BASE( parent, id, pos, size, style, name ) +{ + buildCableList(); + + m_stUnitOhmMeter->SetLabel( wxT( "Ω⋅m" ) ); + m_stUnitDegC->SetLabel( wxT( "°C" ) ); + m_stUnitOhm->SetLabel( wxT( "Ω" ) ); + m_stUnitmmSq->SetLabel( wxT( "mm²" ) ); + + // Needed on wxWidgets 3.0 to ensure sizers are correctly set + GetSizer()->SetSizeHints( this ); + + // Set internal state flags: + m_updatingUI = false; + m_updatingDiameter = false; + m_updatingArea = false; + m_updatingLinResistance = false; + m_updatingFrequency = false; + m_updatingAmpacity = false; + m_updatingCurrent = false; + m_updatingLength = false; + m_updatingResistanceDc = false; + m_updatingRVdrop = false; + m_updatingPower = false; + m_updatingConductorMaterialResitivity = false; + + m_imperial = false; + + // Initialize variables to a reasonable value + // Stored in normalized units + + m_diameter = 0.001; // i.e. 1 mm2 + m_conductorTemperature = 20; + m_current = 1.0; + m_length = 1.0; + m_conductorMaterialResitivity = 1.72e-8; //Initialized for copper + m_conductorMaterialResitivityRef = 1.72e-8; //Initialized for copper at 20 deg C + m_conductorMaterialThermalCoef = 3.93e-3; + m_amp_by_mm2 = AMP_DENSITY_BY_MM2; + + updateAll( m_diameter / 2 ); +} + + +PANEL_CABLE_SIZE::~PANEL_CABLE_SIZE() +{ +} + + +void PANEL_CABLE_SIZE::buildCableList() { m_entries.clear(); m_entries.emplace_back( CABLE_SIZE_ENTRY( _( "AWG0000" ), 0.005842 ) ); @@ -83,43 +132,6 @@ PANEL_CABLE_SIZE::PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id, const wxPoi { m_sizeChoice->Append( entry.m_Name ); } - - m_staticText16412->SetLabel( wxT( "Ω⋅m" ) ); - m_staticText181->SetLabel( wxT( "°C" ) ); - m_staticText161211->SetLabel( wxT( "Ω" ) ); - m_staticText1641->SetLabel( wxT( "mm²" ) ); - - // Needed on wxWidgets 3.0 to ensure sizers are correctly set - GetSizer()->SetSizeHints( this ); - - // Set internal state flags: - m_updatingUI = false; - m_updatingDiameter = false; - m_updatingArea = false; - m_updatingLinResistance = false; - m_updatingFrequency = false; - m_updatingAmpacity = false; - m_updatingCurrent = false; - m_updatingLength = false; - m_updatingResistanceDc = false; - m_updatingRVdrop = false; - m_updatingPower = false; - m_updatingConductorMaterialResitivity = false; - - m_imperial = false; - - // Initialize variables to a reasonable value - // Stored in normalized units - - m_diameter = 0.001; - m_conductorTemperature = 20; - m_current = 1.0; - m_length = 1.0; - m_conductorMaterialResitivity = 1.72e-8; //Initialized for copper - m_conductorMaterialResitivityRef = 1.72e-8; //Initialized for copper at 20 deg C - m_conductorMaterialThermalCoef = 3.93e-3; - - updateAll( m_diameter / 2 ); } @@ -129,11 +141,6 @@ void PANEL_CABLE_SIZE::OnUpdateUnit( wxCommandEvent& aEvent ) } -PANEL_CABLE_SIZE::~PANEL_CABLE_SIZE() -{ -} - - void PANEL_CABLE_SIZE::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { aCfg->m_cableSize.diameterUnit = m_diameterUnit->GetSelection(); @@ -320,9 +327,8 @@ void PANEL_CABLE_SIZE::OnAmpacityChange( wxCommandEvent& aEvent ) if( m_AmpacityCtrl->GetValue().ToDouble( &value ) ) { - // Based on the 700 circular mils per amp rule of the thumb - // The long number is the sq m to circular mils conversion - updateAll( sqrt( value * 700 / 1973525241.77 / M_PI ) ); + double radius = sqrt( value * m2_by_ampere() / M_PI ); + updateAll( radius ); m_sizeChoice->SetSelection( -1 ); } m_updatingAmpacity = false; @@ -528,9 +534,7 @@ void PANEL_CABLE_SIZE::updateAll( double aRadius ) m_maxFrequency = m_conductorMaterialResitivity / ( M_PI * aRadius * aRadius * VACCUM_PERMEABILITY * RELATIVE_PERMEABILITY ); - // Based on the 700 circular mils per amp rule of the thumb - // The long number is the sq m to circular mils conversion - m_ampacity = ( m_area * 1973525241.77 ) / 700; + m_ampacity = m_area / m2_by_ampere(); // Update application-specific values m_resistanceDc = m_linearResistance * m_length; diff --git a/pcb_calculator/calculator_panels/panel_cable_size.h b/pcb_calculator/calculator_panels/panel_cable_size.h index 83c0d133a7..fc6fe34c3e 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size.h +++ b/pcb_calculator/calculator_panels/panel_cable_size.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 1992-2022 Kicad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2023 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 @@ -23,6 +23,9 @@ #include "panel_cable_size_base.h" #include +// Helper to convert values (in m2) to mm2, more useful to display these values +#define M2_to_MM2 1e6 + class PCB_CALCULATOR_SETTINGS; class CABLE_SIZE_ENTRY @@ -69,6 +72,13 @@ private: void updateAll( double aRadius ); void updateApplication(); void printAll(); + void buildCableList(); + + /// @return the area of the conductor in m2 by ampere, depending on m_amp_by_mm2 setting + double m2_by_ampere() + { + return 1/m_amp_by_mm2/M2_to_MM2; + } private: std::vector m_entries; @@ -103,6 +113,7 @@ private: double m_voltageDrop; double m_dissipatedPower; double m_ampacity; + double m_amp_by_mm2; // allowed current density in ampere by mm2 }; #endif diff --git a/pcb_calculator/calculator_panels/panel_cable_size_base.cpp b/pcb_calculator/calculator_panels/panel_cable_size_base.cpp index 358d2592c3..b05717c330 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size_base.cpp +++ b/pcb_calculator/calculator_panels/panel_cable_size_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -13,8 +13,8 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name ) { - wxBoxSizer* bSizer6; - bSizer6 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bSizer9; bSizer9 = new wxBoxSizer( wxHORIZONTAL ); @@ -22,8 +22,8 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); - wxStaticBoxSizer* sbSizer1; - sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Wire properties") ), wxVERTICAL ); + wxStaticBoxSizer* sbSizerLeft; + sbSizerLeft = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Wire properties") ), wxVERTICAL ); wxFlexGridSizer* fgSizerLeft; fgSizerLeft = new wxFlexGridSizer( 0, 3, 0, 0 ); @@ -31,129 +31,129 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c fgSizerLeft->SetFlexibleDirection( wxBOTH ); fgSizerLeft->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText162 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Standard Size:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText162->Wrap( -1 ); - fgSizerLeft->Add( m_staticText162, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticTextSize = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Standard Size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSize->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextSize, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); wxArrayString m_sizeChoiceChoices; - m_sizeChoice = new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_sizeChoiceChoices, 0 ); + m_sizeChoice = new wxChoice( sbSizerLeft->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_sizeChoiceChoices, 0 ); m_sizeChoice->SetSelection( 0 ); fgSizerLeft->Add( m_sizeChoice, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); fgSizerLeft->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText16 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - fgSizerLeft->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextDiameter = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Diameter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDiameter->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextDiameter, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_diameterCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_diameterCtrl = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLeft->Add( m_diameterCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_diameterUnitChoices; - m_diameterUnit = new UNIT_SELECTOR_LEN( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_diameterUnitChoices, 0 ); + m_diameterUnit = new UNIT_SELECTOR_LEN( sbSizerLeft->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_diameterUnitChoices, 0 ); m_diameterUnit->SetSelection( 0 ); fgSizerLeft->Add( m_diameterUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 ); - m_staticText161 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Area:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText161->Wrap( -1 ); - fgSizerLeft->Add( m_staticText161, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextArea = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Area:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextArea->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextArea, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_areaCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_areaCtrl = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLeft->Add( m_areaCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_staticText1641 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm^2"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1641->Wrap( -1 ); - fgSizerLeft->Add( m_staticText1641, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 ); + m_stUnitmmSq = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("mm^2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stUnitmmSq->Wrap( -1 ); + fgSizerLeft->Add( m_stUnitmmSq, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 ); - m_staticText18 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Conductor resistivity:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText18->Wrap( -1 ); - m_staticText18->SetToolTip( _("Specific resistance in Ohm*m at 20 deg C") ); + m_staticTextResitivity = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Conductor resistivity:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextResitivity->Wrap( -1 ); + m_staticTextResitivity->SetToolTip( _("Specific resistance in Ohm*m at 20 deg C") ); - fgSizerLeft->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + fgSizerLeft->Add( m_staticTextResitivity, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); wxBoxSizer* bSizerResistivity; bSizerResistivity = new wxBoxSizer( wxHORIZONTAL ); - m_textCtrlConductorResistivity = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrlConductorResistivity = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlConductorResistivity->SetMinSize( wxSize( 100,-1 ) ); bSizerResistivity->Add( m_textCtrlConductorResistivity, 1, wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_button_ResistivityConductor = new wxButton( sbSizer1->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_button_ResistivityConductor = new wxButton( sbSizerLeft->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); bSizerResistivity->Add( m_button_ResistivityConductor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); fgSizerLeft->Add( bSizerResistivity, 0, wxEXPAND, 5 ); - m_staticText16412 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16412->Wrap( -1 ); - fgSizerLeft->Add( m_staticText16412, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 ); + m_stUnitOhmMeter = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stUnitOhmMeter->Wrap( -1 ); + fgSizerLeft->Add( m_stUnitOhmMeter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 ); - m_staticText182 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Temperature Coefficient:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText182->Wrap( -1 ); - m_staticText182->SetToolTip( _("Thermal coefficient at 20 deg C") ); + m_staticTextTempCoeff = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Temperature Coefficient:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTempCoeff->Wrap( -1 ); + m_staticTextTempCoeff->SetToolTip( _("Thermal coefficient at 20 deg C") ); - fgSizerLeft->Add( m_staticText182, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + fgSizerLeft->Add( m_staticTextTempCoeff, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - wxBoxSizer* bSizerResistivity1; - bSizerResistivity1 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizerTempCoeff; + bSizerTempCoeff = new wxBoxSizer( wxHORIZONTAL ); - m_textCtrlConductorThermCoef = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerResistivity1->Add( m_textCtrlConductorThermCoef, 1, wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_textCtrlConductorThermCoef = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerTempCoeff->Add( m_textCtrlConductorThermCoef, 1, wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_button_Temp_Coef_Conductor = new wxButton( sbSizer1->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - bSizerResistivity1->Add( m_button_Temp_Coef_Conductor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); + m_button_Temp_Coef_Conductor = new wxButton( sbSizerLeft->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizerTempCoeff->Add( m_button_Temp_Coef_Conductor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - fgSizerLeft->Add( bSizerResistivity1, 0, wxEXPAND, 5 ); + fgSizerLeft->Add( bSizerTempCoeff, 0, wxEXPAND, 5 ); fgSizerLeft->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText16411 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Linear resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16411->Wrap( -1 ); - fgSizerLeft->Add( m_staticText16411, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextLinRes = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Linear resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLinRes->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextLinRes, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_linResistanceCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_linResistanceCtrl = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLeft->Add( m_linResistanceCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_linResistanceUnitChoices; - m_linResistanceUnit = new UNIT_SELECTOR_LINEAR_RESISTANCE( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_linResistanceUnitChoices, 0 ); + m_linResistanceUnit = new UNIT_SELECTOR_LINEAR_RESISTANCE( sbSizerLeft->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_linResistanceUnitChoices, 0 ); m_linResistanceUnit->SetSelection( 0 ); fgSizerLeft->Add( m_linResistanceUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 ); - m_staticText164 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Frequency for 100% skin depth:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText164->Wrap( -1 ); - fgSizerLeft->Add( m_staticText164, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextSkin = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Frequency for 100% skin depth:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSkin->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextSkin, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_frequencyCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_frequencyCtrl = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLeft->Add( m_frequencyCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_frequencyUnitChoices; - m_frequencyUnit = new UNIT_SELECTOR_FREQUENCY( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_frequencyUnitChoices, 0 ); + m_frequencyUnit = new UNIT_SELECTOR_FREQUENCY( sbSizerLeft->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_frequencyUnitChoices, 0 ); m_frequencyUnit->SetSelection( 0 ); fgSizerLeft->Add( m_frequencyUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 ); - m_staticText1642 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Ampacity:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1642->Wrap( -1 ); - fgSizerLeft->Add( m_staticText1642, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextAmpacity = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Ampacity:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAmpacity->Wrap( -1 ); + fgSizerLeft->Add( m_staticTextAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_AmpacityCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AmpacityCtrl = new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLeft->Add( m_AmpacityCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_staticText16421 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16421 = new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText16421->Wrap( -1 ); fgSizerLeft->Add( m_staticText16421, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - sbSizer1->Add( fgSizerLeft, 0, wxEXPAND, 5 ); + sbSizerLeft->Add( fgSizerLeft, 0, wxEXPAND, 5 ); - bSizer4->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 ); + bSizer4->Add( sbSizerLeft, 0, wxALL|wxEXPAND, 5 ); - wxStaticBoxSizer* sbSizer12; - sbSizer12 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Application") ), wxVERTICAL ); + wxStaticBoxSizer* sbSizerRight; + sbSizerRight = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Application") ), wxVERTICAL ); wxFlexGridSizer* fgSizerRight; fgSizerRight = new wxFlexGridSizer( 0, 3, 0, 0 ); @@ -161,99 +161,99 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c fgSizerRight->SetFlexibleDirection( wxBOTH ); fgSizerRight->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText17 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Cable temperature:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17->Wrap( -1 ); - m_staticText17->SetToolTip( _("Off-Load max conductor temp. Reference: 20 deg C") ); + m_staticTextCableTemp = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Cable temperature:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCableTemp->Wrap( -1 ); + m_staticTextCableTemp->SetToolTip( _("Off-Load max conductor temp. Reference: 20 deg C") ); - fgSizerRight->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + fgSizerRight->Add( m_staticTextCableTemp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_conductorTempCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_conductorTempCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_conductorTempCtrl->SetMinSize( wxSize( 120,-1 ) ); fgSizerRight->Add( m_conductorTempCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_staticText181 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText181->Wrap( -1 ); - fgSizerRight->Add( m_staticText181, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 ); + m_stUnitDegC = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stUnitDegC->Wrap( -1 ); + fgSizerRight->Add( m_stUnitDegC, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 ); - m_staticText163 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Current:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText163->Wrap( -1 ); - fgSizerRight->Add( m_staticText163, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextCurrent = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Current:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCurrent->Wrap( -1 ); + fgSizerRight->Add( m_staticTextCurrent, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_currentCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_currentCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRight->Add( m_currentCtrl, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_staticText = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText->Wrap( -1 ); fgSizerRight->Add( m_staticText, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 ); - m_staticText1612 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Length:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1612->Wrap( -1 ); - m_staticText1612->SetToolTip( _("Length includes the return path") ); + m_staticTextLen = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLen->Wrap( -1 ); + m_staticTextLen->SetToolTip( _("Length includes the return path") ); - fgSizerRight->Add( m_staticText1612, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + fgSizerRight->Add( m_staticTextLen, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_lengthCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_lengthCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRight->Add( m_lengthCtrl, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_lengthUnitChoices; - m_lengthUnit = new UNIT_SELECTOR_LEN_CABLE( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_lengthUnitChoices, 0 ); + m_lengthUnit = new UNIT_SELECTOR_LEN_CABLE( sbSizerRight->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_lengthUnitChoices, 0 ); m_lengthUnit->SetSelection( 0 ); fgSizerRight->Add( m_lengthUnit, 0, wxTOP|wxEXPAND, 5 ); - m_staticText16121 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Resistance DC:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16121->Wrap( -1 ); - m_staticText16121->SetToolTip( _("DC Resistance of the conductor") ); + m_staticTextResDC = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Resistance DC:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextResDC->Wrap( -1 ); + m_staticTextResDC->SetToolTip( _("DC Resistance of the conductor") ); - fgSizerRight->Add( m_staticText16121, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + fgSizerRight->Add( m_staticTextResDC, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_resistanceDcCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_resistanceDcCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRight->Add( m_resistanceDcCtrl, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_staticText161211 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText161211->Wrap( -1 ); - fgSizerRight->Add( m_staticText161211, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); + m_stUnitOhm = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("ohm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stUnitOhm->Wrap( -1 ); + fgSizerRight->Add( m_stUnitOhm, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_staticText161212 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText161212->Wrap( -1 ); - fgSizerRight->Add( m_staticText161212, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextDrop = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDrop->Wrap( -1 ); + fgSizerRight->Add( m_staticTextDrop, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_vDropCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_vDropCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRight->Add( m_vDropCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_vDropUnitChoices; - m_vDropUnit = new UNIT_SELECTOR_VOLTAGE( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_vDropUnitChoices, 0 ); + m_vDropUnit = new UNIT_SELECTOR_VOLTAGE( sbSizerRight->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_vDropUnitChoices, 0 ); m_vDropUnit->SetSelection( 0 ); fgSizerRight->Add( m_vDropUnit, 0, wxTOP|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticText1612122 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Dissipated power:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1612122->Wrap( -1 ); - fgSizerRight->Add( m_staticText1612122, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_staticTextPower = new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY, _("Dissipated power:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPower->Wrap( -1 ); + fgSizerRight->Add( m_staticTextPower, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_powerCtrl = new wxTextCtrl( sbSizer12->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_powerCtrl = new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRight->Add( m_powerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_powerUnitChoices; - m_powerUnit = new UNIT_SELECTOR_POWER( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_powerUnitChoices, 0 ); + m_powerUnit = new UNIT_SELECTOR_POWER( sbSizerRight->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_powerUnitChoices, 0 ); m_powerUnit->SetSelection( 0 ); fgSizerRight->Add( m_powerUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 ); - sbSizer12->Add( fgSizerRight, 1, 0, 5 ); + sbSizerRight->Add( fgSizerRight, 1, 0, 5 ); - bSizer4->Add( sbSizer12, 1, wxALL|wxEXPAND, 5 ); + bSizer4->Add( sbSizerRight, 1, wxALL|wxEXPAND, 5 ); bSizer9->Add( bSizer4, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer6->Add( bSizer9, 0, wxEXPAND, 5 ); + bSizerMain->Add( bSizer9, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer6 ); + this->SetSizer( bSizerMain ); this->Layout(); - bSizer6->Fit( this ); + bSizerMain->Fit( this ); // Connect Events m_sizeChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnCableSizeChange ), NULL, this ); diff --git a/pcb_calculator/calculator_panels/panel_cable_size_base.fbp b/pcb_calculator/calculator_panels/panel_cable_size_base.fbp index b0ad71299d..2c14430a27 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size_base.fbp +++ b/pcb_calculator/calculator_panels/panel_cable_size_base.fbp @@ -35,6 +35,7 @@ 1 + 0 1 impl_virtual @@ -54,7 +55,7 @@ wxTAB_TRAVERSAL - bSizer6 + bSizerMain wxVERTICAL none @@ -83,7 +84,7 @@ wxID_ANY Wire properties - sbSizer1 + sbSizerLeft wxVERTICAL 1 none @@ -128,6 +129,7 @@ Dock 0 Left + 0 1 1 @@ -144,7 +146,7 @@ 0 1 - m_staticText162 + m_staticTextSize 1 @@ -190,6 +192,7 @@ Dock 0 Left + 0 1 1 @@ -264,6 +267,7 @@ Dock 0 Left + 0 1 1 @@ -280,7 +284,7 @@ 0 1 - m_staticText16 + m_staticTextDiameter 1 @@ -325,6 +329,7 @@ Dock 0 Left + 0 1 1 @@ -391,6 +396,7 @@ Dock 0 Left + 0 1 1 @@ -455,6 +461,7 @@ Dock 0 Left + 0 1 1 @@ -471,7 +478,7 @@ 0 1 - m_staticText161 + m_staticTextArea 1 @@ -516,6 +523,7 @@ Dock 0 Left + 0 1 1 @@ -581,6 +589,7 @@ Dock 0 Left + 0 1 1 @@ -597,7 +606,7 @@ 0 1 - m_staticText1641 + m_stUnitmmSq 1 @@ -642,6 +651,7 @@ Dock 0 Left + 0 1 1 @@ -658,7 +668,7 @@ 0 1 - m_staticText18 + m_staticTextResitivity 1 @@ -712,6 +722,7 @@ Dock 0 Left + 0 1 1 @@ -782,6 +793,7 @@ Dock 0 Left + 0 1 1 @@ -853,6 +865,7 @@ Dock 0 Left + 0 1 1 @@ -869,7 +882,7 @@ 0 1 - m_staticText16412 + m_stUnitOhmMeter 1 @@ -914,6 +927,7 @@ Dock 0 Left + 0 1 1 @@ -930,7 +944,7 @@ 0 1 - m_staticText182 + m_staticTextTempCoeff 1 @@ -956,7 +970,7 @@ 0 - bSizerResistivity1 + bSizerTempCoeff wxHORIZONTAL none @@ -984,6 +998,7 @@ Dock 0 Left + 0 1 1 @@ -1054,6 +1069,7 @@ Dock 0 Left + 0 1 1 @@ -1135,6 +1151,7 @@ Dock 0 Left + 0 1 1 @@ -1151,7 +1168,7 @@ 0 1 - m_staticText16411 + m_staticTextLinRes 1 @@ -1196,6 +1213,7 @@ Dock 0 Left + 0 1 1 @@ -1262,6 +1280,7 @@ Dock 0 Left + 0 1 1 @@ -1326,6 +1345,7 @@ Dock 0 Left + 0 1 1 @@ -1342,7 +1362,7 @@ 0 1 - m_staticText164 + m_staticTextSkin 1 @@ -1387,6 +1407,7 @@ Dock 0 Left + 0 1 1 @@ -1453,6 +1474,7 @@ Dock 0 Left + 0 1 1 @@ -1517,6 +1539,7 @@ Dock 0 Left + 0 1 1 @@ -1533,7 +1556,7 @@ 0 1 - m_staticText1642 + m_staticTextAmpacity 1 @@ -1578,6 +1601,7 @@ Dock 0 Left + 0 1 1 @@ -1643,6 +1667,7 @@ Dock 0 Left + 0 1 1 @@ -1691,7 +1716,7 @@ wxID_ANY Application - sbSizer12 + sbSizerRight wxVERTICAL 1 none @@ -1736,6 +1761,7 @@ Dock 0 Left + 0 1 1 @@ -1752,7 +1778,7 @@ 0 1 - m_staticText17 + m_staticTextCableTemp 1 @@ -1797,6 +1823,7 @@ Dock 0 Left + 0 1 1 @@ -1862,6 +1889,7 @@ Dock 0 Left + 0 1 1 @@ -1878,7 +1906,7 @@ 0 1 - m_staticText181 + m_stUnitDegC 1 @@ -1923,6 +1951,7 @@ Dock 0 Left + 0 1 1 @@ -1939,7 +1968,7 @@ 0 1 - m_staticText163 + m_staticTextCurrent 1 @@ -1984,6 +2013,7 @@ Dock 0 Left + 0 1 1 @@ -2049,6 +2079,7 @@ Dock 0 Left + 0 1 1 @@ -2110,6 +2141,7 @@ Dock 0 Left + 0 1 1 @@ -2126,7 +2158,7 @@ 0 1 - m_staticText1612 + m_staticTextLen 1 @@ -2171,6 +2203,7 @@ Dock 0 Left + 0 1 1 @@ -2237,6 +2270,7 @@ Dock 0 Left + 0 1 1 @@ -2301,6 +2335,7 @@ Dock 0 Left + 0 1 1 @@ -2317,7 +2352,7 @@ 0 1 - m_staticText16121 + m_staticTextResDC 1 @@ -2362,6 +2397,7 @@ Dock 0 Left + 0 1 1 @@ -2427,6 +2463,7 @@ Dock 0 Left + 0 1 1 @@ -2443,7 +2480,7 @@ 0 1 - m_staticText161211 + m_stUnitOhm 1 @@ -2488,6 +2525,7 @@ Dock 0 Left + 0 1 1 @@ -2504,7 +2542,7 @@ 0 1 - m_staticText161212 + m_staticTextDrop 1 @@ -2549,6 +2587,7 @@ Dock 0 Left + 0 1 1 @@ -2615,6 +2654,7 @@ Dock 0 Left + 0 1 1 @@ -2679,6 +2719,7 @@ Dock 0 Left + 0 1 1 @@ -2695,7 +2736,7 @@ 0 1 - m_staticText1612122 + m_staticTextPower 1 @@ -2740,6 +2781,7 @@ Dock 0 Left + 0 1 1 @@ -2806,6 +2848,7 @@ Dock 0 Left + 0 1 1 diff --git a/pcb_calculator/calculator_panels/panel_cable_size_base.h b/pcb_calculator/calculator_panels/panel_cable_size_base.h index 1d134bf2c5..eeab42b620 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size_base.h +++ b/pcb_calculator/calculator_panels/panel_cable_size_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -45,46 +45,46 @@ class PANEL_CABLE_SIZE_BASE : public CALCULATOR_PANEL private: protected: - wxStaticText* m_staticText162; + wxStaticText* m_staticTextSize; wxChoice* m_sizeChoice; - wxStaticText* m_staticText16; + wxStaticText* m_staticTextDiameter; wxTextCtrl* m_diameterCtrl; UNIT_SELECTOR_LEN* m_diameterUnit; - wxStaticText* m_staticText161; + wxStaticText* m_staticTextArea; wxTextCtrl* m_areaCtrl; - wxStaticText* m_staticText1641; - wxStaticText* m_staticText18; + wxStaticText* m_stUnitmmSq; + wxStaticText* m_staticTextResitivity; wxTextCtrl* m_textCtrlConductorResistivity; wxButton* m_button_ResistivityConductor; - wxStaticText* m_staticText16412; - wxStaticText* m_staticText182; + wxStaticText* m_stUnitOhmMeter; + wxStaticText* m_staticTextTempCoeff; wxTextCtrl* m_textCtrlConductorThermCoef; wxButton* m_button_Temp_Coef_Conductor; - wxStaticText* m_staticText16411; + wxStaticText* m_staticTextLinRes; wxTextCtrl* m_linResistanceCtrl; UNIT_SELECTOR_LINEAR_RESISTANCE* m_linResistanceUnit; - wxStaticText* m_staticText164; + wxStaticText* m_staticTextSkin; wxTextCtrl* m_frequencyCtrl; UNIT_SELECTOR_FREQUENCY* m_frequencyUnit; - wxStaticText* m_staticText1642; + wxStaticText* m_staticTextAmpacity; wxTextCtrl* m_AmpacityCtrl; wxStaticText* m_staticText16421; - wxStaticText* m_staticText17; + wxStaticText* m_staticTextCableTemp; wxTextCtrl* m_conductorTempCtrl; - wxStaticText* m_staticText181; - wxStaticText* m_staticText163; + wxStaticText* m_stUnitDegC; + wxStaticText* m_staticTextCurrent; wxTextCtrl* m_currentCtrl; wxStaticText* m_staticText; - wxStaticText* m_staticText1612; + wxStaticText* m_staticTextLen; wxTextCtrl* m_lengthCtrl; UNIT_SELECTOR_LEN_CABLE* m_lengthUnit; - wxStaticText* m_staticText16121; + wxStaticText* m_staticTextResDC; wxTextCtrl* m_resistanceDcCtrl; - wxStaticText* m_staticText161211; - wxStaticText* m_staticText161212; + wxStaticText* m_stUnitOhm; + wxStaticText* m_staticTextDrop; wxTextCtrl* m_vDropCtrl; UNIT_SELECTOR_VOLTAGE* m_vDropUnit; - wxStaticText* m_staticText1612122; + wxStaticText* m_staticTextPower; wxTextCtrl* m_powerCtrl; UNIT_SELECTOR_POWER* m_powerUnit;