pcb_calculator: code cleanup. Remove a few duplicate code.

This commit is contained in:
jean-pierre charras 2019-05-01 20:57:59 +02:00
parent 839f0fbfcf
commit 460d1f2a15
23 changed files with 367 additions and 9424 deletions

View File

@ -13,6 +13,7 @@ set( PCB_CALCULATOR_SRCS
attenuators.cpp attenuators.cpp
board_classes_values.cpp board_classes_values.cpp
colorcode.cpp colorcode.cpp
common_data.cpp
electrical_spacing_values.cpp electrical_spacing_values.cpp
params_read_write.cpp params_read_write.cpp
pcb_calculator_frame.cpp pcb_calculator_frame.cpp

View File

@ -2,11 +2,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011-2014 Jean-Pierre Charras * Copyright (C) 2011-2014 Jean-Pierre Charras
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**

View File

@ -2,11 +2,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011-2014 Jean-Pierre Charras * Copyright (C) 2011-2014 Jean-Pierre Charras
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2015 jean-pierre.charras * Copyright (C) 2015 jean-pierre.charras
* Copyright (C) 2015 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2015 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/app.h> #include <wx/app.h>
@ -33,7 +29,7 @@
// A helper class to handle min values // A helper class to handle min values
// Values are in meters. // Values are in meters.
// Note : use -1.0 when a vaule is irrelevant in a class // Note : use -1.0 when a value is irrelevant in a class
class BOARD_MIN_SIZE_VALUES class BOARD_MIN_SIZE_VALUES
{ {
public: public:

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2011 jean-pierre.charras * Copyright (C) 2011 jean-pierre.charras
* Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2011 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/app.h> #include <wx/app.h>

View File

@ -0,0 +1,102 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2019 jean-pierre.charras
* Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file common_data.cpp
* @note lists of constants used in different panels
*/
#include <common_data.h>
wxArrayString StandardRelativeDielectricConstantList()
{
wxArrayString list;
// EpsilonR ( relative dielectric constant) list
list.Add( wxT( "4.5 FR4" ) );
list.Add( wxT( "3.67 Isola FR408" ) );
list.Add( wxT( "4.04 Isola 370HR" ) );
list.Add( wxT( "3.55 Rogers RO4003C" ) );
list.Add( wxT( "3.66 Rogers R4350B" ) );
list.Add( wxT( "9.8 alumina (Al2O3)" ) );
list.Add( wxT( "3.78 fused quartz" ) );
list.Add( wxT( "3.38 RO4003" ) );
list.Add( wxT( "2.2 RT/duroid 5880" ) );
list.Add( wxT( "10.2 RT/duroid 6010LM" ) );
list.Add( wxT( "2.1 teflon (PTFE)" ) );
list.Add( wxT( "4.0 PVC" ) );
list.Add( wxT( "2.3 PE" ) );
list.Add( wxT( "6.6 beryllia (BeO)" ) );
list.Add( wxT( "8.7 aluminum nitride" ) );
list.Add( wxT( "11.9 silicon" ) );
list.Add( wxT( "12.9 GaAs" ) );
return list;
}
wxArrayString StandardLossTangentList()
{
wxArrayString list;
// List of current dielectric loss factor (tangent delta)
list.Clear();
list.Add( wxT( "2e-2 FR4 @ 1GHz" ) );
list.Add( wxT( "12e-3 Isola FR408 @ 2 GHz" ) );
list.Add( wxT( "21e-3 Isola 370HR @ 2 GHz" ) );
list.Add( wxT( "27e-4 Rogers RO4003C @ 10 GHz" ) );
list.Add( wxT( "21e-4 Rogers RO4003C @ 2.5 GHz" ) );
list.Add( wxT( "37e-4 Rogers RO4350B @ 10 GHz" ) );
list.Add( wxT( "31e-4 Rogers RO4350B @ 2.5 GHz" ) );
list.Add( wxT( "3e-4 beryllia @ 10GHz" ) );
list.Add( wxT( "2e-4 aluminia (Al2O3) @ 10GHz" ) );
list.Add( wxT( "1e-4 fused quartz @ 10GHz" ) );
list.Add( wxT( "2e-3 RO4003 @ 10GHz" ) );
list.Add( wxT( "9e-4 RT/duroid 5880 @ 10GHz" ) );
list.Add( wxT( "2e-4 teflon (PTFE) @ 1MHz" ) );
list.Add( wxT( "5e-2 PVC @ 1MHz" ) );
list.Add( wxT( "2e-4 PE @ 1MHz" ) );
list.Add( wxT( "1e-3 aluminum nitride @ 10GHz" ) );
list.Add( wxT( "0.015 silicon @ 10GHz" ) );
list.Add( wxT( "0.002 GaAs @ 10GHz" ) );
return list;
}
wxArrayString StandardResistivityList()
{
wxArrayString list;
// Specific resistance list in ohms*meters (rho):
list.Clear();
list.Add( wxT( "2.4e-8 gold" ) );
list.Add( wxT( "1.72e-8 copper" ) );
list.Add( wxT( "1.62e-8 silver" ) );
list.Add( wxT( "12.4e-8 tin" ) );
list.Add( wxT( "10.5e-8 platinum" ) );
list.Add( wxT( "2.62e-8 aluminum" ) );
list.Add( wxT( "6.9e-8 nickel" ) );
list.Add( wxT( "3.9e-8 brass (66Cu 34Zn)" ) );
list.Add( wxT( "9.71e-8 iron" ) );
list.Add( wxT( "6.0e-8 zinc" ) );
return list;
}

View File

@ -0,0 +1,50 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2019 jean-pierre.charras
* Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file common_data.h
* @note lists of constants used in different panels
*/
#ifndef COMMON_DATA_H
#define COMMON_DATA_H
#include <wx/arrstr.h>
/**
* @return a list of dielectric constants (Er) of some materials
* used to make PCBs
*/
wxArrayString StandardRelativeDielectricConstantList();
/**
* @return a list of loss tangent of some materials
* used to make PCBs
*/
wxArrayString StandardLossTangentList();
/**
* @return a list of resistivity constants (Er) of some conductors
* used to make PCBs
*/
wxArrayString StandardResistivityList();
#endif // #ifndef COMMON_DATA_H

View File

@ -6,11 +6,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2016 Jean-Pierre Charras * Copyright (C) 2016 Jean-Pierre Charras
* Copyright (C) 1992-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -18,12 +18,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <macros.h> #include <macros.h>

View File

@ -3,7 +3,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -15,12 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/wx.h> #include <wx/wx.h>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Aug 8 2018) // C++ code generated with wxFormBuilder (version Dec 1 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -523,326 +523,311 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_panelViaSize = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_panelViaSize = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerViaSize; wxBoxSizer* bSizerViaSize;
bSizerViaSize = new wxBoxSizer( wxHORIZONTAL ); bSizerViaSize = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbSizerVS_Inputs; wxStaticBoxSizer* sbSizerVS_Inputs;
sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Parameters:") ), wxVERTICAL ); sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Parameters:") ), wxVERTICAL );
wxFlexGridSizer* fgSizerVS_Inputs; wxFlexGridSizer* fgSizerVS_Inputs;
fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerVS_Inputs->AddGrowableCol( 1 ); fgSizerVS_Inputs->AddGrowableCol( 1 );
fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH ); fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH );
fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextHoleDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("D:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextHoleDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Finished hole diameter (D):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextHoleDia->Wrap( -1 ); m_staticTextHoleDia->Wrap( -1 );
m_staticTextHoleDia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); m_staticTextHoleDia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextHoleDia->SetToolTip( _("Finished hole dia") );
fgSizerVS_Inputs->Add( m_staticTextHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceHoleDiaChoices; wxArrayString m_choiceHoleDiaChoices;
m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 ); m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 );
m_choiceHoleDia->SetSelection( 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("T:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating thickness (T):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPlatingThickness->Wrap( -1 ); m_staticTextPlatingThickness->Wrap( -1 );
m_staticTextPlatingThickness->SetToolTip( _("Plating thickness") );
fgSizerVS_Inputs->Add( m_staticTextPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); 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 ); 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|wxTOP|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choicePlatingThicknessChoices; wxArrayString m_choicePlatingThicknessChoices;
m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 ); m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 );
m_choicePlatingThickness->SetSelection( 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|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextViaLength->Wrap( -1 ); m_staticTextViaLength->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticTextViaLength, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceViaLengthChoices; wxArrayString m_choiceViaLengthChoices;
m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 ); m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 );
m_choiceViaLength->SetSelection( 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad dia:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad dia:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextViaPadDia->Wrap( -1 ); m_staticTextViaPadDia->Wrap( -1 );
m_staticTextViaPadDia->SetToolTip( _("Diameter of pad surrounding via") ); m_staticTextViaPadDia->SetToolTip( _("Diameter of pad surrounding via") );
fgSizerVS_Inputs->Add( m_staticTextViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceViaPadDiaChoices; wxArrayString m_choiceViaPadDiaChoices;
m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 ); m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 );
m_choiceViaPadDia->SetSelection( 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole dia:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole dia:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextClearanceDia->Wrap( -1 ); m_staticTextClearanceDia->Wrap( -1 );
m_staticTextClearanceDia->SetToolTip( _("Diameter of clearance hole in ground plane(s)") ); m_staticTextClearanceDia->SetToolTip( _("Diameter of clearance hole in ground plane(s)") );
fgSizerVS_Inputs->Add( m_staticTextClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceClearanceDiaChoices; wxArrayString m_choiceClearanceDiaChoices;
m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 ); m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 );
m_choiceClearanceDia->SetSelection( 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextBoardThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("PCB thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBoardThickness->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticTextBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
m_textCtrlBoardThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerVS_Inputs->Add( m_textCtrlBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceBoardThicknessChoices;
m_choiceBoardThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBoardThicknessChoices, 0 );
m_choiceBoardThickness->SetSelection( 0 );
fgSizerVS_Inputs->Add( m_choiceBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextImpedance->Wrap( -1 ); m_staticTextImpedance->Wrap( -1 );
m_staticTextImpedance->SetToolTip( _("Characteristic impedance of conductor") ); m_staticTextImpedance->SetToolTip( _("Characteristic impedance of conductor") );
fgSizerVS_Inputs->Add( m_staticTextImpedance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
wxArrayString m_choiceImpedanceChoices; wxArrayString m_choiceImpedanceChoices;
m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 ); m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 );
m_choiceImpedance->SetSelection( 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticAppliedCurrent->Wrap( -1 ); m_staticAppliedCurrent->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 ); 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 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAppliedCurrentUnits->Wrap( -1 ); m_staticTextAppliedCurrentUnits->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextResistivity->Wrap( -1 ); m_staticTextResistivity->Wrap( -1 );
m_staticTextResistivity->SetToolTip( _("Specific resistance in ohms * meters") ); 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|wxALL, 5 );
m_textCtrlPlatingResistivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_button_ResistivityVia = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Er:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Er:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPermittivity->Wrap( -1 ); m_staticTextPermittivity->Wrap( -1 );
m_staticTextPermittivity->SetToolTip( _("Relative dielectric constant (epsilon r)") ); 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|wxALL, 5 );
m_textCtrlPlatingPermittivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_button_Permittivity = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTemperatureDiff->Wrap( -1 ); m_staticTextTemperatureDiff->Wrap( -1 );
m_staticTextTemperatureDiff->SetToolTip( _("Maximum acceptable rise in temperature") ); 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|wxALL, 5 );
m_textCtrlTemperatureDiff = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextTemperatureUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTemperatureUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTemperatureUnits->Wrap( -1 ); m_staticTextTemperatureUnits->Wrap( -1 );
fgSizerVS_Inputs->Add( m_staticTextTemperatureUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerVS_Inputs->Add( m_staticTextTemperatureUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTime->Wrap( -1 ); m_staticTextRiseTime->Wrap( -1 );
m_staticTextRiseTime->SetToolTip( _("Pulse rise time to calculate reactance") ); 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|wxALL, 5 );
m_textCtrlRiseTime = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 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|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTimeUnits->Wrap( -1 ); m_staticTextRiseTimeUnits->Wrap( -1 );
m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") ); m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") );
fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 ); sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 );
m_staticline31 = new wxStaticLine( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline31 = new wxStaticLine( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
sbSizerVS_Inputs->Add( m_staticline31, 0, wxALL|wxEXPAND, 5 ); sbSizerVS_Inputs->Add( m_staticline31, 0, wxALL|wxEXPAND, 5 );
m_bitmap10 = new wxStaticBitmap( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxBitmap( via_xpm ), wxDefaultPosition, wxDefaultSize, 0 ); m_bitmap10 = new wxStaticBitmap( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxBitmap( via_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
m_bitmap10->SetToolTip( _("Top view of via") ); m_bitmap10->SetToolTip( _("Top view of via") );
sbSizerVS_Inputs->Add( m_bitmap10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); sbSizerVS_Inputs->Add( m_bitmap10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 ); bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerVS_Result; wxStaticBoxSizer* sbSizerVS_Result;
sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results:") ), wxVERTICAL ); sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results:") ), wxVERTICAL );
wxFlexGridSizer* fgSizerTW_Results11; wxFlexGridSizer* fgSizerTW_Results11;
fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerTW_Results11->AddGrowableCol( 1 ); fgSizerTW_Results11->AddGrowableCol( 1 );
fgSizerTW_Results11->SetFlexibleDirection( wxBOTH ); fgSizerTW_Results11->SetFlexibleDirection( wxBOTH );
fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextArea11 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextArea11 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextArea11->Wrap( -1 ); m_staticTextArea11->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticTextArea11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextArea11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_ViaResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaResistance->Wrap( -1 ); m_ViaResistance->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_IntTrackAreaUnitLabel1 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); m_IntTrackAreaUnitLabel1 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 );
m_IntTrackAreaUnitLabel1->Wrap( -1 ); m_IntTrackAreaUnitLabel1->Wrap( -1 );
fgSizerTW_Results11->Add( m_IntTrackAreaUnitLabel1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_IntTrackAreaUnitLabel1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticText65111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText65111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText65111->Wrap( -1 ); m_staticText65111->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticText65111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText65111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_ViaVoltageDrop = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaVoltageDrop = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaVoltageDrop->Wrap( -1 ); m_ViaVoltageDrop->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaVoltageDrop, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizerTW_Results11->Add( m_ViaVoltageDrop, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticText8411 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8411 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText8411->Wrap( -1 ); m_staticText8411->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticText8411, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText8411, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticText66111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText66111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText66111->Wrap( -1 ); m_staticText66111->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticText66111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText66111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_ViaPowerLoss = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaPowerLoss = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaPowerLoss->Wrap( -1 ); m_ViaPowerLoss->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaPowerLoss, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizerTW_Results11->Add( m_ViaPowerLoss, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticText8311 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8311 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText8311->Wrap( -1 ); m_staticText8311->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticText8311, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText8311, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticText79211 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Thermal resistance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText79211 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Thermal resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText79211->Wrap( -1 ); m_staticText79211->Wrap( -1 );
m_staticText79211->SetToolTip( _("Using thermal conductivity value 401 Watts/(meter-Kelvin)") ); m_staticText79211->SetToolTip( _("Using thermal conductivity value 401 Watts/(meter-Kelvin)") );
fgSizerTW_Results11->Add( m_staticText79211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText79211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_ViaThermalResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaThermalResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaThermalResistance->Wrap( -1 ); m_ViaThermalResistance->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticText791111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/Watt"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText791111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/Watt"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText791111->Wrap( -1 ); m_staticText791111->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticText791111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticText791111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Estimated ampacity:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Estimated ampacity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAmpacity->Wrap( -1 ); m_staticTextAmpacity->Wrap( -1 );
m_staticTextAmpacity->SetToolTip( _("Based on temperature rise") ); m_staticTextAmpacity->SetToolTip( _("Based on temperature rise") );
fgSizerTW_Results11->Add( m_staticTextAmpacity, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextAmpacity, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_ViaAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaAmpacity->Wrap( -1 ); m_ViaAmpacity->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); fgSizerTW_Results11->Add( m_ViaAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_staticTextAmpacityUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextAmpacityUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextAmpacityUnits->Wrap( -1 ); m_staticTextAmpacityUnits->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticTextAmpacityUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextAmpacityUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Capacitance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Capacitance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCapacitance->Wrap( -1 ); m_staticTextCapacitance->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticTextCapacitance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextCapacitance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_ViaCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_ViaCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaCapacitance->Wrap( -1 ); m_ViaCapacitance->Wrap( -1 );
fgSizerTW_Results11->Add( m_ViaCapacitance, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_ViaCapacitance, 0, wxALL, 5 );
m_staticTextCapacitanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("pF"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCapacitanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("pF"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCapacitanceUnits->Wrap( -1 ); m_staticTextCapacitanceUnits->Wrap( -1 );
m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") ); m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") );
fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxALL, 5 );
m_staticTextRiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Rise time degradation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Rise time degradation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTimeOutput->Wrap( -1 ); m_staticTextRiseTimeOutput->Wrap( -1 );
m_staticTextRiseTimeOutput->SetToolTip( _("Rise time degradation for given Z0 and calculated capacitance") ); m_staticTextRiseTimeOutput->SetToolTip( _("Rise time degradation for given Z0 and calculated capacitance") );
fgSizerTW_Results11->Add( m_staticTextRiseTimeOutput, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextRiseTimeOutput, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_RiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_RiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_RiseTimeOutput->Wrap( -1 ); m_RiseTimeOutput->Wrap( -1 );
fgSizerTW_Results11->Add( m_RiseTimeOutput, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_RiseTimeOutput, 0, wxALL, 5 );
m_staticTextRiseTimeOutputUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ps"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRiseTimeOutputUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ps"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRiseTimeOutputUnits->Wrap( -1 ); m_staticTextRiseTimeOutputUnits->Wrap( -1 );
m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") ); m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") );
fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxALL, 5 );
m_staticTextInductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Inductance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Inductance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInductance->Wrap( -1 ); m_staticTextInductance->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticTextInductance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextInductance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_Inductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_Inductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_Inductance->Wrap( -1 ); m_Inductance->Wrap( -1 );
fgSizerTW_Results11->Add( m_Inductance, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_Inductance, 0, wxALL, 5 );
m_staticTextInductanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("nH"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInductanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("nH"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInductanceUnits->Wrap( -1 ); m_staticTextInductanceUnits->Wrap( -1 );
m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") ); m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") );
fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxALL, 5 );
m_staticTextReactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Reactance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextReactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Reactance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextReactance->Wrap( -1 ); m_staticTextReactance->Wrap( -1 );
m_staticTextReactance->SetToolTip( _("Inductive reactance for given rise time and calculated inductance") ); m_staticTextReactance->SetToolTip( _("Inductive reactance for given rise time and calculated inductance") );
fgSizerTW_Results11->Add( m_staticTextReactance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextReactance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_Reactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); m_Reactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
m_Reactance->Wrap( -1 ); m_Reactance->Wrap( -1 );
fgSizerTW_Results11->Add( m_Reactance, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_Reactance, 0, wxALL, 5 );
m_staticTextReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextReactanceUnits->Wrap( -1 ); m_staticTextReactanceUnits->Wrap( -1 );
fgSizerTW_Results11->Add( m_staticTextReactanceUnits, 0, wxALL, 5 ); fgSizerTW_Results11->Add( m_staticTextReactanceUnits, 0, wxALL, 5 );
sbSizerVS_Result->Add( fgSizerTW_Results11, 0, wxEXPAND, 5 ); sbSizerVS_Result->Add( fgSizerTW_Results11, 0, wxEXPAND, 5 );
bSizerViaSize->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 ); bSizerViaSize->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 );
m_panelViaSize->SetSizer( bSizerViaSize ); m_panelViaSize->SetSizer( bSizerViaSize );
m_panelViaSize->Layout(); m_panelViaSize->Layout();
bSizerViaSize->Fit( m_panelViaSize ); bSizerViaSize->Fit( m_panelViaSize );
@ -1666,6 +1651,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
this->SetSizer( bmainFrameSizer ); this->SetSizer( bmainFrameSizer );
this->Layout(); this->Layout();
bmainFrameSizer->Fit( this ); bmainFrameSizer->Fit( this );
this->Centre( wxBOTH ); this->Centre( wxBOTH );
// Connect Events // Connect Events
@ -1700,8 +1686,6 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_choiceViaPadDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceViaPadDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlClearanceDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlClearanceDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceClearanceDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceClearanceDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlBoardThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceBoardThickness->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlImpedance->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlImpedance->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceImpedance->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceImpedance->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlAppliedCurrent->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlAppliedCurrent->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
@ -1764,8 +1748,6 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
m_choiceViaPadDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceViaPadDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlClearanceDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlClearanceDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceClearanceDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceClearanceDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlBoardThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceBoardThickness->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlImpedance->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlImpedance->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_choiceImpedance->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_choiceImpedance->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
m_textCtrlAppliedCurrent->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this ); m_textCtrlAppliedCurrent->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Aug 8 2018) // C++ code generated with wxFormBuilder (version Dec 1 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -161,9 +161,6 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
wxStaticText* m_staticTextClearanceDia; wxStaticText* m_staticTextClearanceDia;
wxTextCtrl* m_textCtrlClearanceDia; wxTextCtrl* m_textCtrlClearanceDia;
UNIT_SELECTOR_LEN* m_choiceClearanceDia; UNIT_SELECTOR_LEN* m_choiceClearanceDia;
wxStaticText* m_staticTextBoardThickness;
wxTextCtrl* m_textCtrlBoardThickness;
UNIT_SELECTOR_LEN* m_choiceBoardThickness;
wxStaticText* m_staticTextImpedance; wxStaticText* m_staticTextImpedance;
wxTextCtrl* m_textCtrlImpedance; wxTextCtrl* m_textCtrlImpedance;
UNIT_SELECTOR_RESISTOR* m_choiceImpedance; UNIT_SELECTOR_RESISTOR* m_choiceImpedance;

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2011 jean-pierre.charras * Copyright (C) 2011 jean-pierre.charras
* Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2011 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/app.h> #include <wx/app.h>

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2015 jean-pierre.charras * Copyright (C) 2015 jean-pierre.charras
* Copyright (C) 2015 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2015 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h> #include <fctsys.h>
#include <pgm_base.h> #include <pgm_base.h>

View File

@ -1,11 +1,11 @@
/* /*
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 1992-2015 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2015 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 1992-2015 jean-pierre.charras * Copyright (C) 1992-2015 jean-pierre.charras
* Copyright (C) 1992-2015 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2015 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/config.h> #include <wx/config.h>

View File

@ -5,11 +5,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 1992-2011 jean-pierre.charras * Copyright (C) 1992-2011 jean-pierre.charras
* Copyright (C) 1992-2011 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2011 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -17,12 +17,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/config.h> #include <wx/config.h>

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2011 jean-pierre.charras * Copyright (C) 2011 jean-pierre.charras
* Copyright (C) 1992-2015 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2015 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/* see /* see

View File

@ -2,11 +2,11 @@
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 2011 jean-pierre.charras * Copyright (C) 2011 jean-pierre.charras
* Copyright (C) 1992-2011 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2011 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/config.h> #include <wx/config.h>
@ -29,6 +25,7 @@
#include <pcb_calculator.h> #include <pcb_calculator.h>
#include <UnitSelector.h> #include <UnitSelector.h>
#include <common_data.h>
extern double DoubleFromString( const wxString& TextValue ); extern double DoubleFromString( const wxString& TextValue );
@ -45,26 +42,7 @@ extern double DoubleFromString( const wxString& TextValue );
*/ */
void PCB_CALCULATOR_FRAME::OnTranslineEpsilonR_Button( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnTranslineEpsilonR_Button( wxCommandEvent& event )
{ {
wxArrayString list; wxArrayString list = StandardRelativeDielectricConstantList();
// EpsilonR ( relative dielectric constant) list
list.Add( wxT( "4.5 FR4" ) );
list.Add( wxT( "3.67 Isola FR408" ) );
list.Add( wxT( "4.04 Isola 370HR" ) );
list.Add( wxT( "3.55 Rogers RO4003C" ) );
list.Add( wxT( "3.66 Rogers R4350B" ) );
list.Add( wxT( "9.8 alumina (Al2O3)" ) );
list.Add( wxT( "3.78 fused quartz" ) );
list.Add( wxT( "3.38 RO4003" ) );
list.Add( wxT( "2.2 RT/duroid 5880" ) );
list.Add( wxT( "10.2 RT/duroid 6010LM" ) );
list.Add( wxT( "2.1 teflon (PTFE)" ) );
list.Add( wxT( "4.0 PVC" ) );
list.Add( wxT( "2.3 PE" ) );
list.Add( wxT( "6.6 beryllia (BeO)" ) );
list.Add( wxT( "8.7 aluminum nitride" ) );
list.Add( wxT( "11.9 silicon" ) );
list.Add( wxT( "12.9 GaAs" ) );
wxString value = wxGetSingleChoice( wxEmptyString, wxString value = wxGetSingleChoice( wxEmptyString,
_("Relative Dielectric Constants"), list).BeforeFirst( ' ' ); _("Relative Dielectric Constants"), list).BeforeFirst( ' ' );
@ -79,28 +57,7 @@ void PCB_CALCULATOR_FRAME::OnTranslineEpsilonR_Button( wxCommandEvent& event )
*/ */
void PCB_CALCULATOR_FRAME::OnTranslineTanD_Button( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnTranslineTanD_Button( wxCommandEvent& event )
{ {
wxArrayString list; wxArrayString list = StandardLossTangentList();
// List of current dielectric loss factor (tangent delta)
list.Clear();
list.Add( wxT( "2e-2 FR4 @ 1GHz" ) );
list.Add( wxT( "12e-3 Isola FR408 @ 2 GHz" ) );
list.Add( wxT( "21e-3 Isola 370HR @ 2 GHz" ) );
list.Add( wxT( "27e-4 Rogers RO4003C @ 10 GHz" ) );
list.Add( wxT( "21e-4 Rogers RO4003C @ 2.5 GHz" ) );
list.Add( wxT( "37e-4 Rogers RO4350B @ 10 GHz" ) );
list.Add( wxT( "31e-4 Rogers RO4350B @ 2.5 GHz" ) );
list.Add( wxT( "3e-4 beryllia @ 10GHz" ) );
list.Add( wxT( "2e-4 aluminia (Al2O3) @ 10GHz" ) );
list.Add( wxT( "1e-4 fused quartz @ 10GHz" ) );
list.Add( wxT( "2e-3 RO4003 @ 10GHz" ) );
list.Add( wxT( "9e-4 RT/duroid 5880 @ 10GHz" ) );
list.Add( wxT( "2e-4 teflon (PTFE) @ 1MHz" ) );
list.Add( wxT( "5e-2 PVC @ 1MHz" ) );
list.Add( wxT( "2e-4 PE @ 1MHz" ) );
list.Add( wxT( "1e-3 aluminum nitride @ 10GHz" ) );
list.Add( wxT( "0.015 silicon @ 10GHz" ) );
list.Add( wxT( "0.002 GaAs @ 10GHz" ) );
wxString value = wxGetSingleChoice( wxEmptyString, wxString value = wxGetSingleChoice( wxEmptyString,
_("Dielectric Loss Factor"), list).BeforeFirst( ' ' ); _("Dielectric Loss Factor"), list).BeforeFirst( ' ' );
@ -115,20 +72,7 @@ void PCB_CALCULATOR_FRAME::OnTranslineTanD_Button( wxCommandEvent& event )
*/ */
void PCB_CALCULATOR_FRAME::OnTranslineRho_Button( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnTranslineRho_Button( wxCommandEvent& event )
{ {
wxArrayString list; wxArrayString list = StandardResistivityList();
// Specific resistance list in ohms*meters (rho):
list.Clear();
list.Add( wxT( "2.4e-8 gold" ) );
list.Add( wxT( "1.72e-8 copper" ) );
list.Add( wxT( "1.62e-8 silver" ) );
list.Add( wxT( "12.4e-8 tin" ) );
list.Add( wxT( "10.5e-8 platinum" ) );
list.Add( wxT( "2.62e-8 aluminum" ) );
list.Add( wxT( "6.9e-8 nickel" ) );
list.Add( wxT( "3.9e-8 brass (66Cu 34Zn)" ) );
list.Add( wxT( "9.71e-8 iron" ) );
list.Add( wxT( "6.0e-8 zinc" ) );
wxString value = wxGetSingleChoice( wxEmptyString, wxString value = wxGetSingleChoice( wxEmptyString,
_("Specific Resistance"), list).BeforeFirst( ' ' ); _("Specific Resistance"), list).BeforeFirst( ' ' );

View File

@ -2,11 +2,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011-2014 Jean-Pierre Charras * Copyright (C) 2011-2014 Jean-Pierre Charras
* Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2014 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**

View File

@ -2,11 +2,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011-2014 Jean-Pierre Charras * Copyright (C) 2011-2014 Jean-Pierre Charras
* Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2014 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**

View File

@ -2,11 +2,11 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011-2014 Jean-Pierre Charras * Copyright (C) 2011-2014 Jean-Pierre Charras
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,12 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/* /*

View File

@ -1,11 +1,11 @@
/* /*
* This program source code file is part of KICAD, a free EDA CAD application. * This program source code file is part of KICAD, a free EDA CAD application.
* *
* Copyright (C) 1992-2019 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -13,12 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, you may find one here: * with this program. If not, see <http://www.gnu.org/licenses/>.
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/* All calculations are based on this [1] online calculator: /* All calculations are based on this [1] online calculator:
@ -56,6 +52,8 @@
#include <UnitSelector.h> #include <UnitSelector.h>
#include <units_scales.h> #include <units_scales.h>
#include <common_data.h>
extern double DoubleFromString( const wxString& TextValue ); extern double DoubleFromString( const wxString& TextValue );
// Key words to read/write some parameters in config: // Key words to read/write some parameters in config:
@ -69,8 +67,6 @@ extern double DoubleFromString( const wxString& TextValue );
#define KEYWORD_VS_PAD_DIA_UNIT wxT( "VS_Pad_Dia_Unit" ) #define KEYWORD_VS_PAD_DIA_UNIT wxT( "VS_Pad_Dia_Unit" )
#define KEYWORD_VS_CLEARANCE_DIA wxT( "VS_Clearance_Dia" ) #define KEYWORD_VS_CLEARANCE_DIA wxT( "VS_Clearance_Dia" )
#define KEYWORD_VS_CLEARANCE_DIA_UNIT wxT( "VS_Clearance_Dia_Unit" ) #define KEYWORD_VS_CLEARANCE_DIA_UNIT wxT( "VS_Clearance_Dia_Unit" )
#define KEYWORD_VS_PCB_THICKNESS wxT( "VS_PCB_Thickness" )
#define KEYWORD_VS_PCB_THICKNESS_UNIT wxT( "VS_PCB_Thickness_Unit" )
#define KEYWORD_VS_CH_IMPEDANCE wxT( "VS_Characteristic_Impedance" ) #define KEYWORD_VS_CH_IMPEDANCE wxT( "VS_Characteristic_Impedance" )
#define KEYWORD_VS_CH_IMPEDANCE_UNIT wxT( "VS_Characteristic_Impedance_Unit" ) #define KEYWORD_VS_CH_IMPEDANCE_UNIT wxT( "VS_Characteristic_Impedance_Unit" )
#define KEYWORD_VS_CURRENT wxT( "VS_Current" ) #define KEYWORD_VS_CURRENT wxT( "VS_Current" )
@ -85,22 +81,7 @@ extern double DoubleFromString( const wxString& TextValue );
*/ */
void PCB_CALCULATOR_FRAME::OnViaEpsilonR_Button( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnViaEpsilonR_Button( wxCommandEvent& event )
{ {
wxArrayString list; wxArrayString list = StandardRelativeDielectricConstantList();
// EpsilonR ( relative dielectric constant) list
list.Add( wxT( "4.5 FR4" ) );
list.Add( wxT( "9.8 alumina (Al2O3)" ) );
list.Add( wxT( "3.78 fused quartz" ) );
list.Add( wxT( "3.38 RO4003" ) );
list.Add( wxT( "2.2 RT/duroid 5880" ) );
list.Add( wxT( "10.2 RT/duroid 6010LM" ) );
list.Add( wxT( "2.1 teflon (PTFE)" ) );
list.Add( wxT( "4.0 PVC" ) );
list.Add( wxT( "2.3 PE" ) );
list.Add( wxT( "6.6 beryllia (BeO)" ) );
list.Add( wxT( "8.7 aluminum nitride" ) );
list.Add( wxT( "11.9 silicon" ) );
list.Add( wxT( "12.9 GaAs" ) );
wxString value = wxGetSingleChoice( wxEmptyString, wxString value = wxGetSingleChoice( wxEmptyString,
_("Relative Dielectric Constants"), list).BeforeFirst( ' ' ); _("Relative Dielectric Constants"), list).BeforeFirst( ' ' );
@ -114,20 +95,7 @@ void PCB_CALCULATOR_FRAME::OnViaEpsilonR_Button( wxCommandEvent& event )
*/ */
void PCB_CALCULATOR_FRAME::OnViaRho_Button( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::OnViaRho_Button( wxCommandEvent& event )
{ {
wxArrayString list; wxArrayString list = StandardResistivityList();
// Specific resistance list in ohms*meters (rho):
list.Clear();
list.Add( wxT( "2.4e-8 gold" ) );
list.Add( wxT( "1.72e-8 copper" ) );
list.Add( wxT( "1.62e-8 silver" ) );
list.Add( wxT( "12.4e-8 tin" ) );
list.Add( wxT( "10.5e-8 platinum" ) );
list.Add( wxT( "2.62e-8 aluminum" ) );
list.Add( wxT( "6.9e-8 nickel" ) );
list.Add( wxT( "3.9e-8 brass (66Cu 34Zn)" ) );
list.Add( wxT( "9.71e-8 iron" ) );
list.Add( wxT( "6.0e-8 zinc" ) );
wxString value = wxGetSingleChoice( wxEmptyString, wxString value = wxGetSingleChoice( wxEmptyString,
_("Specific Resistance"), list).BeforeFirst( ' ' ); _("Specific Resistance"), list).BeforeFirst( ' ' );
@ -140,35 +108,38 @@ void PCB_CALCULATOR_FRAME::VS_Init( wxConfigBase* aCfg )
int tmp; int tmp;
wxString msg; wxString msg;
#define DEFAULT_UNIT_SEL_MM 0
// Read parameter values // Read parameter values
aCfg->Read( KEYWORD_VS_HOLE_DIA, &msg, wxT( "18" ) ); aCfg->Read( KEYWORD_VS_HOLE_DIA, &msg, wxT( "0.4" ) );
m_textCtrlHoleDia->SetValue( msg ); m_textCtrlHoleDia->SetValue( msg );
aCfg->Read( KEYWORD_VS_HOLE_DIA_UNIT, &tmp, 0 ); aCfg->Read( KEYWORD_VS_HOLE_DIA_UNIT, &tmp, DEFAULT_UNIT_SEL_MM );
m_choiceHoleDia->SetSelection( tmp ); m_choiceHoleDia->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_THICKNESS, &msg, wxT( "1" ) );
aCfg->Read( KEYWORD_VS_THICKNESS, &msg, wxT( "0.035" ) );
m_textCtrlPlatingThickness->SetValue( msg ); m_textCtrlPlatingThickness->SetValue( msg );
aCfg->Read( KEYWORD_VS_THICKNESS_UNIT, &tmp, 0 ); aCfg->Read( KEYWORD_VS_THICKNESS_UNIT, &tmp, DEFAULT_UNIT_SEL_MM );
m_choicePlatingThickness->SetSelection( tmp ); m_choicePlatingThickness->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_LENGTH, &msg, wxT( "60" ) );
aCfg->Read( KEYWORD_VS_LENGTH, &msg, wxT( "1.6" ) );
m_textCtrlViaLength->SetValue( msg ); m_textCtrlViaLength->SetValue( msg );
aCfg->Read( KEYWORD_VS_LENGTH_UNIT, &tmp, 0 ); aCfg->Read( KEYWORD_VS_LENGTH_UNIT, &tmp, DEFAULT_UNIT_SEL_MM );
m_choiceViaLength->SetSelection( tmp ); m_choiceViaLength->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_PAD_DIA, &msg, wxT( "22" ) );
aCfg->Read( KEYWORD_VS_PAD_DIA, &msg, wxT( "0.6" ) );
m_textCtrlViaPadDia->SetValue( msg ); m_textCtrlViaPadDia->SetValue( msg );
aCfg->Read( KEYWORD_VS_PAD_DIA_UNIT, &tmp, 0 ); aCfg->Read( KEYWORD_VS_PAD_DIA_UNIT, &tmp, DEFAULT_UNIT_SEL_MM );
m_choiceViaPadDia->SetSelection( tmp ); m_choiceViaPadDia->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_CLEARANCE_DIA, &msg, wxT( "25" ) );
aCfg->Read( KEYWORD_VS_CLEARANCE_DIA, &msg, wxT( "1.0" ) );
m_textCtrlClearanceDia->SetValue( msg ); m_textCtrlClearanceDia->SetValue( msg );
aCfg->Read( KEYWORD_VS_CLEARANCE_DIA_UNIT, &tmp, 0 ); aCfg->Read( KEYWORD_VS_CLEARANCE_DIA_UNIT, &tmp, DEFAULT_UNIT_SEL_MM );
m_choiceClearanceDia->SetSelection( tmp ); m_choiceClearanceDia->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_PCB_THICKNESS, &msg, wxT( "70" ) );
m_textCtrlBoardThickness->SetValue( msg );
aCfg->Read( KEYWORD_VS_PCB_THICKNESS_UNIT, &tmp, 0 );
m_choiceBoardThickness->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_CH_IMPEDANCE, &msg, wxT( "50" ) ); aCfg->Read( KEYWORD_VS_CH_IMPEDANCE, &msg, wxT( "50" ) );
m_textCtrlImpedance->SetValue( msg ); m_textCtrlImpedance->SetValue( msg );
aCfg->Read( KEYWORD_VS_CH_IMPEDANCE_UNIT , &tmp, 0 ); aCfg->Read( KEYWORD_VS_CH_IMPEDANCE_UNIT , &tmp, DEFAULT_UNIT_SEL_MM );
m_choiceImpedance->SetSelection( tmp ); m_choiceImpedance->SetSelection( tmp );
aCfg->Read( KEYWORD_VS_CURRENT, &msg, wxT( "1" ) ); aCfg->Read( KEYWORD_VS_CURRENT, &msg, wxT( "1" ) );
m_textCtrlAppliedCurrent->SetValue( msg ); m_textCtrlAppliedCurrent->SetValue( msg );
aCfg->Read( KEYWORD_VS_RESISTIVITY, &msg, wxT( "1.72e-8" ) ); aCfg->Read( KEYWORD_VS_RESISTIVITY, &msg, wxT( "1.72e-8" ) );
@ -194,8 +165,6 @@ void PCB_CALCULATOR_FRAME::VS_WriteConfig( wxConfigBase* aCfg )
aCfg->Write( KEYWORD_VS_PAD_DIA_UNIT, m_choiceViaPadDia->GetSelection() ); aCfg->Write( KEYWORD_VS_PAD_DIA_UNIT, m_choiceViaPadDia->GetSelection() );
aCfg->Write( KEYWORD_VS_CLEARANCE_DIA, m_textCtrlClearanceDia->GetValue() ); aCfg->Write( KEYWORD_VS_CLEARANCE_DIA, m_textCtrlClearanceDia->GetValue() );
aCfg->Write( KEYWORD_VS_CLEARANCE_DIA_UNIT, m_choiceClearanceDia->GetSelection() ); aCfg->Write( KEYWORD_VS_CLEARANCE_DIA_UNIT, m_choiceClearanceDia->GetSelection() );
aCfg->Write( KEYWORD_VS_PCB_THICKNESS, m_textCtrlBoardThickness->GetValue() );
aCfg->Write( KEYWORD_VS_PCB_THICKNESS_UNIT, m_choiceBoardThickness->GetSelection() );
aCfg->Write( KEYWORD_VS_CH_IMPEDANCE, m_textCtrlImpedance->GetValue() ); aCfg->Write( KEYWORD_VS_CH_IMPEDANCE, m_textCtrlImpedance->GetValue() );
aCfg->Write( KEYWORD_VS_CH_IMPEDANCE_UNIT, m_choiceImpedance->GetSelection() ); aCfg->Write( KEYWORD_VS_CH_IMPEDANCE_UNIT, m_choiceImpedance->GetSelection() );
aCfg->Write( KEYWORD_VS_CURRENT, m_textCtrlAppliedCurrent->GetValue() ); aCfg->Write( KEYWORD_VS_CURRENT, m_textCtrlAppliedCurrent->GetValue() );
@ -213,7 +182,6 @@ void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event )
double viaLength = std::abs( DoubleFromString( m_textCtrlViaLength->GetValue() ) ); double viaLength = std::abs( DoubleFromString( m_textCtrlViaLength->GetValue() ) );
double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) ); double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) ); double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
double pcbThickness = std::abs( DoubleFromString( m_textCtrlBoardThickness->GetValue() ) );
double charImpedance = std::abs( DoubleFromString( m_textCtrlImpedance->GetValue() ) ); double charImpedance = std::abs( DoubleFromString( m_textCtrlImpedance->GetValue() ) );
double appliedCurrent = std::abs( DoubleFromString( m_textCtrlAppliedCurrent->GetValue() ) ); double appliedCurrent = std::abs( DoubleFromString( m_textCtrlAppliedCurrent->GetValue() ) );
double platingResistivity = std::abs( DoubleFromString( m_textCtrlPlatingResistivity->GetValue() ) ); double platingResistivity = std::abs( DoubleFromString( m_textCtrlPlatingResistivity->GetValue() ) );
@ -227,7 +195,6 @@ void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event )
viaLength *= m_choiceViaLength->GetUnitScale(); viaLength *= m_choiceViaLength->GetUnitScale();
padDia *= m_choiceViaPadDia->GetUnitScale(); padDia *= m_choiceViaPadDia->GetUnitScale();
clearanceDia *= m_choiceClearanceDia->GetUnitScale(); clearanceDia *= m_choiceClearanceDia->GetUnitScale();
pcbThickness *= m_choiceBoardThickness->GetUnitScale();
charImpedance *= m_choiceImpedance->GetUnitScale(); charImpedance *= m_choiceImpedance->GetUnitScale();
platingResistivity = platingResistivity / 100; // Ohm-cm to Ohm-m platingResistivity = platingResistivity / 100; // Ohm-cm to Ohm-m
@ -279,30 +246,30 @@ void PCB_CALCULATOR_FRAME::VSDisplayValues( double aViaResistance, double aVolta
{ {
wxString msg; wxString msg;
msg.Printf( wxT( "%g" ), aViaResistance ); msg.Printf( "%g", aViaResistance );
m_ViaResistance->SetLabel( msg ); m_ViaResistance->SetLabel( msg );
msg.Printf( wxT( "%g" ), aVoltageDrop ); msg.Printf( "%g", aVoltageDrop );
m_ViaVoltageDrop->SetLabel( msg ); m_ViaVoltageDrop->SetLabel( msg );
msg.Printf( wxT( "%g" ), aPowerLoss ); msg.Printf( "%g", aPowerLoss );
m_ViaPowerLoss->SetLabel( msg ); m_ViaPowerLoss->SetLabel( msg );
msg.Printf( wxT( "%g" ), aEstimatedAmpacity ); msg.Printf( "%g", aEstimatedAmpacity );
m_ViaAmpacity->SetLabel( msg ); m_ViaAmpacity->SetLabel( msg );
msg.Printf( wxT( "%g" ), aThermalResistance ); msg.Printf( "%g", aThermalResistance );
m_ViaThermalResistance->SetLabel( msg ); m_ViaThermalResistance->SetLabel( msg );
msg.Printf( wxT( "%g" ), aCapacitance ); msg.Printf( "%g", aCapacitance );
m_ViaCapacitance->SetLabel( msg ); m_ViaCapacitance->SetLabel( msg );
msg.Printf( wxT( "%g" ), aTimeDegradation ); msg.Printf( "%g", aTimeDegradation );
m_RiseTimeOutput->SetLabel( msg ); m_RiseTimeOutput->SetLabel( msg );
msg.Printf( wxT( "%g" ), aInductance ); msg.Printf( "%g", aInductance );
m_Inductance->SetLabel( msg ); m_Inductance->SetLabel( msg );
msg.Printf( wxT( "%g" ), aReactance ); msg.Printf( "%g", aReactance );
m_Reactance->SetLabel( msg ); m_Reactance->SetLabel( msg );
} }