From cb7add9280f3b83320e31ba497568415a88a00ee Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 13 Feb 2021 22:28:43 +0000 Subject: [PATCH] Fix a few minor things in PCB Calc, and update units to SI. Fixes https://gitlab.com/kicad/code/kicad/issues/7525 Fixes https://gitlab.com/kicad/code/kicad/issues/3435 --- .../attenuators/bridget_tee_formula.h | 2 +- .../attenuators/bridget_tee_formula.md | 2 +- pcb_calculator/attenuators/pi_formula.h | 10 +- pcb_calculator/attenuators/pi_formula.md | 10 +- pcb_calculator/attenuators/splitter_formula.h | 4 +- .../attenuators/splitter_formula.md | 4 +- pcb_calculator/attenuators/tee_formula.h | 6 +- pcb_calculator/attenuators/tee_formula.md | 6 +- .../dialogs/pcb_calculator_frame_base.cpp | 192 +++++++++--------- .../dialogs/pcb_calculator_frame_base.fbp | 144 ++++++------- .../dialogs/pcb_calculator_frame_base.h | 32 +-- pcb_calculator/eserie_help.h | 2 +- pcb_calculator/eserie_help.md | 2 +- pcb_calculator/pcb_calculator_frame.cpp | 30 +++ .../tracks_width_versus_current.cpp | 8 +- .../tracks_width_versus_current_formula.h | 6 +- .../tracks_width_versus_current_formula.md | 6 +- pcb_calculator/widgets/unit_selector.cpp | 4 +- 18 files changed, 251 insertions(+), 219 deletions(-) diff --git a/pcb_calculator/attenuators/bridget_tee_formula.h b/pcb_calculator/attenuators/bridget_tee_formula.h index aeae156648..0b7b426973 100644 --- a/pcb_calculator/attenuators/bridget_tee_formula.h +++ b/pcb_calculator/attenuators/bridget_tee_formula.h @@ -1,5 +1,5 @@ // Do not edit this file, it is autogenerated by CMake from the .md file -_HKI( "### Bridged tee attenuator:\n" +_HKI( "### Bridged Tee Attenuator\n" "__Zin__ desired input impedance in Ω
\n" "__Zout__ desired output impedance
\n" "__Z0 = Zin = Zout__

\n" diff --git a/pcb_calculator/attenuators/bridget_tee_formula.md b/pcb_calculator/attenuators/bridget_tee_formula.md index 9d9533735f..d569000352 100644 --- a/pcb_calculator/attenuators/bridget_tee_formula.md +++ b/pcb_calculator/attenuators/bridget_tee_formula.md @@ -1,4 +1,4 @@ -### Bridged tee attenuator: +### Bridged Tee Attenuator __Zin__ desired input impedance in Ω
__Zout__ desired output impedance
__Z0 = Zin = Zout__

diff --git a/pcb_calculator/attenuators/pi_formula.h b/pcb_calculator/attenuators/pi_formula.h index f6730075da..921c815b16 100644 --- a/pcb_calculator/attenuators/pi_formula.h +++ b/pcb_calculator/attenuators/pi_formula.h @@ -1,12 +1,12 @@ // Do not edit this file, it is autogenerated by CMake from the .md file -_HKI( "### Pi attenuator\n" +_HKI( "### PI Attenuator\n" "__Zin__ desired input impedance in Ω
\n" "__Zout__ desired output impedance
\n" "__Zin = Zout__

\n" "\n" "* __a__ attenuation in dB\n" "* __L = 10a/20__ (the loss)\n" -"* __A = (L + 1)/(L - 1)__

\n" -"* ___R2 = (L- 1)/2 \\* √ ( (Zin \\* Zout) / L)___\n" -"* ___R1 = 1/( A/Zin - 1/R2 )___\n" -"* ___R3 = 1/ (A/Zout - 1/R2 )___" ); +"* __A = (L + 1) / (L - 1)__

\n" +"* ___R2 = (L- 1) / 2 \\* √ ( (Zin \\* Zout) / L)___\n" +"* ___R1 = 1 / (A / Zin - 1 / R2)___\n" +"* ___R3 = 1 / (A / Zout - 1 / R2)___" ); diff --git a/pcb_calculator/attenuators/pi_formula.md b/pcb_calculator/attenuators/pi_formula.md index 8f19d4dc2c..e488f9202e 100644 --- a/pcb_calculator/attenuators/pi_formula.md +++ b/pcb_calculator/attenuators/pi_formula.md @@ -1,11 +1,11 @@ -### Pi attenuator +### PI Attenuator __Zin__ desired input impedance in Ω
__Zout__ desired output impedance
__Zin = Zout__

* __a__ attenuation in dB * __L = 10a/20__ (the loss) -* __A = (L + 1)/(L - 1)__

-* ___R2 = (L- 1)/2 \* √ ( (Zin \* Zout) / L)___ -* ___R1 = 1/( A/Zin - 1/R2 )___ -* ___R3 = 1/ (A/Zout - 1/R2 )___ \ No newline at end of file +* __A = (L + 1) / (L - 1)__

+* ___R2 = (L- 1) / 2 \* √ ( (Zin \* Zout) / L)___ +* ___R1 = 1 / (A / Zin - 1 / R2)___ +* ___R3 = 1 / (A / Zout - 1 / R2)___ \ No newline at end of file diff --git a/pcb_calculator/attenuators/splitter_formula.h b/pcb_calculator/attenuators/splitter_formula.h index 0c822daf94..d5d8c4bc36 100644 --- a/pcb_calculator/attenuators/splitter_formula.h +++ b/pcb_calculator/attenuators/splitter_formula.h @@ -1,9 +1,9 @@ // Do not edit this file, it is autogenerated by CMake from the .md file -_HKI( "### Split attenuator\n" +_HKI( "### Split Attenuator\n" "#### Attenuation is 6dB\n" "___Zin___ desired input impedance in Ω
\n" "___Zout___ desired output impedance in Ω
\n" "___Zin = Zout___\n" "\n" -"___R1 = R2 = R3 = Zout/3___\n" +"___R1 = R2 = R3 = Zout / 3___\n" "" ); diff --git a/pcb_calculator/attenuators/splitter_formula.md b/pcb_calculator/attenuators/splitter_formula.md index 471fd16192..e643af68f7 100644 --- a/pcb_calculator/attenuators/splitter_formula.md +++ b/pcb_calculator/attenuators/splitter_formula.md @@ -1,7 +1,7 @@ -### Split attenuator +### Split Attenuator #### Attenuation is 6dB ___Zin___ desired input impedance in Ω
___Zout___ desired output impedance in Ω
___Zin = Zout___ -___R1 = R2 = R3 = Zout/3___ +___R1 = R2 = R3 = Zout / 3___ diff --git a/pcb_calculator/attenuators/tee_formula.h b/pcb_calculator/attenuators/tee_formula.h index 672442f770..f8344650ed 100644 --- a/pcb_calculator/attenuators/tee_formula.h +++ b/pcb_calculator/attenuators/tee_formula.h @@ -1,13 +1,13 @@ // Do not edit this file, it is autogenerated by CMake from the .md file -_HKI( "### Tee attenuator\n" +_HKI( "### Tee Attenuator\n" "__Zin__ desired input impedance in Ω
\n" "__Zout__ desired output impedance
\n" "__Zin = Zout__

\n" "\n" "* __a__ attenuation in dB\n" "* __L = 10a/20__ (the loss)\n" -"* ___A = (L + 1)/(L - 1)___

\n" -"* ___R2 = 2√(L \\* Zin \\* Zout )/(L - 1)___\n" +"* ___A = (L + 1) / (L - 1)___

\n" +"* ___R2 = 2 √ (L \\* Zin \\* Zout ) / (L - 1)___\n" "* ___R1 = Zin \\* A - R2___\n" "* ___R3 = Zout \\* A - R2___\n" "" ); diff --git a/pcb_calculator/attenuators/tee_formula.md b/pcb_calculator/attenuators/tee_formula.md index e350021b40..4091dbc698 100644 --- a/pcb_calculator/attenuators/tee_formula.md +++ b/pcb_calculator/attenuators/tee_formula.md @@ -1,11 +1,11 @@ -### Tee attenuator +### Tee Attenuator __Zin__ desired input impedance in Ω
__Zout__ desired output impedance
__Zin = Zout__

* __a__ attenuation in dB * __L = 10a/20__ (the loss) -* ___A = (L + 1)/(L - 1)___

-* ___R2 = 2√(L \* Zin \* Zout )/(L - 1)___ +* ___A = (L + 1) / (L - 1)___

+* ___R2 = 2 √ (L \* Zin \* Zout ) / (L - 1)___ * ___R1 = Zin \* A - R2___ * ___R3 = Zout \* A - R2___ diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index 79742a55dc..0ea446f340 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -98,9 +98,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_RegulR1Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRegParams->Add( m_RegulR1Value, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_UnitRegultR11 = new wxStaticText( m_panelRegulators, wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UnitRegultR11->Wrap( -1 ); - fgSizerRegParams->Add( m_UnitRegultR11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_r1Units = new wxStaticText( m_panelRegulators, wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_r1Units->Wrap( -1 ); + fgSizerRegParams->Add( m_r1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_rbRegulR2 = new wxRadioButton( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRegParams->Add( m_rbRegulR2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -112,9 +112,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_RegulR2Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRegParams->Add( m_RegulR2Value, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_UnitRegultR1 = new wxStaticText( m_panelRegulators, wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UnitRegultR1->Wrap( -1 ); - fgSizerRegParams->Add( m_UnitRegultR1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_r2Units = new wxStaticText( m_panelRegulators, wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_r2Units->Wrap( -1 ); + fgSizerRegParams->Add( m_r2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_rbRegulVout = new wxRadioButton( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRegParams->Add( m_rbRegulVout, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -259,10 +259,10 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bLeftSizerAtt = new wxBoxSizer( wxVERTICAL ); bLeftSizerAtt->SetMinSize( wxSize( 260,-1 ) ); - wxString m_AttenuatorsSelectionChoices[] = { _("PI"), _("Tee"), _("Bridged Tee"), _("Resistive Splitter") }; + wxString m_AttenuatorsSelectionChoices[] = { _("PI"), _("Tee"), _("Bridged tee"), _("Resistive splitter") }; int m_AttenuatorsSelectionNChoices = sizeof( m_AttenuatorsSelectionChoices ) / sizeof( wxString ); m_AttenuatorsSelection = new wxRadioBox( m_panelAttenuators, wxID_ANY, _("Attenuators"), wxDefaultPosition, wxDefaultSize, m_AttenuatorsSelectionNChoices, m_AttenuatorsSelectionChoices, 1, wxRA_SPECIFY_COLS ); - m_AttenuatorsSelection->SetSelection( 0 ); + m_AttenuatorsSelection->SetSelection( 2 ); bLeftSizerAtt->Add( m_AttenuatorsSelection, 0, wxEXPAND|wxALL, 5 ); @@ -364,9 +364,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_Att_R2_Value = new wxTextCtrl( sbSizerAttValues->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerAttResults->Add( m_Att_R2_Value, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_attR2Unit1 = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); - m_attR2Unit1->Wrap( -1 ); - fgSizerAttResults->Add( m_attR2Unit1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_attR2Unit = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); + m_attR2Unit->Wrap( -1 ); + fgSizerAttResults->Add( m_attR2Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_attenuatorR3Label = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("R3:"), wxDefaultPosition, wxDefaultSize, 0 ); m_attenuatorR3Label->Wrap( -1 ); @@ -444,9 +444,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ResRequired = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerAttPrms1->Add( m_ResRequired, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_UnitRegultR111 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UnitRegultR111->Wrap( -1 ); - fgSizerAttPrms1->Add( m_UnitRegultR111, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_reqResUnits = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_reqResUnits->Wrap( -1 ); + fgSizerAttPrms1->Add( m_reqResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_ESrequired1 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 1:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ESrequired1->Wrap( -1 ); @@ -455,9 +455,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ResExclude1 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerAttPrms1->Add( m_ResExclude1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_UnitRegultR1111 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UnitRegultR1111->Wrap( -1 ); - fgSizerAttPrms1->Add( m_UnitRegultR1111, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_exclude1Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_exclude1Units->Wrap( -1 ); + fgSizerAttPrms1->Add( m_exclude1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_ESrequired11 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 2:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ESrequired11->Wrap( -1 ); @@ -466,9 +466,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ResExclude2 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerAttPrms1->Add( m_ResExclude2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_UnitRegultR1112 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UnitRegultR1112->Wrap( -1 ); - fgSizerAttPrms1->Add( m_UnitRegultR1112, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_exclude2Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_exclude2Units->Wrap( -1 ); + fgSizerAttPrms1->Add( m_exclude2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); sbSizerESeriesInput->Add( fgSizerAttPrms1, 0, wxEXPAND|wxBOTTOM, 5 ); @@ -1131,7 +1131,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1143,7 +1143,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1157,7 +1157,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1171,7 +1171,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1185,7 +1185,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1199,7 +1199,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1210,7 +1210,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity (Ohm.m):"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextResistivity->Wrap( -1 ); @@ -1222,7 +1222,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerVS_Inputs->Add( m_textCtrlPlatingResistivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_button_ResistivityVia = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - fgSizerVS_Inputs->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerVS_Inputs->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Er:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPermittivity->Wrap( -1 ); @@ -1234,7 +1234,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerVS_Inputs->Add( m_textCtrlPlatingPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_button_Permittivity = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - fgSizerVS_Inputs->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerVS_Inputs->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTemperatureDiff->Wrap( -1 ); @@ -1245,9 +1245,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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_staticTextTemperatureUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTemperatureUnits->Wrap( -1 ); - fgSizerVS_Inputs->Add( m_staticTextTemperatureUnits, 0, wxALIGN_CENTER_VERTICAL|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 ); @@ -1262,7 +1262,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticTextRiseTimeUnits->Wrap( -1 ); m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") ); - fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 ); @@ -1301,9 +1301,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ViaResistance->Wrap( -1 ); fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_IntTrackAreaUnitLabel1 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_IntTrackAreaUnitLabel1->Wrap( -1 ); - fgSizerTW_Results11->Add( m_IntTrackAreaUnitLabel1, 0, wxALIGN_CENTER_VERTICAL|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 ); @@ -1313,9 +1313,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); + 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|wxLEFT, 5 ); + 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 ); @@ -1325,9 +1325,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); + 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|wxLEFT, 5 ); + 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 ); @@ -1339,9 +1339,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ViaThermalResistance->Wrap( -1 ); fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticText791111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/Watt"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText791111->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticText791111, 0, wxALIGN_CENTER_VERTICAL|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 ); @@ -1355,7 +1355,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow 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|wxLEFT, 5 ); + 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 ); @@ -1369,7 +1369,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticTextCapacitanceUnits->Wrap( -1 ); m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") ); - fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxRIGHT|wxLEFT, 5 ); + 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 ); @@ -1385,7 +1385,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticTextRiseTimeOutputUnits->Wrap( -1 ); m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") ); - fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxRIGHT|wxLEFT, 5 ); + 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 ); @@ -1399,7 +1399,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticTextInductanceUnits->Wrap( -1 ); m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") ); - fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxRIGHT|wxLEFT, 5 ); + 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 ); @@ -1411,9 +1411,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_Reactance->Wrap( -1 ); fgSizerTW_Results11->Add( m_Reactance, 0, wxRIGHT|wxLEFT, 5 ); - m_staticTextReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextReactanceUnits->Wrap( -1 ); - fgSizerTW_Results11->Add( m_staticTextReactanceUnits, 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 ); @@ -1465,7 +1465,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticText62 = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText62->Wrap( -1 ); - fgSizerTWprms->Add( m_staticText62, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerTWprms->Add( m_staticText62, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText63 = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText63->Wrap( -1 ); @@ -1474,9 +1474,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_TrackDeltaTValue = new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerTWprms->Add( m_TrackDeltaTValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText64 = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText64->Wrap( -1 ); - fgSizerTWprms->Add( m_staticText64, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_trackTempUnits = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); + m_trackTempUnits->Wrap( -1 ); + fgSizerTWprms->Add( m_trackTempUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText66 = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("Conductor length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText66->Wrap( -1 ); @@ -1488,7 +1488,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow wxArrayString m_TW_CuLength_choiceUnitChoices; m_TW_CuLength_choiceUnit = new UNIT_SELECTOR_LEN( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TW_CuLength_choiceUnitChoices, 0 ); m_TW_CuLength_choiceUnit->SetSelection( 0 ); - fgSizerTWprms->Add( m_TW_CuLength_choiceUnit, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerTWprms->Add( m_TW_CuLength_choiceUnit, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); m_TWResistivity = new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerTWprms->Add( m_TWResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); @@ -1497,9 +1497,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticText103->Wrap( -1 ); fgSizerTWprms->Add( m_staticText103, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - m_staticText104 = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("Ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText104->Wrap( -1 ); - fgSizerTWprms->Add( m_staticText104, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_resistivityUnits = new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, _("Ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resistivityUnits->Wrap( -1 ); + fgSizerTWprms->Add( m_resistivityUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); sbSizerTW_Prms->Add( fgSizerTWprms, 0, wxEXPAND, 5 ); @@ -1568,9 +1568,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ExtTrackAreaValue->Wrap( -1 ); fgSizerTW_Results->Add( m_ExtTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_ExtTrackAreaUnitLabel = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ExtTrackAreaUnitLabel->Wrap( -1 ); - fgSizerTW_Results->Add( m_ExtTrackAreaUnitLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_extTrackAreaUnitLabel = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_extTrackAreaUnitLabel->Wrap( -1 ); + fgSizerTW_Results->Add( m_extTrackAreaUnitLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText651 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText651->Wrap( -1 ); @@ -1580,9 +1580,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ExtTrackResistValue->Wrap( -1 ); fgSizerTW_Results->Add( m_ExtTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText84 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - fgSizerTW_Results->Add( m_staticText84, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_extTrackResUnits = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_extTrackResUnits->Wrap( -1 ); + fgSizerTW_Results->Add( m_extTrackResUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText661 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText661->Wrap( -1 ); @@ -1592,9 +1592,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ExtTrackVDropValue->Wrap( -1 ); fgSizerTW_Results->Add( m_ExtTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText83 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText83->Wrap( -1 ); - fgSizerTW_Results->Add( m_staticText83, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerTW_Results->Add( m_staticText83, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText79 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText79->Wrap( -1 ); @@ -1604,9 +1604,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_ExtTrackLossValue->Wrap( -1 ); fgSizerTW_Results->Add( m_ExtTrackLossValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText791 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText791 = new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY, _("W"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText791->Wrap( -1 ); - fgSizerTW_Results->Add( m_staticText791, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerTW_Results->Add( m_staticText791, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); sbSizerTW_Result->Add( fgSizerTW_Results, 0, wxEXPAND, 5 ); @@ -1666,9 +1666,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_IntTrackAreaValue->Wrap( -1 ); fgSizerTW_Results1->Add( m_IntTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); - m_IntTrackAreaUnitLabel = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); - m_IntTrackAreaUnitLabel->Wrap( -1 ); - fgSizerTW_Results1->Add( m_IntTrackAreaUnitLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_intTrackAreaUnitLabel = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); + m_intTrackAreaUnitLabel->Wrap( -1 ); + fgSizerTW_Results1->Add( m_intTrackAreaUnitLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); m_staticText6511 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6511->Wrap( -1 ); @@ -1678,9 +1678,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_IntTrackResistValue->Wrap( -1 ); fgSizerTW_Results1->Add( m_IntTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText841 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText841->Wrap( -1 ); - fgSizerTW_Results1->Add( m_staticText841, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_intTrackResUnits = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_intTrackResUnits->Wrap( -1 ); + fgSizerTW_Results1->Add( m_intTrackResUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText6611 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6611->Wrap( -1 ); @@ -1690,9 +1690,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_IntTrackVDropValue->Wrap( -1 ); fgSizerTW_Results1->Add( m_IntTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText831 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText831 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText831->Wrap( -1 ); - fgSizerTW_Results1->Add( m_staticText831, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerTW_Results1->Add( m_staticText831, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticText792 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText792->Wrap( -1 ); @@ -1702,9 +1702,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_IntTrackLossValue->Wrap( -1 ); fgSizerTW_Results1->Add( m_IntTrackLossValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText7911 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7911 = new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, _("W"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7911->Wrap( -1 ); - fgSizerTW_Results1->Add( m_staticText7911, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerTW_Results1->Add( m_staticText7911, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); sbSizerTW_Result1->Add( fgSizerTW_Results1, 0, wxEXPAND, 5 ); @@ -1733,23 +1733,25 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow wxArrayString m_ElectricalSpacingUnitsSelectorChoices; m_ElectricalSpacingUnitsSelector = new UNIT_SELECTOR_LEN( m_panelElectricalSpacing, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ElectricalSpacingUnitsSelectorChoices, 0 ); m_ElectricalSpacingUnitsSelector->SetSelection( -1 ); - bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxTOP|wxBOTTOM, 20 ); + m_ElectricalSpacingUnitsSelector->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_LIGHT, false, wxEmptyString ) ); + + bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxALL, 10 ); m_staticline2 = new wxStaticLine( m_panelElectricalSpacing, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); - m_staticText891 = new wxStaticText( m_panelElectricalSpacing, wxID_ANY, _("Voltage > 500V:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText891 = new wxStaticText( m_panelElectricalSpacing, wxID_ANY, _("Voltage > 500 V:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText891->Wrap( -1 ); - bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP, 5 ); + bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ElectricalSpacingVoltage = new wxTextCtrl( m_panelElectricalSpacing, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM, 5 ); + bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_buttonElectSpacingRefresh = new wxButton( m_panelElectricalSpacing, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 ); - bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxALL, 5 ); - bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxALL, 10 ); + bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); wxBoxSizer* bElectricalSpacingSizerRight; bElectricalSpacingSizerRight = new wxBoxSizer( wxVERTICAL ); @@ -1802,16 +1804,16 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_gridElectricalSpacingValues->SetRowSize( 9, 24 ); m_gridElectricalSpacingValues->EnableDragRowSize( false ); m_gridElectricalSpacingValues->SetRowLabelSize( 100 ); - m_gridElectricalSpacingValues->SetRowLabelValue( 0, _("0 .. 15V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 1, _("16 .. 30V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 2, _("31 .. 50V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 3, _("51 .. 100V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 4, _("101 .. 150V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 5, _("151 .. 170V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 6, _("171 .. 250V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 7, _("251 .. 300V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 8, _("301 .. 500V") ); - m_gridElectricalSpacingValues->SetRowLabelValue( 9, _(" > 500V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 0, _("0 .. 15 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 1, _("16 .. 30 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 2, _("31 .. 50 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 3, _("51 .. 100 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 4, _("101 .. 150 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 5, _("151 .. 170 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 6, _("171 .. 250 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 7, _("251 .. 300 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 8, _("301 .. 500 V") ); + m_gridElectricalSpacingValues->SetRowLabelValue( 9, _(" > 500 V") ); m_gridElectricalSpacingValues->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER ); // Label Appearance diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index 366dbc0e6a..f59223d078 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -811,7 +811,7 @@ 0 1 - m_UnitRegultR11 + m_r1Units 1 @@ -1061,7 +1061,7 @@ 0 1 - m_UnitRegultR1 + m_r2Units 1 @@ -2585,7 +2585,7 @@ 1 0 - "PI" "Tee" "Bridged Tee" "Resistive Splitter" + "PI" "Tee" "Bridged tee" "Resistive splitter" 1 1 @@ -2617,7 +2617,7 @@ 1 Resizable - 0 + 2 1 wxRA_SPECIFY_COLS @@ -3840,7 +3840,7 @@ 0 1 - m_attR2Unit1 + m_attR2Unit 1 @@ -4531,7 +4531,7 @@ 0 1 - m_UnitRegultR111 + m_reqResUnits 1 @@ -4717,7 +4717,7 @@ 0 1 - m_UnitRegultR1111 + m_exclude1Units 1 @@ -4903,7 +4903,7 @@ 0 1 - m_UnitRegultR1112 + m_exclude2Units 1 @@ -12579,7 +12579,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -12770,7 +12770,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -12961,7 +12961,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -13152,7 +13152,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -13343,7 +13343,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -13534,7 +13534,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 0 1 @@ -13725,7 +13725,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -13912,7 +13912,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14111,7 +14111,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14310,7 +14310,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14349,7 +14349,7 @@ 0 1 - m_staticTextTemperatureUnits + m_viaTempUnits 1 @@ -14497,7 +14497,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14785,7 +14785,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14824,7 +14824,7 @@ 0 1 - m_IntTrackAreaUnitLabel1 + m_viaResUnits 1 @@ -14968,7 +14968,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14998,7 +14998,7 @@ 0 0 wxID_ANY - Volt + V 0 0 @@ -15151,7 +15151,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -15181,7 +15181,7 @@ 0 0 wxID_ANY - Watt + W 0 0 @@ -15334,7 +15334,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -15364,7 +15364,7 @@ 0 0 wxID_ANY - deg C/Watt + deg C/W 0 0 @@ -15373,7 +15373,7 @@ 0 1 - m_staticText791111 + m_viaThermalResUnits 1 @@ -15517,7 +15517,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -15700,7 +15700,7 @@ 5 - wxRIGHT|wxLEFT + wxRIGHT 0 1 @@ -15883,7 +15883,7 @@ 5 - wxRIGHT|wxLEFT + wxRIGHT 0 1 @@ -16066,7 +16066,7 @@ 5 - wxRIGHT|wxLEFT + wxRIGHT 0 1 @@ -16249,7 +16249,7 @@ 5 - wxRIGHT|wxLEFT + wxRIGHT 0 1 @@ -16288,7 +16288,7 @@ 0 1 - m_staticTextReactanceUnits + m_viaReactanceUnits 1 @@ -16683,7 +16683,7 @@ 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -16870,7 +16870,7 @@ 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -16909,7 +16909,7 @@ 0 1 - m_staticText64 + m_trackTempUnits 1 @@ -17057,7 +17057,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT 0 1 @@ -17248,7 +17248,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -17287,7 +17287,7 @@ 0 1 - m_staticText104 + m_resistivityUnits 1 @@ -18088,7 +18088,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -18127,7 +18127,7 @@ 0 1 - m_ExtTrackAreaUnitLabel + m_extTrackAreaUnitLabel 1 @@ -18271,7 +18271,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -18310,7 +18310,7 @@ 0 1 - m_staticText84 + m_extTrackResUnits 1 @@ -18454,7 +18454,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -18484,7 +18484,7 @@ 0 0 wxID_ANY - Volt + V 0 0 @@ -18637,7 +18637,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -18667,7 +18667,7 @@ 0 0 wxID_ANY - Watt + W 0 0 @@ -19408,7 +19408,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -19447,7 +19447,7 @@ 0 1 - m_IntTrackAreaUnitLabel + m_intTrackAreaUnitLabel 1 @@ -19591,7 +19591,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -19630,7 +19630,7 @@ 0 1 - m_staticText841 + m_intTrackResUnits 1 @@ -19774,7 +19774,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -19804,7 +19804,7 @@ 0 0 wxID_ANY - Volt + V 0 0 @@ -19957,7 +19957,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -19987,7 +19987,7 @@ 0 0 wxID_ANY - Watt + W 0 0 @@ -20102,7 +20102,7 @@ Electrical Spacing 0 - + 1 1 1 @@ -20153,14 +20153,14 @@ wxTAB_TRAVERSAL - + bSizerElectricalClearance wxHORIZONTAL none - 10 - wxEXPAND|wxALL + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT 0 @@ -20168,8 +20168,8 @@ wxVERTICAL none - 20 - wxEXPAND|wxTOP|wxBOTTOM + 10 + wxEXPAND|wxALL 0 1 @@ -20196,7 +20196,7 @@ 1 1 - + ,90,91,-1,70,0 0 0 wxID_ANY @@ -20233,7 +20233,7 @@ - 5 + 10 wxEXPAND|wxTOP|wxBOTTOM 0 @@ -20292,7 +20292,7 @@ 5 - wxTOP + wxTOP|wxRIGHT|wxLEFT 0 1 @@ -20322,7 +20322,7 @@ 0 0 wxID_ANY - Voltage > 500V: + Voltage > 500 V: 0 0 @@ -20353,7 +20353,7 @@ 5 - wxEXPAND|wxBOTTOM + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -20417,7 +20417,7 @@ 5 - wxEXPAND|wxTOP|wxBOTTOM + wxEXPAND|wxALL 0 1 @@ -20490,11 +20490,11 @@ - + 20 wxEXPAND|wxLEFT 1 - + bElectricalSpacingSizerRight wxVERTICAL @@ -20634,7 +20634,7 @@ Resizable wxALIGN_RIGHT 100 - "0 .. 15V" "16 .. 30V" "31 .. 50V" "51 .. 100V" "101 .. 150V" "151 .. 170V" "171 .. 250V" "251 .. 300V" "301 .. 500V" " > 500V" + "0 .. 15 V" "16 .. 30 V" "31 .. 50 V" "51 .. 100 V" "101 .. 150 V" "151 .. 170 V" "171 .. 250 V" "251 .. 300 V" "301 .. 500 V" " > 500 V" wxALIGN_CENTER 24,24,24,24,24,24,24,24,24,24 10 diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h index a203e5b2a7..0408550fd2 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h @@ -64,11 +64,11 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxRadioButton* m_rbRegulR1; wxStaticText* m_labelRegultR1; wxTextCtrl* m_RegulR1Value; - wxStaticText* m_UnitRegultR11; + wxStaticText* m_r1Units; wxRadioButton* m_rbRegulR2; wxStaticText* m_labelRegultR2; wxTextCtrl* m_RegulR2Value; - wxStaticText* m_UnitRegultR1; + wxStaticText* m_r2Units; wxRadioButton* m_rbRegulVout; wxStaticText* m_labelVout; wxTextCtrl* m_RegulVoutValue; @@ -108,7 +108,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticText* m_attR1Unit; wxStaticText* m_attenuatorR2Label; wxTextCtrl* m_Att_R2_Value; - wxStaticText* m_attR2Unit1; + wxStaticText* m_attR2Unit; wxStaticText* m_attenuatorR3Label; wxTextCtrl* m_Att_R3_Value; wxStaticText* m_attR3Unit; @@ -118,13 +118,13 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxPanel* m_panelESeries; wxStaticText* m_ESrequired; wxTextCtrl* m_ResRequired; - wxStaticText* m_UnitRegultR111; + wxStaticText* m_reqResUnits; wxStaticText* m_ESrequired1; wxTextCtrl* m_ResExclude1; - wxStaticText* m_UnitRegultR1111; + wxStaticText* m_exclude1Units; wxStaticText* m_ESrequired11; wxTextCtrl* m_ResExclude2; - wxStaticText* m_UnitRegultR1112; + wxStaticText* m_exclude2Units; wxStaticLine* m_staticline6; wxRadioButton* m_e1; wxRadioButton* m_e3; @@ -268,14 +268,14 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxButton* m_button_Permittivity; wxStaticText* m_staticTextTemperatureDiff; wxTextCtrl* m_textCtrlTemperatureDiff; - wxStaticText* m_staticTextTemperatureUnits; + wxStaticText* m_viaTempUnits; wxStaticText* m_staticTextRiseTime; wxTextCtrl* m_textCtrlRiseTime; wxStaticText* m_staticTextRiseTimeUnits; wxStaticText* m_staticTextWarning; wxStaticText* m_staticTextArea11; wxStaticText* m_ViaResistance; - wxStaticText* m_IntTrackAreaUnitLabel1; + wxStaticText* m_viaResUnits; wxStaticText* m_staticText65111; wxStaticText* m_ViaVoltageDrop; wxStaticText* m_staticText8411; @@ -284,7 +284,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticText* m_staticText8311; wxStaticText* m_staticText79211; wxStaticText* m_ViaThermalResistance; - wxStaticText* m_staticText791111; + wxStaticText* m_viaThermalResUnits; wxStaticText* m_staticTextAmpacity; wxStaticText* m_ViaAmpacity; wxStaticText* m_staticTextAmpacityUnits; @@ -299,7 +299,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticText* m_staticTextInductanceUnits; wxStaticText* m_staticTextReactance; wxStaticText* m_Reactance; - wxStaticText* m_staticTextReactanceUnits; + wxStaticText* m_viaReactanceUnits; wxStaticBitmap* m_viaBitmap; wxButton* m_buttonViaReset; wxPanel* m_panelTrackWidth; @@ -308,13 +308,13 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticText* m_staticText62; wxStaticText* m_staticText63; wxTextCtrl* m_TrackDeltaTValue; - wxStaticText* m_staticText64; + wxStaticText* m_trackTempUnits; wxStaticText* m_staticText66; wxTextCtrl* m_TrackLengthValue; UNIT_SELECTOR_LEN* m_TW_CuLength_choiceUnit; wxTextCtrl* m_TWResistivity; wxStaticText* m_staticText103; - wxStaticText* m_staticText104; + wxStaticText* m_resistivityUnits; wxHtmlWindow* m_htmlWinFormulas; wxStaticText* m_staticTextExtWidth; wxTextCtrl* m_ExtTrackWidthValue; @@ -327,10 +327,10 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticLine* m_staticline5; wxStaticText* m_staticTextArea; wxStaticText* m_ExtTrackAreaValue; - wxStaticText* m_ExtTrackAreaUnitLabel; + wxStaticText* m_extTrackAreaUnitLabel; wxStaticText* m_staticText651; wxStaticText* m_ExtTrackResistValue; - wxStaticText* m_staticText84; + wxStaticText* m_extTrackResUnits; wxStaticText* m_staticText661; wxStaticText* m_ExtTrackVDropValue; wxStaticText* m_staticText83; @@ -348,10 +348,10 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER wxStaticLine* m_staticline10; wxStaticText* m_staticTextArea1; wxStaticText* m_IntTrackAreaValue; - wxStaticText* m_IntTrackAreaUnitLabel; + wxStaticText* m_intTrackAreaUnitLabel; wxStaticText* m_staticText6511; wxStaticText* m_IntTrackResistValue; - wxStaticText* m_staticText841; + wxStaticText* m_intTrackResUnits; wxStaticText* m_staticText6611; wxStaticText* m_IntTrackVDropValue; wxStaticText* m_staticText831; diff --git a/pcb_calculator/eserie_help.h b/pcb_calculator/eserie_help.h index d9fe911c0c..5053211f31 100644 --- a/pcb_calculator/eserie_help.h +++ b/pcb_calculator/eserie_help.h @@ -9,7 +9,7 @@ _HKI( "E-series defined in IEC 60063 are a widely accepted system of preferred\n " E1: 1.0 - - - - - - - - - - -\n" "\n" "This calculator finds combinations of standard E-series components to\n" -"create arbitrary values. You can enter the required resistance from 0,0025 to 4000 kOhm.\n" +"create arbitrary values. You can enter the required resistance from 0.0025 to 4000 kΩ.\n" "Solutions using up to 4 components are given.\n" "\n" "By default, the request value is always excluded from the solution set. It is also possible to specify\n" diff --git a/pcb_calculator/eserie_help.md b/pcb_calculator/eserie_help.md index 56659c8f17..91c7e6a912 100644 --- a/pcb_calculator/eserie_help.md +++ b/pcb_calculator/eserie_help.md @@ -8,7 +8,7 @@ equally spaced in a logarithmic scale. E1: 1.0 - - - - - - - - - - - This calculator finds combinations of standard E-series components to -create arbitrary values. You can enter the required resistance from 0,0025 to 4000 kOhm. +create arbitrary values. You can enter the required resistance from 0.0025 to 4000 kΩ. Solutions using up to 4 components are given. By default, the request value is always excluded from the solution set. It is also possible to specify diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index ef6ac3a6e4..fbd5790f49 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -80,6 +80,32 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : infoFont.SetSymbolicSize( wxFONTSIZE_SMALL ); m_staticTextAttMsg->SetFont( infoFont ); + m_IadjUnitLabel->SetLabel( wxT( "µA" ) ); + + m_attZinUnit->SetLabel( wxT( "Ω" ) ); + m_attZoutUnit->SetLabel( wxT( "Ω" ) ); + m_attR1Unit->SetLabel( wxT( "Ω" ) ); + m_attR2Unit->SetLabel( wxT( "Ω" ) ); + m_attR3Unit->SetLabel( wxT( "Ω" ) ); + + m_r1Units->SetLabel( wxT( "kΩ" ) ); + m_r2Units->SetLabel( wxT( "kΩ" ) ); + + m_reqResUnits->SetLabel( wxT( "kΩ" ) ); + m_exclude1Units->SetLabel( wxT( "kΩ" ) ); + m_exclude2Units->SetLabel( wxT( "kΩ" ) ); + + m_trackTempUnits->SetLabel( wxT( "ºC" ) ); + m_resistivityUnits->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( "Ω" ) ); + LoadSettings( config() ); ReadDataFile(); @@ -150,6 +176,7 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event ) if( m_Notebook->GetSelection() != m_lastNotebookPage ) { // Kick all the things that wxWidgets can't seem to redraw on its own. + // This is getting seriously ridiculous.... wxCommandEvent event2( wxEVT_RADIOBUTTON ); event2.SetEventObject( m_TranslineSelection ); @@ -174,6 +201,9 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event ) m_bitmapRegul3pins->SetBitmap( KiBitmap( regul_3pins_xpm ) ); m_bitmapRegul4pins->SetBitmap( KiBitmap( regul_xpm ) ); + m_attenuatorBitmap->GetParent()->Layout(); + m_attenuatorBitmap->GetParent()->Refresh(); + m_panelESeriesHelp->Refresh(); m_htmlWinFormulas->Refresh(); diff --git a/pcb_calculator/tracks_width_versus_current.cpp b/pcb_calculator/tracks_width_versus_current.cpp index 1ab43b4a07..bf6527023f 100644 --- a/pcb_calculator/tracks_width_versus_current.cpp +++ b/pcb_calculator/tracks_width_versus_current.cpp @@ -264,11 +264,11 @@ void PCB_CALCULATOR_FRAME::TWDisplayValues( double aCurrent, double aExtWidth, // Show area units. wxString strunit = m_TW_ExtTrackWidth_choiceUnit->GetUnitName(); - msg = strunit + wxT( " x " ) + strunit; - m_ExtTrackAreaUnitLabel->SetLabel( msg ); + msg = strunit + wxT( "²" ); + m_extTrackAreaUnitLabel->SetLabel( msg ); strunit = m_TW_IntTrackWidth_choiceUnit->GetUnitName(); - msg = strunit + wxT( " x " ) + strunit; - m_IntTrackAreaUnitLabel->SetLabel( msg ); + msg = strunit + wxT( "²" ); + m_intTrackAreaUnitLabel->SetLabel( msg ); // Load resistivity and length of traces. double rho = std::abs( DoubleFromString( m_TWResistivity->GetValue() ) ); diff --git a/pcb_calculator/tracks_width_versus_current_formula.h b/pcb_calculator/tracks_width_versus_current_formula.h index 0d7056fda9..f3dcf38429 100644 --- a/pcb_calculator/tracks_width_versus_current_formula.h +++ b/pcb_calculator/tracks_width_versus_current_formula.h @@ -5,13 +5,13 @@ _HKI( "If you specify the maximum current, then the trace widths will be calcula "\n" "The controlling value is shown in bold.\n" "\n" -"The calculations are valid for currents up to 35A (external) or 17.5A (internal), temperature rises up to 100 deg C, and widths of up to 400mil (10mm).\n" +"The calculations are valid for currents up to 35 A (external) or 17.5 A (internal), temperature rises up to 100 ºC, and widths of up to 400 mil (10 mm).\n" "\n" "The formula, from IPC 2221, is\n" "
__I = K * dT0.44 * (W*H)0.725__
\n" "where: \n" -"__I__ = maximum current in amps \n" -"__dt__ = temperature rise above ambient in deg C \n" +"__I__ = maximum current in A \n" +"__dt__ = temperature rise above ambient in ºC \n" "__W,H__ = width and thickness in mils \n" "__K__ = 0.024 for internal traces or 0.048 for external traces\n" "" ); diff --git a/pcb_calculator/tracks_width_versus_current_formula.md b/pcb_calculator/tracks_width_versus_current_formula.md index 3578d7cd56..390614d308 100644 --- a/pcb_calculator/tracks_width_versus_current_formula.md +++ b/pcb_calculator/tracks_width_versus_current_formula.md @@ -4,12 +4,12 @@ If you specify one of the trace widths, the maximum current it can handle will b The controlling value is shown in bold. -The calculations are valid for currents up to 35A (external) or 17.5A (internal), temperature rises up to 100 deg C, and widths of up to 400mil (10mm). +The calculations are valid for currents up to 35 A (external) or 17.5 A (internal), temperature rises up to 100 ºC, and widths of up to 400 mil (10 mm). The formula, from IPC 2221, is
__I = K * dT0.44 * (W*H)0.725__
where: -__I__ = maximum current in amps -__dt__ = temperature rise above ambient in deg C +__I__ = maximum current in A +__dt__ = temperature rise above ambient in ºC __W,H__ = width and thickness in mils __K__ = 0.024 for internal traces or 0.048 for external traces diff --git a/pcb_calculator/widgets/unit_selector.cpp b/pcb_calculator/widgets/unit_selector.cpp index 509427dc4d..814a14b0c3 100644 --- a/pcb_calculator/widgets/unit_selector.cpp +++ b/pcb_calculator/widgets/unit_selector.cpp @@ -126,8 +126,8 @@ UNIT_SELECTOR_ANGLE::UNIT_SELECTOR_ANGLE( wxWindow *parent, wxWindowID id, const wxArrayString& choices, long style ) : UNIT_SELECTOR( parent, id, pos, size, choices, style ) { - Append( _( "Radian" ) ); - Append( _( "Degree" ) ); + Append( _( "rad" ) ); + Append( _( "deg" ) ); } /*