diff --git a/pcb_calculator/attenuators/pi_formula.h b/pcb_calculator/attenuators/pi_formula.h
index fdc7cfdd20..f6730075da 100644
--- a/pcb_calculator/attenuators/pi_formula.h
+++ b/pcb_calculator/attenuators/pi_formula.h
@@ -1,5 +1,5 @@
// 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"
diff --git a/pcb_calculator/attenuators/pi_formula.md b/pcb_calculator/attenuators/pi_formula.md
index 103325c43b..8f19d4dc2c 100644
--- a/pcb_calculator/attenuators/pi_formula.md
+++ b/pcb_calculator/attenuators/pi_formula.md
@@ -1,4 +1,4 @@
-## Pi attenuator
+### Pi attenuator
__Zin__ desired input impedance in Ω
__Zout__ desired output impedance
__Zin = Zout__
diff --git a/pcb_calculator/attenuators/splitter_formula.h b/pcb_calculator/attenuators/splitter_formula.h
index 43f18cb798..0c822daf94 100644
--- a/pcb_calculator/attenuators/splitter_formula.h
+++ b/pcb_calculator/attenuators/splitter_formula.h
@@ -1,6 +1,6 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
-_HKI( "## Splitted attenuator\n"
-"### Attenuation is 6dB\n"
+_HKI( "### Split attenuator\n"
+"#### Attenuation is 6dB\n"
"___Zin ___ desired input impedance in Ω \n"
"___Zout ___ desired output impedance in Ω \n"
"___Zin = Zout ___\n"
diff --git a/pcb_calculator/attenuators/splitter_formula.md b/pcb_calculator/attenuators/splitter_formula.md
index 26b0323384..471fd16192 100644
--- a/pcb_calculator/attenuators/splitter_formula.md
+++ b/pcb_calculator/attenuators/splitter_formula.md
@@ -1,5 +1,5 @@
-## Splitted attenuator
-### Attenuation is 6dB
+### Split attenuator
+#### Attenuation is 6dB
___Zin ___ desired input impedance in Ω
___Zout ___ desired output impedance in Ω
___Zin = Zout ___
diff --git a/pcb_calculator/attenuators/tee_formula.h b/pcb_calculator/attenuators/tee_formula.h
index f992d6c385..672442f770 100644
--- a/pcb_calculator/attenuators/tee_formula.h
+++ b/pcb_calculator/attenuators/tee_formula.h
@@ -1,5 +1,5 @@
// 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"
diff --git a/pcb_calculator/attenuators/tee_formula.md b/pcb_calculator/attenuators/tee_formula.md
index bcbe8c4ffd..e350021b40 100644
--- a/pcb_calculator/attenuators/tee_formula.md
+++ b/pcb_calculator/attenuators/tee_formula.md
@@ -1,4 +1,4 @@
-## Tee attenuator
+### Tee attenuator
__Zin__ desired input impedance in Ω
__Zout__ desired output impedance
__Zin = Zout__
diff --git a/pcb_calculator/bitmaps/via.xpm b/pcb_calculator/bitmaps/via_dims.xpm
similarity index 99%
rename from pcb_calculator/bitmaps/via.xpm
rename to pcb_calculator/bitmaps/via_dims.xpm
index a287ab19f3..cdfc4e2175 100644
--- a/pcb_calculator/bitmaps/via.xpm
+++ b/pcb_calculator/bitmaps/via_dims.xpm
@@ -1,5 +1,5 @@
/* XPM */
-const static char *via_xpm[] = {
+const static char *via_dims_xpm[] = {
"175 176 874 2",
" c None",
". c #FFFFFF",
diff --git a/pcb_calculator/board_classes_values.cpp b/pcb_calculator/board_classes_values.cpp
index 0e13eb3ba5..92c84d2803 100644
--- a/pcb_calculator/board_classes_values.cpp
+++ b/pcb_calculator/board_classes_values.cpp
@@ -130,8 +130,5 @@ void PCB_CALCULATOR_FRAME::BoardClassesUpdateData( double aUnitScale )
txt = NOVAL;
m_gridClassesValuesDisplay->SetCellValue(4, ii, txt );
}
-
- m_gridClassesValuesDisplay->SetRowLabelSize( wxGRID_AUTOSIZE );
- m_gridClassesValuesDisplay->AutoSize();
}
diff --git a/pcb_calculator/colorcode.cpp b/pcb_calculator/colorcode.cpp
index b1192aefbd..9543fece7d 100644
--- a/pcb_calculator/colorcode.cpp
+++ b/pcb_calculator/colorcode.cpp
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2011 jean-pierre.charras
- * Copyright (C) 2011 Kicad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2011-2021 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -19,10 +19,22 @@
*/
#include
-#include
-
+#include "bitmaps/color_code_value_and_name.xpm"
+#include "bitmaps/color_code_value.xpm"
+#include "bitmaps/color_code_multiplier.xpm"
+#include "bitmaps/color_code_tolerance.xpm"
#include "pcb_calculator_frame.h"
+
+void PCB_CALCULATOR_FRAME::initColorCodePanel()
+{
+ m_ccValueNamesBitmap = new wxBitmap( color_code_value_and_name_xpm );
+ m_ccValuesBitmap = new wxBitmap( color_code_value_xpm );
+ m_ccMultipliersBitmap = new wxBitmap( color_code_multiplier_xpm );
+ m_ccTolerancesBitmap = new wxBitmap( color_code_tolerance_xpm );
+}
+
+
void PCB_CALCULATOR_FRAME::OnToleranceSelection( wxCommandEvent& event )
{
ToleranceSelection( event.GetSelection() );
@@ -34,27 +46,22 @@ void PCB_CALCULATOR_FRAME::ToleranceSelection( int aSelection )
/* For tolerance = 5 or 10 %, there are 3 bands for the value
* but for tolerance < 5 %, there are 4 bands
*/
- bool show4thBand;
- switch( aSelection )
- {
- case 0: // 5 or 10 %
- show4thBand = false;
- break;
- case 1: // < 5 %
- show4thBand = true;
- break;
- default: // Show 4th band if something went wrong
- show4thBand = true;
- break;
- }
- bool oldstate = m_Band4Label->IsShown();
- if( oldstate != show4thBand )
- {
- m_Band4bitmap->Show(show4thBand);
- m_Band4Label->Show(show4thBand);
- // m_Band4Label visibility has changed:
- // The new size must be taken in account
- m_panelColorCode->GetSizer()->Layout();
- m_panelColorCode->Refresh();
- }
+ bool show4thBand = aSelection != 0;
+
+ m_Band4bitmap->Show(show4thBand);
+ m_Band4Label->Show(show4thBand);
+
+ // m_Band4Label visibility has changed:
+ // The new size must be taken in account
+ m_panelColorCode->GetSizer()->Layout();
+
+ // All this shouldn't be necessary but if you want the bitmaps to show up on OSX it is.
+ m_Band1bitmap->SetBitmap( *m_ccValueNamesBitmap );
+ m_Band2bitmap->SetBitmap( *m_ccValuesBitmap );
+ m_Band3bitmap->SetBitmap( *m_ccValuesBitmap );
+ m_Band4bitmap->SetBitmap( *m_ccValuesBitmap );
+ m_Band_mult_bitmap->SetBitmap( *m_ccMultipliersBitmap );
+ m_Band_tol_bitmap->SetBitmap( *m_ccTolerancesBitmap );
+
+ m_panelColorCode->Refresh();
}
\ No newline at end of file
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
index d181da86c3..e34875edc1 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
@@ -11,7 +11,6 @@
#include "../bitmaps/regul.xpm"
#include "../bitmaps/regul_3pins.xpm"
-#include "../bitmaps/via.xpm"
///////////////////////////////////////////////////////////////////////////
@@ -170,7 +169,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
- bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND|wxALL, 5 );
+ bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
wxBoxSizer* bSizerRegulButtonCalcReset;
bSizerRegulButtonCalcReset = new wxBoxSizer( wxHORIZONTAL );
@@ -199,7 +198,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
wxArrayString m_choiceRegulatorSelectorChoices;
m_choiceRegulatorSelector = new wxChoice( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegulatorSelectorChoices, 0 );
m_choiceRegulatorSelector->SetSelection( 0 );
- sbSizerRegulatorsChooser->Add( m_choiceRegulatorSelector, 0, wxALL|wxEXPAND, 5 );
+ sbSizerRegulatorsChooser->Add( m_choiceRegulatorSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextRegFile = new wxStaticText( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Regulators data file:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRegFile->Wrap( -1 );
@@ -241,14 +240,14 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
sbSizerRegulatorsChooser->Add( bSizerReulBtn, 1, wxEXPAND, 5 );
- bSizerRegulRight->Add( sbSizerRegulatorsChooser, 0, wxEXPAND|wxRIGHT, 5 );
+ bSizerRegulRight->Add( sbSizerRegulatorsChooser, 0, wxEXPAND|wxRIGHT, 10 );
m_RegulMessage = new wxStaticText( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_RegulMessage->Wrap( -1 );
bSizerRegulRight->Add( m_RegulMessage, 0, wxALL, 5 );
- bSizerMainReg->Add( bSizerRegulRight, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
+ bSizerMainReg->Add( bSizerRegulRight, 1, wxEXPAND|wxTOP|wxLEFT, 10 );
m_panelRegulators->SetSizer( bSizerMainReg );
@@ -1138,11 +1137,14 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
wxBoxSizer* bSizerViaSize;
bSizerViaSize = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizerViaLeftColumn;
+ bSizerViaLeftColumn = new wxBoxSizer( wxVERTICAL );
+
wxStaticBoxSizer* sbSizerVS_Inputs;
sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Parameters") ), wxVERTICAL );
wxFlexGridSizer* fgSizerVS_Inputs;
- fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 4, 0 );
fgSizerVS_Inputs->AddGrowableCol( 1 );
fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH );
fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -1154,24 +1156,24 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerVS_Inputs->Add( m_staticTextHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlHoleDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceHoleDiaChoices;
m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 );
m_choiceHoleDia->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choiceHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_choiceHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating thickness (T):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPlatingThickness->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticTextPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_textCtrlPlatingThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choicePlatingThicknessChoices;
m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 );
m_choicePlatingThickness->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choicePlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+ fgSizerVS_Inputs->Add( m_choicePlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextViaLength->Wrap( -1 );
@@ -1180,12 +1182,12 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerVS_Inputs->Add( m_staticTextViaLength, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlViaLength = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceViaLengthChoices;
m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 );
m_choiceViaLength->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choiceViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_choiceViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad diameter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextViaPadDia->Wrap( -1 );
@@ -1194,12 +1196,12 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerVS_Inputs->Add( m_staticTextViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlViaPadDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceViaPadDiaChoices;
m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 );
m_choiceViaPadDia->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choiceViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_choiceViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole diameter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextClearanceDia->Wrap( -1 );
@@ -1208,12 +1210,12 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerVS_Inputs->Add( m_staticTextClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlClearanceDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceClearanceDiaChoices;
m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 );
m_choiceClearanceDia->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choiceClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_choiceClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextImpedance->Wrap( -1 );
@@ -1222,86 +1224,107 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizerVS_Inputs->Add( m_staticTextImpedance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlImpedance = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceImpedanceChoices;
m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 );
m_choiceImpedance->SetSelection( 0 );
- fgSizerVS_Inputs->Add( m_choiceImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_choiceImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticAppliedCurrent->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlAppliedCurrent = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAppliedCurrentUnits->Wrap( -1 );
- fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity (Ohm.m):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextResistivity->Wrap( -1 );
m_staticTextResistivity->SetToolTip( _("Specific resistance in ohms * meters") );
- fgSizerVS_Inputs->Add( m_staticTextResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_textCtrlPlatingResistivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlPlatingResistivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ 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|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Er:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPermittivity->Wrap( -1 );
m_staticTextPermittivity->SetToolTip( _("Relative dielectric constant (epsilon r)") );
- fgSizerVS_Inputs->Add( m_staticTextPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_textCtrlPlatingPermittivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlPlatingPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ 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|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTemperatureDiff->Wrap( -1 );
m_staticTextTemperatureDiff->SetToolTip( _("Maximum acceptable rise in temperature") );
- fgSizerVS_Inputs->Add( m_staticTextTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_textCtrlTemperatureDiff = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ 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|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextTemperatureUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTime->Wrap( -1 );
m_staticTextRiseTime->SetToolTip( _("Pulse rise time to calculate reactance") );
- fgSizerVS_Inputs->Add( m_staticTextRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_textCtrlRiseTime = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerVS_Inputs->Add( m_textCtrlRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+ fgSizerVS_Inputs->Add( m_textCtrlRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTimeUnits->Wrap( -1 );
m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") );
- fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 );
- m_bitmap10 = new wxStaticBitmap( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxBitmap( via_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmap10->SetToolTip( _("Top view of via") );
- sbSizerVS_Inputs->Add( m_bitmap10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+ bSizerViaLeftColumn->Add( sbSizerVS_Inputs, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_panelViaBitmap = new wxPanel( m_panelViaSize, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelViaBitmap->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNHIGHLIGHT ) );
+
+ wxBoxSizer* bSizer143;
+ bSizer143 = new wxBoxSizer( wxVERTICAL );
- bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 );
+ bSizer143->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_viaBitmap = new wxStaticBitmap( m_panelViaBitmap, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_viaBitmap->SetToolTip( _("Top view of via") );
+
+ bSizer143->Add( m_viaBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 );
+
+
+ bSizer143->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ m_panelViaBitmap->SetSizer( bSizer143 );
+ m_panelViaBitmap->Layout();
+ bSizer143->Fit( m_panelViaBitmap );
+ bSizerViaLeftColumn->Add( m_panelViaBitmap, 1, wxEXPAND | wxALL, 8 );
+
+
+ bSizerViaSize->Add( bSizerViaLeftColumn, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
@@ -1312,6 +1335,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
wxFlexGridSizer* fgSizerTW_Results11;
fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerTW_Results11->AddGrowableCol( 1 );
+ fgSizerTW_Results11->AddGrowableCol( 2 );
fgSizerTW_Results11->SetFlexibleDirection( wxBOTH );
fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -1447,7 +1471,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_staticTextWarning->Wrap( -1 );
m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
- sbSizerVS_Result->Add( m_staticTextWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ sbSizerVS_Result->Add( m_staticTextWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bSizerRight->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 );
@@ -1532,8 +1556,8 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
bSizeLeft->Add( sbSizerTW_Prms, 0, wxALL|wxEXPAND, 5 );
- m_htmlWinFormulas = new wxHtmlWindow( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE );
- bSizeLeft->Add( m_htmlWinFormulas, 1, wxEXPAND|wxLEFT|wxTOP, 5 );
+ m_htmlWinFormulas = new wxHtmlWindow( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO );
+ bSizeLeft->Add( m_htmlWinFormulas, 1, wxEXPAND|wxALL, 8 );
bSizerTrackWidth->Add( bSizeLeft, 1, wxEXPAND, 5 );
@@ -1749,23 +1773,23 @@ 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, wxALL|wxEXPAND, 5 );
+ bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxTOP|wxBOTTOM, 20 );
m_staticline2 = new wxStaticLine( m_panelElectricalSpacing, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
+ bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_staticText891 = new wxStaticText( m_panelElectricalSpacing, wxID_ANY, _("Voltage > 500V:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText891->Wrap( -1 );
- bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP, 5 );
m_ElectricalSpacingVoltage = new wxTextCtrl( m_panelElectricalSpacing, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM, 5 );
m_buttonElectSpacingRefresh = new wxButton( m_panelElectricalSpacing, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 );
- bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxALL|wxEXPAND, 5 );
+ bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
- bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND, 5 );
+ bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxALL, 10 );
wxBoxSizer* bElectricalSpacingSizerRight;
bElectricalSpacingSizerRight = new wxBoxSizer( wxVERTICAL );
@@ -1786,6 +1810,13 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_gridElectricalSpacingValues->SetMargins( 0, 0 );
// Columns
+ m_gridElectricalSpacingValues->SetColSize( 0, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 1, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 2, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 3, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 4, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 5, 100 );
+ m_gridElectricalSpacingValues->SetColSize( 6, 100 );
m_gridElectricalSpacingValues->EnableDragColMove( false );
m_gridElectricalSpacingValues->EnableDragColSize( true );
m_gridElectricalSpacingValues->SetColLabelSize( 30 );
@@ -1799,18 +1830,27 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_gridElectricalSpacingValues->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
- m_gridElectricalSpacingValues->AutoSizeRows();
+ m_gridElectricalSpacingValues->SetRowSize( 0, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 1, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 2, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 3, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 4, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 5, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 6, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 7, 24 );
+ m_gridElectricalSpacingValues->SetRowSize( 8, 24 );
+ 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( 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->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
@@ -1818,14 +1858,14 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
// Cell Defaults
m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP );
- bElectricalSpacingSizerRight->Add( m_gridElectricalSpacingValues, 0, wxALL|wxEXPAND, 5 );
+ bElectricalSpacingSizerRight->Add( m_gridElectricalSpacingValues, 0, wxALL, 5 );
m_staticText88 = new wxStaticText( m_panelElectricalSpacing, wxID_ANY, _("* B1 - Internal Conductors\n* B2 - External Conductors, uncoated, sea level to 3050 m\n* B3 - External Conductors, uncoated, over 3050 m\n* B4 - External Conductors, with permanent polymer coating (any elevation)\n* A5 - External Conductors, with conformal coating over assembly (any elevation)\n* A6 - External Component lead/termination, uncoated\n* A7 - External Component lead termination, with conformal coating (any elevation)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText88->Wrap( -1 );
bElectricalSpacingSizerRight->Add( m_staticText88, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- bSizerElectricalClearance->Add( bElectricalSpacingSizerRight, 1, wxEXPAND, 5 );
+ bSizerElectricalClearance->Add( bElectricalSpacingSizerRight, 1, wxEXPAND|wxLEFT, 20 );
m_panelElectricalSpacing->SetSizer( bSizerElectricalClearance );
@@ -1836,10 +1876,16 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
wxBoxSizer* bSizerBoardClass;
bSizerBoardClass = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizerUnitsMargins;
+ bSizerUnitsMargins = new wxBoxSizer( wxVERTICAL );
+
wxArrayString m_BoardClassesUnitsSelectorChoices;
m_BoardClassesUnitsSelector = new UNIT_SELECTOR_LEN( m_panelBoardClass, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardClassesUnitsSelectorChoices, 0 );
m_BoardClassesUnitsSelector->SetSelection( 0 );
- bSizerBoardClass->Add( m_BoardClassesUnitsSelector, 0, wxALL, 5 );
+ bSizerUnitsMargins->Add( m_BoardClassesUnitsSelector, 0, wxTOP|wxBOTTOM|wxRIGHT, 32 );
+
+
+ bSizerBoardClass->Add( bSizerUnitsMargins, 0, wxLEFT, 10 );
wxBoxSizer* brdclsSizerRight;
brdclsSizerRight = new wxBoxSizer( wxVERTICAL );
@@ -1860,9 +1906,15 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_gridClassesValuesDisplay->SetMargins( 0, 0 );
// Columns
+ m_gridClassesValuesDisplay->SetColSize( 0, 100 );
+ m_gridClassesValuesDisplay->SetColSize( 1, 100 );
+ m_gridClassesValuesDisplay->SetColSize( 2, 100 );
+ m_gridClassesValuesDisplay->SetColSize( 3, 100 );
+ m_gridClassesValuesDisplay->SetColSize( 4, 100 );
+ m_gridClassesValuesDisplay->SetColSize( 5, 100 );
m_gridClassesValuesDisplay->EnableDragColMove( false );
m_gridClassesValuesDisplay->EnableDragColSize( true );
- m_gridClassesValuesDisplay->SetColLabelSize( 70 );
+ m_gridClassesValuesDisplay->SetColLabelSize( 30 );
m_gridClassesValuesDisplay->SetColLabelValue( 0, _("Class 1") );
m_gridClassesValuesDisplay->SetColLabelValue( 1, _("Class 2") );
m_gridClassesValuesDisplay->SetColLabelValue( 2, _("Class 3") );
@@ -1872,7 +1924,11 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_gridClassesValuesDisplay->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
- m_gridClassesValuesDisplay->AutoSizeRows();
+ m_gridClassesValuesDisplay->SetRowSize( 0, 24 );
+ m_gridClassesValuesDisplay->SetRowSize( 1, 24 );
+ m_gridClassesValuesDisplay->SetRowSize( 2, 24 );
+ m_gridClassesValuesDisplay->SetRowSize( 3, 24 );
+ m_gridClassesValuesDisplay->SetRowSize( 4, 24 );
m_gridClassesValuesDisplay->EnableDragRowSize( false );
m_gridClassesValuesDisplay->SetRowLabelSize( 160 );
m_gridClassesValuesDisplay->SetRowLabelValue( 0, _("Lines width") );
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
index b5a7f25e5b..7a91407973 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
@@ -490,7 +490,7 @@
- 5
+ 10
wxEXPAND|wxTOP|wxLEFT
1
@@ -500,7 +500,7 @@
none
5
- wxEXPAND|wxALL
+ wxEXPAND|wxBOTTOM|wxRIGHT
0
4
@@ -1992,7 +1992,7 @@
- 5
+ 10
wxEXPAND|wxRIGHT
0
@@ -2005,7 +2005,7 @@
none
5
- wxALL|wxEXPAND
+ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT
0
1
@@ -12615,11 +12615,11 @@
-
+
Via Size
0
-
+
1
1
1
@@ -12670,2151 +12670,2162 @@
wxTAB_TRAVERSAL
-
+
bSizerViaSize
wxHORIZONTAL
none
-
+
5
- wxEXPAND|wxALL
+ wxEXPAND
1
-
- wxID_ANY
- Parameters
+
- sbSizerVS_Inputs
+ bSizerViaLeftColumn
wxVERTICAL
- 1
none
-
+
5
- wxEXPAND
+ wxEXPAND|wxTOP|wxRIGHT|wxLEFT
0
-
- 3
- wxBOTH
- 1
-
- 0
+
+ wxID_ANY
+ Parameters
- fgSizerVS_Inputs
- wxFLEX_GROWMODE_SPECIFIED
+ sbSizerVS_Inputs
+ wxVERTICAL
+ 1
none
- 0
- 0
5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ wxEXPAND
0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
- ,90,90,-1,70,0
- 0
- 0
- wxID_ANY
- Finished hole diameter (D):
- 0
-
- 0
-
-
- 0
+
+ 3
+ wxBOTH
+ 1
+
+ 0
- 1
- m_staticTextHoleDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlHoleDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choiceHoleDia
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Plating thickness (T):
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextPlatingThickness
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlPlatingThickness
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choicePlatingThickness
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Via length:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextViaLength
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Via length is the board thickness for through hole vias
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlViaLength
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choiceViaLength
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Via pad diameter:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextViaPadDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Diameter of pad surrounding via (annular ring)
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlViaPadDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choiceViaPadDia
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Clearance hole diameter:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextClearanceDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Diameter of clearance hole in ground plane(s)
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlClearanceDia
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choiceClearanceDia
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Z0:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextImpedance
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Characteristic impedance of conductor
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlImpedance
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_choiceImpedance
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Applied current:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticAppliedCurrent
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlAppliedCurrent
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- A
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextAppliedCurrentUnits
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Plating resistivity (Ohm.m):
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextResistivity
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Specific resistance in ohms * meters
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlPlatingResistivity
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
-
- 0
- 0
-
- Dock
- 0
- Left
- 1
-
- 1
-
-
- 0
- 0
- wxID_ANY
- ...
-
- 0
-
- 0
-
-
- 0
-
- 1
- m_button_ResistivityVia
- 1
-
-
- protected
- 1
-
-
-
- Resizable
- 1
-
- wxBU_EXACTFIT
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaRho_Button
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Er:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextPermittivity
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Relative dielectric constant (epsilon r)
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlPlatingPermittivity
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
-
- 0
- 0
-
- Dock
- 0
- Left
- 1
-
- 1
-
-
- 0
- 0
- wxID_ANY
- ...
-
- 0
-
- 0
-
-
- 0
-
- 1
- m_button_Permittivity
- 1
-
-
- protected
- 1
-
-
-
- Resizable
- 1
-
- wxBU_EXACTFIT
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnViaEpsilonR_Button
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Temperature rise:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextTemperatureDiff
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Maximum acceptable rise in temperature
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlTemperatureDiff
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- deg C
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextTemperatureUnits
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Pulse rise time:
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextRiseTime
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Pulse rise time to calculate reactance
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_textCtrlRiseTime
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
- OnViaCalculate
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- ns
- 0
-
- 0
-
-
- 0
-
- 1
- m_staticTextRiseTimeUnits
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- nanoseconds
-
-
-
- -1
+ fgSizerVS_Inputs
+ wxFLEX_GROWMODE_SPECIFIED
+ none
+ 0
+ 4
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+ ,90,90,-1,70,0
+ 0
+ 0
+ wxID_ANY
+ Finished hole diameter (D):
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextHoleDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlHoleDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choiceHoleDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Plating thickness (T):
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextPlatingThickness
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlPlatingThickness
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choicePlatingThickness
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Via length:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextViaLength
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Via length is the board thickness for through hole vias
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlViaLength
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choiceViaLength
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Via pad diameter:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextViaPadDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Diameter of pad surrounding via (annular ring)
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlViaPadDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choiceViaPadDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Clearance hole diameter:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextClearanceDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Diameter of clearance hole in ground plane(s)
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlClearanceDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choiceClearanceDia
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Z0:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextImpedance
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Characteristic impedance of conductor
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlImpedance
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_choiceImpedance
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Applied current:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticAppliedCurrent
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlAppliedCurrent
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ A
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextAppliedCurrentUnits
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Plating resistivity (Ohm.m):
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextResistivity
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Specific resistance in ohms * meters
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlPlatingResistivity
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+
+ 0
+ 0
+
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+
+ 0
+ 0
+ wxID_ANY
+ ...
+
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_button_ResistivityVia
+ 1
+
+
+ protected
+ 1
+
+
+
+ Resizable
+ 1
+
+ wxBU_EXACTFIT
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaRho_Button
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Er:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextPermittivity
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Relative dielectric constant (epsilon r)
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlPlatingPermittivity
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+
+ 0
+ 0
+
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+
+ 0
+ 0
+ wxID_ANY
+ ...
+
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_button_Permittivity
+ 1
+
+
+ protected
+ 1
+
+
+
+ Resizable
+ 1
+
+ wxBU_EXACTFIT
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnViaEpsilonR_Button
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Temperature rise:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextTemperatureDiff
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Maximum acceptable rise in temperature
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlTemperatureDiff
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ deg C
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextTemperatureUnits
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Pulse rise time:
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextRiseTime
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Pulse rise time to calculate reactance
+
+
+
+ -1
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_textCtrlRiseTime
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnViaCalculate
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ ns
+ 0
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextRiseTimeUnits
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ nanoseconds
+
+
+
+ -1
+
+
-
- 5
- wxALIGN_CENTER_HORIZONTAL|wxALL
- 0
-
+
+ 8
+ wxEXPAND | wxALL
+ 1
+
1
1
1
@@ -14824,8 +14835,7 @@
-
- Load From File; ../bitmaps/via.xpm
+ wxSYS_COLOUR_BTNHIGHLIGHT
1
0
@@ -14850,7 +14860,7 @@
0
1
- m_bitmap10
+ m_panelViaBitmap
1
@@ -14862,10 +14872,94 @@
; ; forward_declare
0
- Top view of via
+
-
+ wxTAB_TRAVERSAL
+
+
+ bSizer143
+ wxVERTICAL
+ none
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
+ 10
+ wxALIGN_CENTER_HORIZONTAL|wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_viaBitmap
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ ; ; forward_declare
+ 0
+ Top view of via
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
@@ -14898,7 +14992,7 @@
3
wxBOTH
- 1
+ 1,2
0
@@ -16568,7 +16662,7 @@
5
- wxALL|wxALIGN_CENTER_HORIZONTAL
+ wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND
0
1
@@ -17562,8 +17656,8 @@
- 5
- wxEXPAND|wxLEFT|wxTOP
+ 8
+ wxEXPAND|wxALL
1
1
@@ -17616,7 +17710,7 @@
- wxBORDER_SIMPLE
+
@@ -20174,11 +20268,11 @@
-
+
Electrical Spacing
0
-
+
1
1
1
@@ -20229,23 +20323,23 @@
wxTAB_TRAVERSAL
-
+
bSizerElectricalClearance
wxHORIZONTAL
none
-
- 5
- wxEXPAND
+
+ 10
+ wxEXPAND|wxALL
0
-
+
bLeftSizerElectricalClearance
wxVERTICAL
none
- 5
- wxALL|wxEXPAND
+ 20
+ wxEXPAND|wxTOP|wxBOTTOM
0
1
@@ -20310,7 +20404,7 @@
5
- wxEXPAND | wxALL
+ wxEXPAND|wxTOP|wxBOTTOM
0
1
@@ -20368,7 +20462,7 @@
5
- wxTOP|wxRIGHT|wxLEFT
+ wxTOP
0
1
@@ -20429,7 +20523,7 @@
5
- wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT
+ wxEXPAND|wxBOTTOM
0
1
@@ -20493,7 +20587,7 @@
5
- wxALL|wxEXPAND
+ wxEXPAND|wxTOP|wxBOTTOM
0
1
@@ -20566,11 +20660,11 @@
-
- 5
- wxEXPAND
+
+ 20
+ wxEXPAND|wxLEFT
1
-
+
bElectricalSpacingSizerRight
wxVERTICAL
@@ -20638,7 +20732,7 @@
5
- wxALL|wxEXPAND
+ wxALL
0
1
@@ -20650,7 +20744,7 @@
0
- 1
+ 0
@@ -20667,7 +20761,7 @@
"B1" "B2" "B3" "B4" "A5" "A6" "A7"
wxALIGN_CENTER
7
-
+ 100,100,100,100,100,100,100
1
0
@@ -20710,9 +20804,9 @@
Resizable
wxALIGN_RIGHT
100
- "0 ... 15V" "16 ... 30V" "31 ... 50V" "51 ... 100V" "101 ... 150V" "151 ... 170V" "171 ... 250V" "251 ... 300V" "301 ... 500V" " > 500V"
+ "0 .. 15V" "16 .. 30V" "31 .. 50V" "51 .. 100V" "101 .. 150V" "151 .. 170V" "171 .. 250V" "251 .. 300V" "301 .. 500V" " > 500V"
wxALIGN_CENTER
-
+ 24,24,24,24,24,24,24,24,24,24
10
1
@@ -20790,11 +20884,11 @@
-
+
Board Classes
0
-
+
1
1
1
@@ -20845,74 +20939,85 @@
wxTAB_TRAVERSAL
-
+
bSizerBoardClass
wxHORIZONTAL
none
-
- 5
- wxALL
+
+ 10
+ wxLEFT
0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
-
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
+
- 1
- m_BoardClassesUnitsSelector
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
-
- UNIT_SELECTOR_LEN; widgets/unit_selector.h
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnBoardClassesUnitsSelection
+ bSizerUnitsMargins
+ wxVERTICAL
+ none
+
+ 32
+ wxTOP|wxBOTTOM|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_BoardClassesUnitsSelector
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+
+ UNIT_SELECTOR_LEN; widgets/unit_selector.h
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnBoardClassesUnitsSelection
+
+
@@ -20999,7 +21104,7 @@
0
- 1
+ 0
@@ -21012,11 +21117,11 @@
0
1
wxALIGN_CENTER
- 70
+ 30
"Class 1" "Class 2" "Class 3" "Class 4" "Class 5" "Class 6"
wxALIGN_CENTER
6
-
+ 100,100,100,100,100,100
1
0
@@ -21061,7 +21166,7 @@
160
"Lines width" "Min clearance" "Via: (diam - drill)" "Plated Pad: (diam - drill)" "NP Pad: (diam - drill)"
wxALIGN_CENTER
-
+ 24,24,24,24,24
5
1
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
index 66618f7942..39589163c0 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
@@ -280,7 +280,8 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
wxStaticText* m_staticTextRiseTime;
wxTextCtrl* m_textCtrlRiseTime;
wxStaticText* m_staticTextRiseTimeUnits;
- wxStaticBitmap* m_bitmap10;
+ wxPanel* m_panelViaBitmap;
+ wxStaticBitmap* m_viaBitmap;
wxStaticText* m_staticTextArea11;
wxStaticText* m_ViaResistance;
wxStaticText* m_IntTrackAreaUnitLabel1;
diff --git a/pcb_calculator/eserie.cpp b/pcb_calculator/eserie.cpp
index 57b3b64569..d896f2fec1 100644
--- a/pcb_calculator/eserie.cpp
+++ b/pcb_calculator/eserie.cpp
@@ -19,84 +19,68 @@
* with this program. If not, see .
*/
-#include
-#include "class_regulator_data.h"
-#include "attenuators/attenuator_classes.h"
-#include "pcb_calculator_frame.h"
-#include
-
+#include
#include
#include
#include
+#include
+#include "class_regulator_data.h"
+#include "pcb_calculator_frame.h"
+#include
+
#ifdef BENCHMARK
#include
#endif
-#include
-
#include "eserie.h"
-#include "profile.h"
+
wxString eseries_help =
#include "eserie_help.h"
- eserie r;
+eserie r;
-void eserie::set_reqR( double aR )
-{
- reqR = aR;
-}
-void eserie::set_rb( uint32_t a_rb )
-{
- rb_state = a_rb;
-}
-
-std::array eserie::get_rslt( void )
-{
- return results;
-}
-
-void eserie::exclude( double aValue )
+void eserie::Exclude( double aValue )
{
if( aValue ) // if there is a value to exclude other than a wire jumper
{
- for( r_data& i : luts[rb_state] ) // then search it in the selected E-Serie lookup table
+ for( r_data& i : luts[m_series] ) // then search it in the selected E-Serie lookup table
{
if( i.e_value == aValue ) // if value to exclude found
- {
i.e_use = false; // disable its use
- }
}
}
}
+
void eserie::simple_solution( uint32_t aSize )
{
uint32_t i;
- results[S2R].e_value = std::numeric_limits::max(); // assume no 2R solution or max deviation
+ m_results[S2R].e_value = std::numeric_limits::max(); // assume no 2R solution or max deviation
for( i = 0; i < aSize; i++ )
{
- if( abs( cmb_lut[i].e_value - reqR ) < abs( results[S2R].e_value ) )
+ if( abs( m_cmb_lut[i].e_value - m_required_value ) < abs( m_results[S2R].e_value ) )
{
- results[S2R].e_value = cmb_lut[i].e_value - reqR; // save signed deviation in Ohms
- results[S2R].e_name = cmb_lut[i].e_name; // save combination text
- results[S2R].e_use = true; // this is a possible solution
+ m_results[S2R].e_value = m_cmb_lut[i].e_value - m_required_value; // save signed deviation in Ohms
+ m_results[S2R].e_name = m_cmb_lut[i].e_name; // save combination text
+ m_results[S2R].e_use = true; // this is a possible solution
}
}
}
+
void eserie::combine4( uint32_t aSize )
{
uint32_t i,j;
double tmp;
std::string s;
- results[S4R].e_use = false; // disable 4R solution, until
- results[S4R].e_value = results[S3R].e_value; // 4R becomes better than 3R solution
+ m_results[S4R].e_use = false; // disable 4R solution, until
+ m_results[S4R].e_value = m_results[S3R].e_value; // 4R becomes better than 3R solution
#ifdef BENCHMARK
PROF_COUNTER combine4_timer; // start timer to count execution time
@@ -106,90 +90,84 @@ void eserie::combine4( uint32_t aSize )
{ // scan valid intermediate 2R solutions
for( j = 0; j < aSize; j++ ) // inner loop combines all with itself
{
- tmp = cmb_lut[i].e_value + cmb_lut[j].e_value; // calculate 2R+2R serial
- tmp -= reqR; // calculate 4R deviation
+ tmp = m_cmb_lut[i].e_value + m_cmb_lut[j].e_value; // calculate 2R+2R serial
+ tmp -= m_required_value; // calculate 4R deviation
- if( abs( tmp ) < abs( results[S4R].e_value ) ) // if new 4R is better
+ if( abs( tmp ) < abs( m_results[S4R].e_value ) ) // if new 4R is better
{
- results[S4R].e_value = tmp; // save amount of benefit
+ m_results[S4R].e_value = tmp; // save amount of benefit
std::string s = "( ";
- s.append( cmb_lut[i].e_name ); // mention 1st 2 component
+ s.append( m_cmb_lut[i].e_name ); // mention 1st 2 component
s.append( " ) + ( " ); // in series
- s.append( cmb_lut[j].e_name ); // with 2nd 2 components
+ s.append( m_cmb_lut[j].e_name ); // with 2nd 2 components
s.append( " )" );
- results[S4R].e_name = s; // save the result and
- results[S4R].e_use = true; // enable for later use
+ m_results[S4R].e_name = s; // save the result and
+ m_results[S4R].e_use = true; // enable for later use
}
- tmp = ( cmb_lut[i].e_value * cmb_lut[j].e_value ) /
- ( cmb_lut[i].e_value + cmb_lut[j].e_value ); // calculate 2R|2R parallel
- tmp -= reqR; // calculate 4R deviation
+ tmp = ( m_cmb_lut[i].e_value * m_cmb_lut[j].e_value ) /
+ ( m_cmb_lut[i].e_value + m_cmb_lut[j].e_value ); // calculate 2R|2R parallel
+ tmp -= m_required_value; // calculate 4R deviation
- if( abs( tmp ) < abs( results[S4R].e_value ) ) // if new 4R is better
+ if( abs( tmp ) < abs( m_results[S4R].e_value ) ) // if new 4R is better
{
- results[S4R].e_value = tmp; // save amount of benefit
+ m_results[S4R].e_value = tmp; // save amount of benefit
std::string s = "( ";
- s.append( cmb_lut[i].e_name ); // mention 1st 2 component
+ s.append( m_cmb_lut[i].e_name ); // mention 1st 2 component
s.append( " ) | ( " ); // in parallel
- s.append( cmb_lut[j].e_name ); // with 2nd 2 components
+ s.append( m_cmb_lut[j].e_name ); // with 2nd 2 components
s.append( " )" );
- results[S4R].e_name = s; // save the result
- results[S4R].e_use = true; // enable later use
+ m_results[S4R].e_name = s; // save the result
+ m_results[S4R].e_use = true; // enable later use
}
}
}
#ifdef BENCHMARK
- if( rb_state == E12 )
- {
+ if( m_series == E12 )
std::cout<<"4R Time = "<GetValue() ) );
- r.set_reqR(reqr); // keep a local copy of requred resistor value
- r.new_calc(); // assume all values available
+ r.SetRequiredValue( reqr ); // keep a local copy of requred resistor value
+ r.NewCalc(); // assume all values available
/*
* Exclude itself. For the case, a value from the available series is found as required value,
* the calculator assumes this value needs a replacement for the reason of being not available.
* Two further exclude values can be entered to exclude and are skipped as not being availabe.
* All values entered in KiloOhms are converted to Ohm for internal calculation
*/
- r.exclude( 1000 * DoubleFromString( m_ResRequired->GetValue() ) );
- r.exclude( 1000 * DoubleFromString( m_ResExclude1->GetValue() ) );
- r.exclude( 1000 * DoubleFromString( m_ResExclude2->GetValue() ) );
- r.calculate();
+ r.Exclude( 1000 * DoubleFromString( m_ResRequired->GetValue()));
+ r.Exclude( 1000 * DoubleFromString( m_ResExclude1->GetValue()));
+ r.Exclude( 1000 * DoubleFromString( m_ResExclude2->GetValue()));
+ r.Calculate();
fs = r.get_rslt()[S2R].e_name; // show 2R solution formula string
m_ESeries_Sol2R->SetValue( fs );
@@ -332,13 +314,9 @@ void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
if( error )
{
if( std::abs( error ) < 0.01 )
- {
es.Printf( "<%.2f", 0.01 );
- }
else
- {
es.Printf( "%+.2f",error);
- }
}
else
{
@@ -355,13 +333,9 @@ void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
if( err3 )
{
if( std::abs( err3 ) < 0.01 )
- {
es.Printf( "<%.2f", 0.01 );
- }
else
- {
es.Printf( "%+.2f",err3);
- }
}
else
{
@@ -389,13 +363,9 @@ void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
error = ( reqr / error - 1 ) * 100; // error in percent
if( error )
- {
es.Printf( "%+.2f",error );
- }
else
- {
es = _( "Exact" );
- }
m_ESeriesError4R->SetValue( es );
}
@@ -412,16 +382,16 @@ void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
void PCB_CALCULATOR_FRAME::OnESeriesSelection( wxCommandEvent& event )
{
if( event.GetEventObject() == m_e1 )
- r.set_rb( E1 );
+ r.SetSeries( E1 );
else if( event.GetEventObject() == m_e3 )
- r.set_rb( E3 );
+ r.SetSeries( E3 );
else if( event.GetEventObject() == m_e12 )
- r.set_rb( E12 );
+ r.SetSeries( E12 );
else
- r.set_rb( E6 );
+ r.SetSeries( E6 );
}
-void PCB_CALCULATOR_FRAME::ES_Init() // initialize ESeries tab at each pcb-calculator start
+void PCB_CALCULATOR_FRAME::initESeriesPanel() // initialize ESeries tab at each pcb-calculator start
{
wxString msg;
diff --git a/pcb_calculator/eserie.h b/pcb_calculator/eserie.h
index d3f0b56d0e..e007db89a1 100644
--- a/pcb_calculator/eserie.h
+++ b/pcb_calculator/eserie.h
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020
- * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -18,10 +18,6 @@
* with this program. If not, see .
*/
-/**
- * @file eserie.h
- */
-
extern double DoubleFromString( const wxString& TextValue );
/**
@@ -126,113 +122,114 @@ struct r_data {
class eserie
{
- private:
+public:
+ /**
+ * If any value of the selected E-serie not available, it can be entered as an exclude value.
+ *
+ * @param aValue is the value to exclude from calculation
+ * Values to exclude are set to false in the selected E-serie source lookup table
+ */
+ void Exclude( double aValue );
+
+ /**
+ * initialize next calculation and erase results from previous calculation
+ */
+ void NewCalc( void );
+
+ /**
+ * called on calculate button to execute all the 2R, 3R and 4R calculations
+ */
+ void Calculate( void );
+
+ /**
+ * Interface for CheckBox, RadioButton, RequriedResistor and calculated Results
+ */
+ void SetSeries( uint32_t aSeries ) { m_series = aSeries; }
+ void SetRequiredValue( double aValue ) { m_required_value = aValue; }
+
+ std::array get_rslt( void ) { return m_results; }
+
+private:
+ /**
+ * Build all 2R combinations from the selected E-serie values
+ *
+ * Pre-calculated value combinations are saved in intermediate look up table m_cmb_lut
+ * @return is the number of found combinations what also depends from exclude values
+ */
+ uint32_t combine2( void );
+
+ /**
+ * Search for closest two component solution
+ *
+ * @param aSize is the number of valid 2R combinations in m_cmb_lut on where to search
+ * The 2R result with smallest deviation will be saved in results
+ */
+ void simple_solution( uint32_t aSize );
+
+ /**
+ * Check if there is a better 3 R solution than previous one using only two components.
+ *
+ * @param aSize gives the number of available combinations to be checked inside m_cmb_lut
+ * Therefore m_cmb_lut is combinated with the primary E-serie look up table
+ * The 3R result with smallest deviation will be saved in results if better than 2R
+ */
+ void combine3( uint32_t aSize );
+
+ /**
+ * Check if there is a better four component solution.
+ *
+ * @param aSsize gives the number of 2R combinations to be checked inside m_cmb_lut
+ * Occupied calculation time depends from number of available E-serie values
+ * with the power of 4 why execution for E12 is conditional with 4R check box
+ * for the case the previously found 3R solution is already exact
+ */
+ void combine4( uint32_t aSize );
+
+ /*
+ * Strip redundant braces from three component result
+ *
+ * Example: R1+(R2+R3) become R1+R2+R3
+ * and R1|(R2|R3) become R1|R2|R3
+ * while R1+(R2|R3) or (R1+R2)|R3) remains untouched
+ */
+ void strip3( void );
+
+ /*
+ * Strip redundant braces from four component result
+ *
+ * Example: (R1+R2)+(R3+R4) become R1+R2+R3+R4
+ * and (R1|R2)|(R2|R3) become R1|R2|R3|R4
+ * while (R1+R2)|(R3+R4) remains untouched
+ */
+ void strip4( void );
+
+private:
std::vector> luts {
{ E1_VAL },
{ E1_VAL, E3_ADD },
{ E1_VAL, E3_ADD, E6_ADD },
{ E1_VAL, E3_ADD, E6_ADD, E12_ADD }
};
-/*
- * TODO: Manual array size calculation is dangerous. Unlike legacy ANSI-C Arrays
- * std::array can not drop length param by providing aggregate init list up
- * to C++17. Reserved array size should be 2*E12² of std::vector primary list.
- * Exceeding memory limit 7442 will crash the calculator without any warnings !
- * Compare to previous MAX_COMB macro for legacy ANSI-C array automatic solution
- * #define E12_SIZE sizeof ( e12_lut ) / sizeof ( r_data )
- * #define MAX_COMB (2 * E12_SIZE * E12_SIZE)
- * 2 component combinations including redundant swappable terms are for the moment
- * 72 combinations for E1
- * 512 combinations for E3
- * 1922 combinations for E6
- * 7442 combinations for E12
- */
+ /*
+ * TODO: Manual array size calculation is dangerous. Unlike legacy ANSI-C Arrays
+ * std::array can not drop length param by providing aggregate init list up
+ * to C++17. Reserved array size should be 2*E12² of std::vector primary list.
+ * Exceeding memory limit 7442 will crash the calculator without any warnings !
+ * Compare to previous MAX_COMB macro for legacy ANSI-C array automatic solution
+ * #define E12_SIZE sizeof ( e12_lut ) / sizeof ( r_data )
+ * #define MAX_COMB (2 * E12_SIZE * E12_SIZE)
+ * 2 component combinations including redundant swappable terms are for the moment
+ * 72 combinations for E1
+ * 512 combinations for E3
+ * 1922 combinations for E6
+ * 7442 combinations for E12
+ */
#define MAX_CMB 7442 // maximum combinations for E12
- std::array cmb_lut; // intermediate 2R combinations
- std::array results; // 2R, 3R and 4R results
- uint32_t rb_state = E6; // Radio Button State
- uint32_t cb_state = false; // Check Box 4R enable
- double reqR; // required Resistor
-
-/**
- * Build all 2R combinations from the selected E-serie values
- *
- * Pre-calculated value combinations are saved in intermediate look up table cmb_lut
- * @return is the number of found combinations what also depends from exclude values
-*/
- uint32_t combine2( void );
-
-/**
- * Search for closest two component solution
- *
- * @param aSize is the number of valid 2R combinations in cmb_lut on where to search
- * The 2R result with smallest deviation will be saved in results
-*/
- void simple_solution( uint32_t aSize );
-
-/**
- * Check if there is a better 3 R solution than previous one using only two components.
- *
- * @param aSize gives the number of available combinations to be checked inside cmb_lut
- * Therefore cmb_lut is combinated with the primary E-serie look up table
- * The 3R result with smallest deviation will be saved in results if better than 2R
- */
- void combine3( uint32_t aSize );
-
-/**
- * Check if there is a better four component solution.
- *
- * @param aSsize gives the number of 2R combinations to be checked inside cmb_lut
- * Occupied calculation time depends from number of available E-serie values
- * with the power of 4 why execution for E12 is conditional with 4R check box
- * for the case the previously found 3R solution is already exact
-*/
- void combine4( uint32_t aSize );
-
-/*
- * Strip redundant braces from three component result
- *
- * Example: R1+(R2+R3) become R1+R2+R3
- * and R1|(R2|R3) become R1|R2|R3
- * while R1+(R2|R3) or (R1+R2)|R3) remains untouched
- */
- void strip3( void );
-
-/*
- * Strip redundant braces from four component result
- *
- * Example: (R1+R2)+(R3+R4) become R1+R2+R3+R4
- * and (R1|R2)|(R2|R3) become R1|R2|R3|R4
- * while (R1+R2)|(R3+R4) remains untouched
- */
- void strip4( void );
-
-public:
-
-/**
- * If any value of the selected E-serie not available, it can be entered as an exclude value.
- *
- * @param aValue is the value to exclude from calculation
- * Values to exclude are set to false in the selected E-serie source lookup table
- */
- void exclude( double aValue );
-
-/**
- * initialize next calculation and erase results from previous calculation
- */
- void new_calc( void );
-
-/**
- * called on calculate button to execute all the 2R, 3R and 4R calculations
- */
- void calculate( void );
-
-/**
- * Interface for CheckBox, RadioButton, RequriedResistor and calculated Results
- */
- void set_rb ( uint32_t a_rb );
- void set_reqR ( double aR );
- std::array get_rslt ( void );
+ std::array m_cmb_lut; // intermediate 2R combinations
+ std::array m_results; // 2R, 3R and 4R results
+ uint32_t m_series = E6; // Radio Button State
+ uint32_t m_enable_4R = false; // Check Box 4R enable
+ double m_required_value; // required Resistor
};
diff --git a/pcb_calculator/eserie_help.h b/pcb_calculator/eserie_help.h
index 6dc3034c3e..f63c8d78bc 100644
--- a/pcb_calculator/eserie_help.h
+++ b/pcb_calculator/eserie_help.h
@@ -3,10 +3,10 @@ _HKI( "E-series defined in IEC 60063 are a widely accepted system of preferred\n
"numbers for electronic components. Available values are approximately\n"
"equally spaced in a logarithmic scale.\n"
"\n"
-" E12: 1,0 1,2 1,5 1,8 2,2 2,7 3,3 3,9 4,7 5,6 6,8 8,2\n"
-" E6: 1,0 - 1,5 - 2,2 - 3,3 - 4,7 - 6,8 -\n"
-" E3: 1,0 - - - 2,2 - - - 4,7 - - -\n"
-" E1: 1,0 - - - - - - - - - - -\n"
+" E12: 1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2\n"
+" E6: 1.0 - 1.5 - 2.2 - 3.3 - 4.7 - 6.8 -\n"
+" E3: 1.0 - - - 2.2 - - - 4.7 - - -\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"
diff --git a/pcb_calculator/eserie_help.md b/pcb_calculator/eserie_help.md
index 09b428354f..e62b8bb681 100644
--- a/pcb_calculator/eserie_help.md
+++ b/pcb_calculator/eserie_help.md
@@ -2,10 +2,10 @@ E-series defined in IEC 60063 are a widely accepted system of preferred
numbers for electronic components. Available values are approximately
equally spaced in a logarithmic scale.
- E12: 1,0 1,2 1,5 1,8 2,2 2,7 3,3 3,9 4,7 5,6 6,8 8,2
- E6: 1,0 - 1,5 - 2,2 - 3,3 - 4,7 - 6,8 -
- E3: 1,0 - - - 2,2 - - - 4,7 - - -
- E1: 1,0 - - - - - - - - - - -
+ E12: 1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2
+ E6: 1.0 - 1.5 - 2.2 - 3.3 - 4.7 - 6.8 -
+ E3: 1.0 - - - 2.2 - - - 4.7 - - -
+ 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.
diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp
index af2016881b..26a3f11260 100644
--- a/pcb_calculator/pcb_calculator_frame.cpp
+++ b/pcb_calculator/pcb_calculator_frame.cpp
@@ -22,10 +22,7 @@
#include
#include
#include
-#include "bitmaps/color_code_value_and_name.xpm"
-#include "bitmaps/color_code_value.xpm"
-#include "bitmaps/color_code_multiplier.xpm"
-#include "bitmaps/color_code_tolerance.xpm"
+#include "bitmaps/via_dims.xpm"
#include "attenuators/attenuator_classes.h"
#include "class_regulator_data.h"
#include "pcb_calculator_frame.h"
@@ -51,8 +48,9 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_TWMode = TW_MASTER_CURRENT;
m_TWNested = false;
- // TODO: make regulator bitmaps transparent so we can remove this
+ // TODO: make regulator & via bitmaps transparent so we can remove these
m_panelRegulatorBitmaps->SetBackgroundColour( *wxWHITE );
+ m_panelViaBitmap->SetBackgroundColour( *wxWHITE );
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
// some methods in code and avoid link errors
@@ -91,9 +89,10 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
TranslineTypeSelection( m_currTransLineType );
m_TranslineSelection->SetSelection( m_currTransLineType );
- TW_Init(); // Track Width
- VS_Init(); // Via Size
- ES_Init(); // E-Series
+ initTrackWidthPanel();
+ initColorCodePanel();
+ initViaSizePanel();
+ initESeriesPanel();
SetAttenuator( m_AttenuatorsSelection->GetSelection() );
@@ -137,6 +136,11 @@ PCB_CALCULATOR_FRAME::~PCB_CALCULATOR_FRAME()
for( unsigned ii = 0; ii < m_attenuator_list.size(); ii++ )
delete m_attenuator_list[ii];
+ delete m_ccValueNamesBitmap;
+ delete m_ccValuesBitmap;
+ delete m_ccMultipliersBitmap;
+ delete m_ccTolerancesBitmap;
+
// This needed for OSX: avoids furter OnDraw processing after this destructor and before
// the native window is destroyed
this->Freeze();
@@ -165,19 +169,13 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event )
}
}
- static wxBitmap* valueNameBitmap = new wxBitmap( color_code_value_and_name_xpm );
- m_Band1bitmap->SetBitmap( *valueNameBitmap );
+ ToleranceSelection( m_rbToleranceSelection->GetSelection() );
- static wxBitmap* valueBitmap = new wxBitmap( color_code_value_xpm );
- m_Band2bitmap->SetBitmap( *valueBitmap );
- m_Band3bitmap->SetBitmap( *valueBitmap );
- m_Band4bitmap->SetBitmap( *valueBitmap );
+ static wxBitmap* viaBitmap = new wxBitmap( via_dims_xpm );
+ m_viaBitmap->SetBitmap( *viaBitmap );
- static wxBitmap* multiplierBitmap = new wxBitmap( color_code_multiplier_xpm );
- m_Band_mult_bitmap->SetBitmap( *multiplierBitmap );
-
- static wxBitmap* toleranceBitmap = new wxBitmap( color_code_tolerance_xpm );
- m_Band_tol_bitmap->SetBitmap( *toleranceBitmap );
+ m_panelESeriesHelp->Refresh();
+ m_htmlWinFormulas->Refresh();
// Until it's shown on screen the above won't work; but doing it anyway at least keeps
// putting new OnUpdateUI events into the queue until it *is* shown on screen.
@@ -288,9 +286,9 @@ void PCB_CALCULATOR_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
Regulators_WriteConfig( cfg );
}
- TW_WriteConfig();
+ writeTrackWidthConfig();
- VS_WriteConfig();
+ writeViaSizeConfig();
for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
m_transline_list[ii]->WriteConfig();
diff --git a/pcb_calculator/pcb_calculator_frame.h b/pcb_calculator/pcb_calculator_frame.h
index 1cfeb3c55e..31acbf28f4 100644
--- a/pcb_calculator/pcb_calculator_frame.h
+++ b/pcb_calculator/pcb_calculator_frame.h
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
- * Copyright (C) 1992-2020 Kicad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -17,10 +17,6 @@
* with this program. If not, see .
*/
-/**
- * @file pcb_calculator.h
- */
-
#ifndef PCB_CALCULATOR_H
#define PCB_CALCULATOR_H
@@ -38,42 +34,15 @@ class KIWAY;
class PCB_CALCULATOR_SETTINGS;
-/* Class PCB_CALCULATOR_FRAME_BASE
-This is the main frame for this application
-*/
+/*
+ * Class PCB_CALCULATOR_FRAME_BASE
+ * This is the main frame for this application
+ */
class PCB_CALCULATOR_FRAME : public PCB_CALCULATOR_FRAME_BASE
{
public:
REGULATOR_LIST m_RegulatorList; // the list of known regulator
-private:
- bool m_RegulatorListChanged; // set to true when m_RegulatorList
- // was modified, and the corresponging file
- // must be rewritten
-
- enum // Which dimension is controlling the track
- { // width / current calculations:
- TW_MASTER_CURRENT, // the maximum current,
- TW_MASTER_EXT_WIDTH, // the external trace width,
- TW_MASTER_INT_WIDTH // or the internal trace width?
- } m_TWMode;
-
- bool m_TWNested; // Used to stop events caused by setting the answers.
-
- enum TRANSLINE_TYPE_ID m_currTransLineType;
- TRANSLINE* m_currTransLine; // a pointer to the active transline
- // List of translines: ordered like in dialog menu list
- std::vector m_transline_list;
-
- ATTENUATOR* m_currAttenuator;
- // List ofattenuators: ordered like in dialog menu list
- std::vector m_attenuator_list;
- wxString m_lastSelectedRegulatorName; // last regulator name selected
-
- int m_lastNotebookPage;
- int m_lastRadioButton;
-
-public:
PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent );
~PCB_CALCULATOR_FRAME();
@@ -103,24 +72,17 @@ private:
*/
void SetDataFilename( const wxString& aFilename );
- // Trace width / maximum current capability calculations.
/**
- * Function TW_Init
- * Read config and init dialog widgets values
+ * Panel-specific initializers
*/
- void TW_Init();
-
- /**
- * E-Series Resistor calculator Panel
- * Called on calculator start to display markdown formula explanations
- */
- void ES_Init( void );
+ void initTrackWidthPanel();
+ void initESeriesPanel();
+ void initColorCodePanel();
+ void initViaSizePanel();
/**
* Called on calculate button and executes all E-series calculations
- *
*/
-
void OnCalculateESeries( wxCommandEvent& event ) override;
/**
@@ -130,10 +92,10 @@ private:
void OnESeriesSelection( wxCommandEvent& event ) override;
/**
- * Function TW_WriteConfig
+ * Function writeTrackWidthConfig
* Write Track width parameters in config
*/
- void TW_WriteConfig();
+ void writeTrackWidthConfig();
/**
* Function OnTWParametersChanged
@@ -199,19 +161,11 @@ private:
*/
void TWUpdateModeDisplay();
- // Via size calculations
-
/**
- * Function VS_Init
- * Read config and init dialog widgets values
- */
- void VS_Init();
-
- /**
- * Function VS_WriteConfig
+ * Function writeViaSizeConfig
* Write Via Size parameters in config
*/
- void VS_WriteConfig();
+ void writeViaSizeConfig();
/**
* Function OnViaCalculate
@@ -235,10 +189,9 @@ private:
void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) override;
/**
- * Function OnViaResetButtonClick
- * Called when the user clicks the reset button. This sets
- * the parameters to their default values.
- */
+ * Function OnViaResetButtonClick
+ * Called when the user clicks the reset button; sets the parameters to their default values.
+ */
void OnViaResetButtonClick( wxCommandEvent& event ) override;
/**
@@ -255,69 +208,65 @@ private:
void OnElectricalSpacingRefresh( wxCommandEvent& event ) override;
void ElectricalSpacingUpdateData( double aUnitScale );
- // Transline functions:
/**
* Function OnTranslineSelection
* Called on new transmission line selection
- */
+ */
void OnTranslineSelection( wxCommandEvent& event ) override;
/**
* Function OnTransLineResetButtonClick
- * Called when the user clicks the reset button. This sets
- * the parameters to their default values.
- */
+ * Called when the user clicks the reset button; sets the parameters to their default values.
+ */
void OnTransLineResetButtonClick( wxCommandEvent& event ) override;
/**
* Function OnTranslineAnalyse
- * Run a new analyse for the current transline with current parameters
- * and displays the electrical parameters
+ * Run a new analyse for the current transline with current parameters and displays the
+ * electrical parameters
*/
void OnTranslineAnalyse( wxCommandEvent& event ) override;
/**
* Function OnTranslineSynthetize
- * Run a new synthezis for the current transline with current parameters
- * and displays the geometrical parameters
+ * Run a new synthezis for the current transline with current parameters and displays the
+ * geometrical parameters
*/
void OnTranslineSynthetize( wxCommandEvent& event ) override;
/**
* Function OnTranslineEpsilonR_Button
- * Shows a list of current relative dielectric constant(Er)
- * and set the selected value in main dialog frame
+ * Shows a list of current relative dielectric constant(Er) and set the selected value in
+ * main dialog frame
*/
void OnTranslineEpsilonR_Button( wxCommandEvent& event ) override;
/**
* Function OnTranslineTanD_Button
- * Shows a list of current dielectric loss factor (tangent delta)
- * and set the selected value in main dialog frame
+ * Shows a list of current dielectric loss factor (tangent delta) and set the selected value
+ * in main dialog frame
*/
void OnTranslineTanD_Button( wxCommandEvent& event ) override;
/**
* Function OnTranslineRho_Button
- * Shows a list of current Specific resistance list (rho)
- * and set the selected value in main dialog frame
+ * Shows a list of current Specific resistance list (rho) and set the selected value in main
+ * dialog frame
*/
void OnTranslineRho_Button( wxCommandEvent& event ) override;
/**
* Function TranslineTypeSelection
- * Must be called after selection of a new transline.
- * Update all values, labels and tool tips of parameters needed
- * by the new transline
- * Irrelevant parameters texts are blanked.
+ * Must be called after selection of a new transline. Update all values, labels and tool
+ * tips of parameters needed by the new transline; irrelevant parameters are blanked.
* @param aType = the TRANSLINE_TYPE_ID of the new selected transline
*/
void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType );
/**
* Function TransfDlgDataToTranslineParams
- * Read values entered in dialog frame, and transfert these
- * values in current transline parameters, converted in normalized units
+ * Read values entered in dialog frame, and transfert these values in current transline
+ * parameters, converted in normalized units
*/
void TransfDlgDataToTranslineParams();
@@ -352,11 +301,7 @@ private:
/**
* Function SelectLastSelectedRegulator
- * select in choice box the last selected regulator
- * (name in m_lastSelectedRegulatorName)
- * and update the displayed values.
- * if m_lastSelectedRegulatorName is empty, just calls
- * RegulatorPageUpdate()
+ * If m_lastSelectedRegulatorName is empty, just calls RegulatorPageUpdate()
*/
void SelectLastSelectedRegulator();
@@ -417,6 +362,35 @@ public:
{
return nullptr;
}
+
+private:
+ bool m_RegulatorListChanged; // Set when m_RegulatorList is modified and the corresponging file
+ // must be rewritten
+
+ enum // Which dimension is controlling the track width / current
+ { // calculations:
+ TW_MASTER_CURRENT, // the maximum current,
+ TW_MASTER_EXT_WIDTH, // the external trace width,
+ TW_MASTER_INT_WIDTH // or the internal trace width?
+ } m_TWMode;
+
+ bool m_TWNested; // Used to stop events caused by setting the answers.
+
+ enum TRANSLINE_TYPE_ID m_currTransLineType;
+ TRANSLINE* m_currTransLine;
+ std::vector m_transline_list;
+
+ ATTENUATOR* m_currAttenuator;
+ std::vector m_attenuator_list;
+
+ wxString m_lastSelectedRegulatorName;
+
+ wxBitmap* m_ccValueNamesBitmap;
+ wxBitmap* m_ccValuesBitmap;
+ wxBitmap* m_ccMultipliersBitmap;
+ wxBitmap* m_ccTolerancesBitmap;
+
+ int m_lastNotebookPage;
};
diff --git a/pcb_calculator/tracks_width_versus_current.cpp b/pcb_calculator/tracks_width_versus_current.cpp
index bfaf968bda..1ab43b4a07 100644
--- a/pcb_calculator/tracks_width_versus_current.cpp
+++ b/pcb_calculator/tracks_width_versus_current.cpp
@@ -42,7 +42,7 @@ wxString tracks_width_versus_current_formula =
extern double DoubleFromString( const wxString& TextValue );
-void PCB_CALCULATOR_FRAME::TW_WriteConfig()
+void PCB_CALCULATOR_FRAME::writeTrackWidthConfig()
{
// Save current parameters values in config.
auto cfg = static_cast( Kiface().KifaceSettings() );
@@ -414,7 +414,7 @@ double PCB_CALCULATOR_FRAME::TWCalculateCurrent( double aWidth, double aThicknes
}
-void PCB_CALCULATOR_FRAME::TW_Init()
+void PCB_CALCULATOR_FRAME::initTrackWidthPanel()
{
wxString msg;
diff --git a/pcb_calculator/via.cpp b/pcb_calculator/via.cpp
index 0f122028ad..36e71f1769 100644
--- a/pcb_calculator/via.cpp
+++ b/pcb_calculator/via.cpp
@@ -123,7 +123,7 @@ void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event )
}
-void PCB_CALCULATOR_FRAME::VS_Init()
+void PCB_CALCULATOR_FRAME::initViaSizePanel()
{
auto cfg = static_cast( Kiface().KifaceSettings() );
@@ -152,7 +152,8 @@ void PCB_CALCULATOR_FRAME::VS_Init()
m_textCtrlRiseTime->SetValue( cfg->m_ViaSize.pulse_rise_time );
}
-void PCB_CALCULATOR_FRAME::VS_WriteConfig()
+
+void PCB_CALCULATOR_FRAME::writeViaSizeConfig()
{
auto cfg = static_cast( Kiface().KifaceSettings() );
@@ -175,6 +176,7 @@ void PCB_CALCULATOR_FRAME::VS_WriteConfig()
cfg->m_ViaSize.pulse_rise_time = m_textCtrlRiseTime->GetValue();
}
+
void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event )
{
// Load parameters