diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b40156f87..740f68d6ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,6 +239,7 @@ add_subdirectory(polygon)
add_subdirectory(polygon/kbool/src)
add_subdirectory(potrace)
add_subdirectory(bitmap2component)
+add_subdirectory(pcb_calculator)
#add_subdirectory(new)
#############
diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp
index c65c894b4c..8585ae6981 100644
--- a/eeschema/backanno.cpp
+++ b/eeschema/backanno.cpp
@@ -15,18 +15,25 @@
#include "general.h"
#include "sch_sheet_path.h"
#include "sch_component.h"
+#include "netlist.h"
const wxString BackAnnotateFileWildcard( wxT( "EESchema Back Annotation File (*.stf)|*.stf" ) );
-bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeToVisible )
+bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVisible )
{
int LineNum = 0;
char* cp, Ref[256], FootPrint[256], Line[1024];
SCH_SHEET_LIST SheetList;
+ wxString reference;
+ wxString footprint;
- while( GetLine( aFilename, Line, &LineNum, sizeof(Line) ) )
+ // Build a flat list of components in schematic:
+ SCH_REFERENCE_LIST referencesList;
+ SheetList.GetComponents( referencesList, false );
+
+ while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) )
{
if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 )
{
@@ -38,12 +45,39 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFilename, bool aSetFieldAttributeT
if( *cp == '"' )
*cp = 0;
- wxString reference = FROM_UTF8( Ref );
- wxString Footprint = FROM_UTF8( FootPrint );
- SheetList.SetComponentFootprint( reference, Footprint, aSetFieldAttributeToVisible );
+ reference = FROM_UTF8( Ref );
+ footprint = FROM_UTF8( FootPrint );
+
+ // Search the component in the flat list
+ for( unsigned ii = 0; ii < referencesList.GetCount(); ii++ )
+ {
+ if( reference.CmpNoCase( referencesList[ii].GetRef() ) == 0 )
+ {
+ // We have found a candidate.
+ // Note: it can be not unique (multiple parts per package)
+ // So we do not stop the search here
+ SCH_COMPONENT* component = referencesList[ii].GetComponent();
+ SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
+ if( fpfield->m_Text.IsEmpty()
+ && ( fpfield->m_Pos == wxPoint( 0, 0 ) ) )
+ {
+ fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
+ fpfield->m_Pos = component->GetField( VALUE )->m_Pos;
+ fpfield->m_Pos.y -= 100;
+ }
+
+ fpfield->m_Text = footprint;
+
+ if( aSetFieldAttributeToVisible )
+ component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE;
+ else
+ component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE;
+ }
+ }
}
}
+ fclose( aFile );
return true;
}
diff --git a/eeschema/dialog_erc_listbox.h b/eeschema/dialog_erc_listbox.h
index 4d45b1de76..e3c828253f 100644
--- a/eeschema/dialog_erc_listbox.h
+++ b/eeschema/dialog_erc_listbox.h
@@ -43,12 +43,14 @@ public:
* Function AppendToList
* @param aItem The SCH_MARKER* to add to the current list which will be
* displayed in the wxHtmlListBox
+ * @param aRefresh = true to refresh the display
*/
- void AppendToList( SCH_MARKER* aItem )
+ void AppendToList( SCH_MARKER* aItem, bool aRefresh = true )
{
m_MarkerList.push_back( aItem);
SetItemCount( m_MarkerList.size() );
- Refresh();
+ if( aRefresh )
+ Refresh();
}
diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp
index 61f2d179b4..3b543f1aa4 100644
--- a/eeschema/dialogs/dialog_erc.cpp
+++ b/eeschema/dialogs/dialog_erc.cpp
@@ -325,17 +325,11 @@ void DIALOG_ERC::DisplayERC_MarkersList()
SCH_MARKER* Marker = (SCH_MARKER*) DrawStruct;
if( Marker->GetMarkerType() != MARK_ERC )
continue;
-
- /* Display diag */
-
-// wxString msg;
-// msg.Printf( _( "sheet %s
\n" ),
-// Sheet->PathHumanReadable().GetData() );
-// msg += Marker->GetReporter().ShowHtml();
-// m_MarkersList->Append( msg );
- m_MarkersList->AppendToList( Marker );
+ // Add marker without refresh the displayed list:
+ m_MarkersList->AppendToList( Marker, false );
}
}
+ m_MarkersList->Refresh();
}
diff --git a/include/common.h b/include/common.h
index 210e8a51d6..b3aab67431 100644
--- a/include/common.h
+++ b/include/common.h
@@ -54,6 +54,7 @@ enum pseudokeys {
#define EESCHEMA_EXE wxT( "eeschema.exe" )
#define GERBVIEW_EXE wxT( "gerbview.exe" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.exe" )
+#define PCB_CALCULATOR_EXE wxT( "pcb_calculator.exe" )
#else
#ifndef __WXMAC__
#define CVPCB_EXE wxT( "cvpcb" )
@@ -61,12 +62,14 @@ enum pseudokeys {
#define EESCHEMA_EXE wxT( "eeschema" )
#define GERBVIEW_EXE wxT( "gerbview" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component" )
+#define PCB_CALCULATOR_EXE wxT( "pcb_calculator" )
#else
#define CVPCB_EXE wxT( "cvpcb.app/Contents/MacOS/cvpcb" )
#define PCBNEW_EXE wxT( "pcbnew.app/Contents/MacOS/pcbnew" )
#define EESCHEMA_EXE wxT( "eeschema.app/Contents/MacOS/eeschema" )
#define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
+#define PCB_CALCULATOR_EXE wxT( "pcb_calculator.app/Contents/MacOS/pcb_calculator" )
# endif
#endif
diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp
index 1e7cd1d108..b826b25e04 100644
--- a/kicad/commandframe.cpp
+++ b/kicad/commandframe.cpp
@@ -10,6 +10,7 @@
#include "kicad.h"
#include "../bitmap2component/bitmap2component.xpm"
+#include "../pcb_calculator/bitmaps/pcb_calculator.xpm"
RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
wxSashLayoutWindow( parent, wxID_ANY )
@@ -86,6 +87,9 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
btn = AddBitmapButton( ID_TO_BITMAP_CONVERTER, wxBitmap( bitmap2component_xpm ) );
btn->SetToolTip( _( "Bitmap2Component (a tool to build a logo from a bitmap)\n\
Creates a component (for Eeschema) or a footprint (for Pcbnew) that shows a B&W picture" ) );
+
+ btn = AddBitmapButton( ID_TO_PCB_CALCULATOR, wxBitmap( pcb_calculator_xpm ) );
+ btn->SetToolTip( _( "Pcb calculator" ) );
}
diff --git a/kicad/kicad.h b/kicad/kicad.h
index 5d8f7e4c6a..4c2af3d1a2 100644
--- a/kicad/kicad.h
+++ b/kicad/kicad.h
@@ -44,6 +44,7 @@ enum id_kicad_frm {
ID_TO_EESCHEMA,
ID_TO_GERBVIEW,
ID_TO_BITMAP_CONVERTER,
+ ID_TO_PCB_CALCULATOR,
ID_BROWSE_AN_SELECT_FILE,
ID_SELECT_PREFERED_EDITOR,
ID_SELECT_PREFERED_PDF_BROWSER_NAME,
@@ -93,6 +94,7 @@ public:
void OnRunEeschema( wxCommandEvent& event );
void OnRunGerbview( wxCommandEvent& event );
void OnRunBitmapConverter( wxCommandEvent& event );
+ void OnRunPcbCalculator( wxCommandEvent& event );
void OnOpenTextEditor( wxCommandEvent& event );
void OnOpenFileInTextEditor( wxCommandEvent& event );
diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp
index c51ed7c506..429eca1535 100644
--- a/kicad/mainframe.cpp
+++ b/kicad/mainframe.cpp
@@ -176,6 +176,10 @@ void KICAD_MANAGER_FRAME::OnRunBitmapConverter( wxCommandEvent& event )
ExecuteFile( this, BITMAPCONVERTER_EXE, wxEmptyString );
}
+void KICAD_MANAGER_FRAME::OnRunPcbCalculator( wxCommandEvent& event )
+{
+ ExecuteFile( this, PCB_CALCULATOR_EXE, wxEmptyString );
+}
void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event )
{
diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp
index b34b08b930..50f4c2f03e 100644
--- a/kicad/menubar.cpp
+++ b/kicad/menubar.cpp
@@ -51,6 +51,7 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_BUTTON( ID_TO_EESCHEMA, KICAD_MANAGER_FRAME::OnRunEeschema )
EVT_BUTTON( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
+ EVT_BUTTON( ID_TO_PCB_CALCULATOR, KICAD_MANAGER_FRAME::OnRunPcbCalculator )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser )
diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt
new file mode 100644
index 0000000000..b33a1b5c02
--- /dev/null
+++ b/pcb_calculator/CMakeLists.txt
@@ -0,0 +1,68 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/bitmaps
+ ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
+ ${CMAKE_CURRENT_SOURCE_DIR}/transline
+ ${CMAKE_CURRENT_SOURCE_DIR}/attenuators
+ )
+
+set(PCB_CALCULATOR_SRCS
+ attenuators.cpp
+ board_classes_values.cpp
+ pcb_calculator.cpp
+ pcb_calculator_frame.cpp
+ colorcode.cpp
+ params_read_write.cpp
+ regulators_funct.cpp
+ transline_ident.cpp
+ UnitSelector.cpp
+ transline/transline.cpp
+ transline/c_microstrip.cpp
+ transline/microstrip.cpp
+ transline/coplanar.cpp
+ transline/coax.cpp
+ transline/rectwaveguide.cpp
+ transline/stripline.cpp
+ transline/twistedpair.cpp
+ transline_dlg_funct.cpp
+ dialogs/pcb_calculator_frame_base.cpp
+ attenuators/attenuator_classes.cpp
+ )
+
+if(WIN32)
+ if(MINGW)
+ # PCB_CALCULATOR_RESOURCES variable is set by the macro.
+ mingw_resource_compiler(pcb_calculator)
+ else(MINGW)
+ set(PCB_CALCULATOR_RESOURCES pcb_calculator.rc)
+ endif(MINGW)
+endif(WIN32)
+
+
+if(APPLE)
+ set(PCB_CALCULATOR_RESOURCES pcb_calculator.icns)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set(MACOSX_BUNDLE_ICON_FILE pcb_calculator.icns)
+ set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcb_calculator)
+endif(APPLE)
+
+
+
+add_executable(pcb_calculator WIN32 MACOSX_BUNDLE
+ ${PCB_CALCULATOR_SRCS}
+ ${PCB_CALCULATOR_RESOURCES})
+
+
+if(APPLE)
+ set_target_properties(pcb_calculator PROPERTIES MACOSX_BUNDLE_INFO_PLIST
+ ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
+target_link_libraries( pcb_calculator
+ ${wxWidgets_LIBRARIES}
+ )
+
+install(TARGETS pcb_calculator
+ DESTINATION ${KICAD_BIN}
+ COMPONENT binary)
+
diff --git a/pcb_calculator/UnitSelector.cpp b/pcb_calculator/UnitSelector.cpp
new file mode 100644
index 0000000000..f14155bea0
--- /dev/null
+++ b/pcb_calculator/UnitSelector.cpp
@@ -0,0 +1,119 @@
+ /**
+ * @file UnitSelector.cpp
+ * a wxChoiceBox to select units in Pcb_Calculator
+ */
+
+#include "UnitSelector.h"
+#include "units_scales.h"
+
+UNIT_SELECTOR_LEN::UNIT_SELECTOR_LEN(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style )
+ : UNIT_SELECTOR( parent, id, pos, size, choices, style )
+{
+ Append( _("mm") );
+ Append( _("um") );
+ Append( _("cm") );
+ Append( _("mil") );
+ Append( _("inch") );
+};
+
+
+/*
+ * Function GetUnitScale
+ * return the scaling factor to convert users units
+ * to normalized units (meter )
+ */
+double UNIT_SELECTOR_LEN::GetUnitScale()
+{
+ switch( GetCurrentSelection() )
+ {
+ case 0: return UNIT_MM; break;
+ case 1: return UNIT_MICRON; break;
+ case 2: return UNIT_CM; break;
+ case 3: return UNIT_MIL; break;
+ case 4: return UNIT_INCH; break;
+ }
+ return 1.0;
+}
+
+
+UNIT_SELECTOR_FREQUENCY::UNIT_SELECTOR_FREQUENCY(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style )
+ : UNIT_SELECTOR( parent, id, pos, size, choices, style )
+{
+ Append( _("GHz") );
+ Append( _("MHz") );
+ Append( _("KHz") );
+ Append( _("Hz") );
+};
+
+/*
+ * Function GetUnitScale
+ * return the scaling factor to convert users units
+ * to normalized units (herz )
+ */
+double UNIT_SELECTOR_FREQUENCY::GetUnitScale()
+{
+ switch( GetCurrentSelection() )
+ {
+ case 0: return UNIT_GHZ; break;
+ case 1: return UNIT_MHZ; break;
+ case 2: return UNIT_KHZ; break;
+ case 3: return 1.0; break;
+ }
+ return 1.0;
+}
+
+
+UNIT_SELECTOR_ANGLE::UNIT_SELECTOR_ANGLE(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style )
+ : UNIT_SELECTOR( parent, id, pos, size, choices, style )
+{
+ Append( _("Radian") );
+ Append( _("Degree") );
+};
+
+/*
+ * Function GetUnitScale
+ * return the scaling factor to convert users units
+ * to normalized units ( radian )
+ */
+double UNIT_SELECTOR_ANGLE::GetUnitScale()
+{
+ switch( GetCurrentSelection() )
+ {
+ case 0: return UNIT_RADIAN; break;
+ case 1: return UNIT_DEGREE; break;
+ }
+ return 1.0;
+}
+
+
+UNIT_SELECTOR_RESISTOR::UNIT_SELECTOR_RESISTOR(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style )
+ : UNIT_SELECTOR( parent, id, pos, size, choices, style )
+{
+ Append( _("Ohm") );
+ Append( _("KOhm") );
+};
+
+
+/*
+ * Function GetUnitScale
+ * return the scaling factor to convert users units
+ * to normalized units ( ohm )
+ */
+double UNIT_SELECTOR_RESISTOR::GetUnitScale()
+{
+ switch( GetCurrentSelection() )
+ {
+ case 0: return UNIT_OHM; break;
+ case 1: return UNIT_KOHM; break;
+ }
+ return 1.0;
+}
+
diff --git a/pcb_calculator/UnitSelector.h b/pcb_calculator/UnitSelector.h
new file mode 100644
index 0000000000..c93c5c1e25
--- /dev/null
+++ b/pcb_calculator/UnitSelector.h
@@ -0,0 +1,92 @@
+ /**
+ * @file UnitSelector.h
+ * a wxChoiceBox to select units in Pcb_Calculator
+ */
+
+#ifndef _UnitSelector_h_
+#define _UnitSelector_h_
+
+
+#include
+#include
+
+
+class UNIT_SELECTOR: public wxChoice
+{
+public:
+ UNIT_SELECTOR(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style = 0 ):
+ wxChoice( parent, id, pos, size, choices, style )
+ {
+ }
+
+ /**
+ * Function GetUnitScale
+ * @return the scaling factor to convert users units
+ * to normalized units (meter, herz, ohm, radian )
+ */
+ virtual double GetUnitScale() = 0;
+};
+
+class UNIT_SELECTOR_LEN: public UNIT_SELECTOR
+{
+public:
+ UNIT_SELECTOR_LEN(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style = 0 );
+
+ /**
+ * Function GetUnitScale
+ * @return the scaling factor to convert users units
+ * to normalized units (meter)
+ */
+ virtual double GetUnitScale();
+};
+
+class UNIT_SELECTOR_FREQUENCY: public UNIT_SELECTOR
+{
+public:
+ UNIT_SELECTOR_FREQUENCY(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style = 0 );
+
+ /**
+ * Function GetUnitScale
+ * @return the scaling factor to convert users units
+ * to normalized units (Hz)
+ */
+ virtual double GetUnitScale();
+};
+
+class UNIT_SELECTOR_ANGLE: public UNIT_SELECTOR
+{
+public:
+ UNIT_SELECTOR_ANGLE(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style = 0 );
+
+ /**
+ * Function GetUnitScale
+ * @return the scaling factor to convert users units
+ * to normalized units (Hz)
+ */
+ virtual double GetUnitScale();
+};
+
+class UNIT_SELECTOR_RESISTOR: public UNIT_SELECTOR
+{
+public:
+ UNIT_SELECTOR_RESISTOR(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ const wxArrayString& choices, long style = 0 );
+
+ /**
+ * Function GetUnitScale
+ * @return the scaling factor to convert users units
+ * to normalized units (Hz)
+ */
+ virtual double GetUnitScale();
+};
+#endif // _UnitSelector_h_
+
diff --git a/pcb_calculator/attenuators.cpp b/pcb_calculator/attenuators.cpp
new file mode 100644
index 0000000000..e79cab749a
--- /dev/null
+++ b/pcb_calculator/attenuators.cpp
@@ -0,0 +1,160 @@
+/**
+ * @file attenuators.cpp
+ */
+
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 12011 jean-pierre.charras
+ * Copyright (C) 2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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 "pcb_calculator.h"
+#include "attenuator_classes.h"
+
+extern double ReturnDoubleFromString( const wxString& TextValue );
+
+// Called on a attenuator selection
+void PCB_CALCULATOR_FRAME::OnAttenuatorSelection( wxCommandEvent& event )
+{
+ SetAttenuator( (unsigned) event.GetSelection() );
+ Refresh();
+}
+
+
+void PCB_CALCULATOR_FRAME::SetAttenuator( unsigned aIdx )
+{
+ if( aIdx >=m_attenuator_list.size() )
+ aIdx = m_attenuator_list.size() - 1;
+ m_currAttenuator = m_attenuator_list[aIdx];
+ TransfAttenuatorDataToPanel();
+ m_Attenuator_Messages->Clear();
+ m_Att_R1_Value->SetValue( wxEmptyString );
+ m_Att_R2_Value->SetValue( wxEmptyString );
+ m_Att_R3_Value->SetValue( wxEmptyString );
+}
+
+
+void PCB_CALCULATOR_FRAME::OnCalculateAttenuator( wxCommandEvent& event )
+{
+ TransfPanelDataToAttenuator();
+ m_currAttenuator->Calculate();
+ TransfAttenuatorResultsToPanel();
+}
+
+
+void PCB_CALCULATOR_FRAME::TransfPanelDataToAttenuator()
+{
+ wxString msg;
+
+ msg = m_AttValueCtrl->GetValue();
+ m_currAttenuator->m_Attenuation = ReturnDoubleFromString(msg);
+ msg = m_ZinValueCtrl->GetValue();
+ m_currAttenuator->m_Zin = ReturnDoubleFromString(msg);
+ msg = m_ZoutValueCtrl->GetValue();
+ m_currAttenuator->m_Zout = ReturnDoubleFromString(msg);
+}
+
+
+void PCB_CALCULATOR_FRAME::TransfAttenuatorDataToPanel()
+{
+ wxString msg;
+
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_Attenuation );
+ m_AttValueCtrl->SetValue( msg );
+ m_AttValueCtrl->Enable( m_currAttenuator->m_Attenuation_Enable );
+
+ m_ZinValueCtrl->Enable( m_currAttenuator->m_Zin_Enable );
+ if( m_currAttenuator->m_Zin_Enable )
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_Zin );
+ else
+ msg.Clear();;
+ m_ZinValueCtrl->SetValue( msg );
+
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_Zout );
+ m_ZoutValueCtrl->SetValue( msg );
+}
+
+
+void PCB_CALCULATOR_FRAME::TransfAttenuatorResultsToPanel()
+{
+ wxString msg;
+
+ m_Attenuator_Messages->Clear();
+
+ if( m_currAttenuator->m_Error )
+ {
+ msg.Printf( _( "Error!\nSet attenuation more than %f dB" ),
+ m_currAttenuator->m_MinimumATT );
+ m_Attenuator_Messages->AppendText( msg );
+ msg = wxT( "--" );
+ m_Att_R1_Value->SetValue( msg );
+ m_Att_R2_Value->SetValue( msg );
+ if( m_currAttenuator->m_ResultCount >= 3 )
+ m_Att_R3_Value->SetValue( msg );
+
+ return;
+ }
+
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_R1 );
+ m_Att_R1_Value->SetValue( msg );
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_R2 );
+ m_Att_R2_Value->SetValue( msg );
+ if( m_currAttenuator->m_ResultCount < 3 )
+ m_Att_R3_Value->SetValue( wxEmptyString );
+ else
+ {
+ msg.Printf( wxT( "%f" ), m_currAttenuator->m_R3 );
+ m_Att_R3_Value->SetValue( msg );
+ }
+}
+
+
+void PCB_CALCULATOR_FRAME::OnPaintAttenuatorPanel( wxPaintEvent& event )
+{
+ wxPaintDC dc( m_panelDisplayAttenuator );
+
+ if( m_currAttenuator && m_currAttenuator->m_SchBitMap )
+ {
+ wxSize size = m_panelDisplayAttenuator->GetSize();
+ size.x -= m_currAttenuator->m_SchBitMap->GetWidth();
+ size.y -= m_currAttenuator->m_SchBitMap->GetHeight();
+ dc.DrawBitmap( *m_currAttenuator->m_SchBitMap, size.x / 2, size.y / 2 );
+ }
+
+ event.Skip();
+}
+
+
+void PCB_CALCULATOR_FRAME::OnPaintAttFormulaPanel( wxPaintEvent& event )
+{
+ wxPaintDC dc( m_panelAttFormula );
+
+ if( m_currAttenuator && m_currAttenuator->m_FormulaBitMap )
+ {
+ wxSize size = m_panelAttFormula->GetSize();
+ size.x -= m_currAttenuator->m_FormulaBitMap->GetWidth();
+ size.y -= m_currAttenuator->m_FormulaBitMap->GetHeight();
+ dc.DrawBitmap( *m_currAttenuator->m_FormulaBitMap, size.x / 2, size.y / 2 );
+ }
+
+ event.Skip();
+}
diff --git a/pcb_calculator/attenuators/attenuator_classes.cpp b/pcb_calculator/attenuators/attenuator_classes.cpp
new file mode 100644
index 0000000000..32362b0f0c
--- /dev/null
+++ b/pcb_calculator/attenuators/attenuator_classes.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+** From Qucs Attenuator Synthesis
+** attenuator_classes.cpp
+**
+** since 2006/6/14
+**
+*****************************************************************************/
+#include
+
+#include "attenuator_classes.h"
+
+// Bitmaps:
+#include "att_pi.xpm"
+#include "att_tee.xpm"
+#include "att_bridge.xpm"
+#include "att_splitter.xpm"
+#include "pi_formula.xpm"
+#include "tee_formula.xpm"
+#include "bridged_tee_formula.xpm"
+#include "splitter_formula.xpm"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+ATTENUATOR::ATTENUATOR( ATTENUATORS_TYPE aTopology )
+{
+ m_Name = wxT("att_base");
+ m_Error = false;
+ m_Topology = aTopology;
+ m_ResultCount = 3; // If 3 values must be calculated
+ m_Zin = 50; // Ohms
+ m_Zin_Enable = true;
+ m_Zout = 50; // Ohms
+ m_Attenuation = 6.0; // dB
+ m_Attenuation_Enable = true;
+ m_MinimumATT = 0.0; // dB
+ m_SchBitMap = NULL;
+ m_FormulaBitMap = NULL;
+}
+
+
+ATTENUATOR::~ATTENUATOR()
+{
+ delete m_SchBitMap;
+ delete m_FormulaBitMap;
+}
+
+
+#define KEYWORD_ATTENUATOR_ATT wxT( "Attenuation" )
+#define KEYWORD_ATTENUATOR_ZIN wxT( "Zin" )
+#define KEYWORD_ATTENUATOR_ZOUT wxT( "Zout" )
+#define KEYWORD_ATTENUATORS wxT( "Attenuators/" )
+
+void ATTENUATOR::ReadConfig( wxConfig* aConfig )
+{
+ aConfig->SetPath( KEYWORD_ATTENUATORS + m_Name );
+ if( m_Attenuation_Enable )
+ aConfig->Read( KEYWORD_ATTENUATOR_ATT, &m_Attenuation, 6.0 );
+ aConfig->Read( KEYWORD_ATTENUATOR_ZIN, &m_Zin, 50.0 );
+ aConfig->Read( KEYWORD_ATTENUATOR_ZOUT, &m_Zout, 50.0 );
+ aConfig->SetPath( wxT( "../.." ) );
+}
+
+
+void ATTENUATOR::WriteConfig( wxConfig* aConfig )
+{
+ aConfig->SetPath( KEYWORD_ATTENUATORS + m_Name );
+ aConfig->Write( KEYWORD_ATTENUATOR_ATT, m_Attenuation );
+ aConfig->Write( KEYWORD_ATTENUATOR_ZIN, m_Zin );
+ aConfig->Write( KEYWORD_ATTENUATOR_ZOUT, m_Zout );
+ aConfig->SetPath( wxT( "../.." ) );
+}
+
+
+ATTENUATOR_PI::ATTENUATOR_PI() : ATTENUATOR( PI_TYPE )
+{
+ m_Name = wxT("att_pi");
+ m_SchBitMap = new wxBitmap( att_pi_xpm );
+ m_FormulaBitMap = new wxBitmap( pi_formula_xpm );
+}
+
+
+bool ATTENUATOR_PI::Calculate()
+{
+ if( !ATTENUATOR::Calculate() )
+ return false;
+
+ m_R2 = ( (L - 1) / 2 ) * sqrt( m_Zin * m_Zout / L );
+ m_R1 = 1 / ( ( (A / m_Zin) ) - (1 / m_R2) );
+ m_R3 = 1 / ( ( (A / m_Zout) ) - (1 / m_R2) );
+
+ return true;
+}
+
+
+ATTENUATOR_TEE::ATTENUATOR_TEE() : ATTENUATOR( TEE_TYPE )
+{
+ m_Name = wxT("att_tee");
+ m_SchBitMap = new wxBitmap( att_tee_xpm );
+ m_FormulaBitMap = new wxBitmap( tee_formula_xpm );
+}
+
+
+bool ATTENUATOR_TEE::Calculate()
+{
+ if( !ATTENUATOR::Calculate() )
+ return false;
+
+ m_R2 = ( 2 * sqrt( L * m_Zin * m_Zout ) ) / (L - 1);
+ m_R1 = m_Zin * A - m_R2;
+ m_R3 = m_Zout * A - m_R2;
+
+ return true;
+}
+
+
+ATTENUATOR_BRIDGE::ATTENUATOR_BRIDGE() : ATTENUATOR( BRIDGE_TYPE )
+{
+ m_Name = wxT("att_bridge");
+ m_Zin_Enable = false;
+ m_ResultCount = 2;
+ m_SchBitMap = new wxBitmap( att_bridge_xpm );
+ m_FormulaBitMap = new wxBitmap( bridged_tee_formula_xpm );
+}
+
+
+bool ATTENUATOR_BRIDGE::Calculate()
+{
+ m_Zin = m_Zout;
+ if( !ATTENUATOR::Calculate() )
+ return false;
+
+ L = pow( 10, m_Attenuation / 20 );
+ m_R1 = m_Zin * (L - 1);
+ m_R2 = m_Zin / (L - 1);
+
+ return true;
+}
+
+
+ATTENUATOR_SPLITTER::ATTENUATOR_SPLITTER() : ATTENUATOR( SPLITTER_TYPE )
+{
+ m_Name = wxT("att_splitter");
+ m_Attenuation_Enable = false;
+ m_Attenuation = 6.0;
+ m_MinimumATT = 6.0;
+ m_Zin_Enable = false;
+ m_SchBitMap = new wxBitmap( att_splitter_xpm );
+ m_FormulaBitMap = new wxBitmap( splitter_formula_xpm );
+}
+
+
+bool ATTENUATOR_SPLITTER::Calculate()
+{
+ m_Attenuation = 6.0;
+ m_Zin = m_Zout;
+ m_R1 = m_R2 = m_R3 = m_Zout / 3.0;
+ return true;
+}
+
+
+bool ATTENUATOR::Calculate()
+{
+ L = pow( 10, m_Attenuation / 10 );
+
+ A = (L + 1) / (L - 1);
+
+ if( m_Zin > m_Zout )
+ {
+ Lmin = (2 * m_Zin / m_Zout) - 1 + 2 *
+ sqrt( m_Zin / m_Zout * (m_Zin / m_Zout - 1) );
+ }
+ else
+ {
+ Lmin = (2 * m_Zout / m_Zin) - 1 + 2 *
+ sqrt( m_Zout / m_Zin * (m_Zout / m_Zin - 1) );
+ }
+ m_MinimumATT = 10 * log10( Lmin );
+
+ if( m_MinimumATT > m_Attenuation )
+ {
+ m_Error = true;
+ return false;
+ }
+
+ m_Error = false;
+ return true;
+}
diff --git a/pcb_calculator/attenuators/attenuator_classes.h b/pcb_calculator/attenuators/attenuator_classes.h
new file mode 100644
index 0000000000..0a2e3f39fe
--- /dev/null
+++ b/pcb_calculator/attenuators/attenuator_classes.h
@@ -0,0 +1,101 @@
+/**
+ * @file attenuator_classes.h
+ */
+
+/*
+ * Attenuator Synthesis
+ *
+ * From Qucs
+ * Modified for Kicad
+ */
+
+#ifndef ATTENUATORFUNC_H
+#define ATTENUATORFUNC_H
+
+#include "wx/config.h"
+#include
+
+enum ATTENUATORS_TYPE {
+ PI_TYPE,
+ TEE_TYPE,
+ BRIDGE_TYPE,
+ SPLITTER_TYPE
+};
+
+class ATTENUATOR
+{
+protected:
+ ATTENUATORS_TYPE m_Topology;
+public:
+ wxString m_Name; // Identifier for config
+ int m_ResultCount; // Number of value to calculate, and therefore display
+ bool m_Error; // Set to true if values acnnot be calculated
+ double m_Zin; // Impedance of source
+ bool m_Zin_Enable; // Set to true when impedance of source has meaning
+ double m_Zout; // Impedance of load
+ double m_Attenuation; // Attenuation in dB
+ bool m_Attenuation_Enable; // Set to true when Attenuatiopn has meaning
+ double m_MinimumATT; // Minimun attenuation in dB from parameters
+ double m_R1; // value of R1
+ double m_R2; // value of R2
+ double m_R3; // value of R3 (if any)
+ wxBitmap* m_SchBitMap; // The schema of this attenuator
+ wxBitmap* m_FormulaBitMap; // The formula used to calcualte this attenuator
+
+protected:
+ double Lmin, L, A; // internal variable for temporary use
+
+
+protected:
+ // The constructor is protected, because this class is not intendent to be instancied
+ ATTENUATOR( ATTENUATORS_TYPE Topology );
+public:
+ ~ATTENUATOR();
+
+ /**
+ * Function Calculate
+ * calculates the values of components in attenuator
+ * @return true if ok, false if some values cannot be calculated
+ */
+ virtual bool Calculate();
+
+ /**
+ * Function ReadConfig
+ * Read values stored in config for this attenuator
+ * @param aConfig = the config to use
+ */
+ void ReadConfig( wxConfig* aConfig );
+
+ /**
+ * Function WriteConfig
+ * Read values stored in config for this attenuator
+ * @param aConfig = the config to use
+ */
+ void WriteConfig( wxConfig* aConfig );
+};
+
+class ATTENUATOR_PI : public ATTENUATOR
+{
+public: ATTENUATOR_PI();
+ virtual bool Calculate();
+};
+
+class ATTENUATOR_TEE : public ATTENUATOR
+{
+public: ATTENUATOR_TEE();
+ virtual bool Calculate();
+};
+
+class ATTENUATOR_BRIDGE : public ATTENUATOR
+{
+public: ATTENUATOR_BRIDGE();
+ virtual bool Calculate();
+};
+
+class ATTENUATOR_SPLITTER : public ATTENUATOR
+{
+public: ATTENUATOR_SPLITTER();
+ virtual bool Calculate();
+};
+
+#endif // ATTENUATORFUNC_H
diff --git a/pcb_calculator/bitmaps/Thumbs.db b/pcb_calculator/bitmaps/Thumbs.db
new file mode 100644
index 0000000000..a26a0e272b
Binary files /dev/null and b/pcb_calculator/bitmaps/Thumbs.db differ
diff --git a/pcb_calculator/bitmaps/arrow_bottom.xpm b/pcb_calculator/bitmaps/arrow_bottom.xpm
new file mode 100644
index 0000000000..21aaeedc21
--- /dev/null
+++ b/pcb_calculator/bitmaps/arrow_bottom.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+const char *arrow_bottom_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 16 1",
+" c #FCFEFC",
+". c #0C3A58",
+"= c #23C1D8",
+"+ c #DBEDF6",
+"# c #040204",
+": c #A8D2E0",
+"- c #49DBE8",
+"% c #14688D",
+"* c #0C8EB3",
+"o c #89C9DE",
+"X c #244862",
+"; c #139DC1",
+"@ c #317D9C",
+"$ c #70C0D8",
+"& c #12ADCE",
+"O c #C3E1ED",
+/* pixels */
+" ",
+" ",
+" ",
+" ..XXX... ",
+" .oO++O@# ",
+" .+o$oo%# ",
+" . O&*=%# ",
+" . +$*-%# ",
+" . O=*-%# ",
+" . $&*=%# ",
+" ......O$&;=;.X.... ",
+" #@$oo:&**=;&;@%# ",
+" #@+:$&*;&=-;%# ",
+" #@ +$;;=-;%# ",
+" #@ +$$-;%# ",
+" #@ O-;%# ",
+" #@+;%# ",
+" #@%# ",
+" ## ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/arrow_top.xpm b/pcb_calculator/bitmaps/arrow_top.xpm
new file mode 100644
index 0000000000..260d161d1e
--- /dev/null
+++ b/pcb_calculator/bitmaps/arrow_top.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+const char *arrow_top_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 16 1",
+"o c #7994B7",
+"- c #27486C",
+": c #74B9DC",
+"& c #1286BD",
+"X c #040B19",
+"@ c #AFD3E7",
+"O c #165686",
+". c #0C3058",
+" c #FBFEFC",
+"+ c #2298C9",
+"* c #74A6CC",
+"$ c #8AC7E4",
+"; c #147EB1",
+"# c #1BABD6",
+"% c #41C5E1",
+"= c #206596",
+/* pixels */
+" ",
+" ",
+" ",
+" .X ",
+" .oOX ",
+" .o +OX ",
+" .o @#+OX ",
+" .o @$#%+OX ",
+" .o %+%+OX ",
+" .o $*+&&+#%=OX ",
+" .-=O=+&&&+&=OO.X ",
+" ......++&.....X ",
+" X$@+&%=X ",
+" - @:;%OX ",
+" . $;%=X ",
+" . @:;#OX ",
+" .@*+;#OX ",
+" .-=OOO.X ",
+" XXXXXXXX ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/att_bridge.xpm b/pcb_calculator/bitmaps/att_bridge.xpm
new file mode 100644
index 0000000000..ba1ece0c54
--- /dev/null
+++ b/pcb_calculator/bitmaps/att_bridge.xpm
@@ -0,0 +1,249 @@
+/* XPM */
+static const char *att_bridge_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"250 240 3 1",
+". c Black",
+"X c #000084",
+" c #FCFCFC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ..... . ",
+" . . ... ",
+" . . . ",
+" . . . ",
+" . . . ",
+" .... . ",
+" . . . ",
+" . . . ",
+" . . ..... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXX XXX XXX ",
+" XXXXXXX XXX XXX XXX XXXXXXX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XXX XXX XX XX XX XX XX XX XXX XXX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XX XX XXXX XXXX XXXX XXX XXX XXX XXX XXX XXX XXXX XXXX XXXX XX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XX XXXX XXXX XXXX XX XX XX XX XX XX XXXX XXXX XXXX XX XX ",
+" XX XX XX XXX XXX XXX XXX XXX XXX XX XX XX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XXX XXX XX XX XX XX XX XX XX XX XXX XXX ",
+" XXXXXXXXX XX XXXXX XXXXX XXXXX XX XXXXXXXXX ",
+" XXXXXX XX XXX XXX XXX XX XXXXXX ",
+" XX XXX XXX XXX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XX XX ",
+" ......... XX XX ......... ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . . XX XX . ",
+" . XXX XXX . . ",
+" . XXXXXX ......... ......... XXXXXX . . ",
+" ......... . . ... XXXXXX . . XXXXXX ......... .... . . .... ",
+" . .. . XXX . . XXX . . . . . ",
+" . . . XXXXXX . . XXXXXX . . . . . ",
+" . . . XXXXXX . . XXXXXX . . . . . ",
+" . . . XXXXX . . XXXXX . . . . . ",
+" . . . XXXXXX . . XXXXXX . . . .. . ",
+" . . . XXXXXX . . XXXXXX .... ... . .. ",
+" XXX . . XXX ",
+" XXXXXX . .... . .... XXXXXX ",
+" XXXXXX . . . . . . XXXXXX ",
+" XXXXX ......... . . ......... . . XXXXX ",
+" XXXXXX . . . . XXXXXX ",
+" XXXXXX . . . . XXXXXX ",
+" XXX . . . . XXX ",
+" XXXXXX . . . . XXXXXX ",
+" XXXXXX . . . . XXXXXX ",
+" XXXXX .... .... XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXXX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX XX ",
+" XX XXXX XX ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" ....... .... XXXXX ",
+" . . . . XXXXXX ",
+" . . . . XXXXXX ",
+" . . . XXX ",
+" . . . XXXXXX ",
+" . . . XXXXXX ",
+" ....... . XXXXX ",
+" . . . XXXXXX ",
+" . . . XXXXXX ",
+" . . . XXX ",
+" . . . XXXXXX ",
+" . . ....... XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXX ",
+" XXXXXXX ",
+" XXXXXX ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/att_pi.xpm b/pcb_calculator/bitmaps/att_pi.xpm
new file mode 100644
index 0000000000..3faf77a684
--- /dev/null
+++ b/pcb_calculator/bitmaps/att_pi.xpm
@@ -0,0 +1,146 @@
+/* XPM */
+static const char *att_pi_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"250 137 3 1",
+". c Black",
+"X c #0000FF",
+" c #FFFFFF",
+/* pixels */
+" ",
+" ",
+" ",
+" ..... .... ",
+" . . . . ",
+" . . . . ",
+" . . . ",
+" . . . ",
+" .... .. ",
+" . . . ",
+" . . . ",
+" . . ...... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXX XXX XXX ",
+" XXXXXXX XXX XXX XXX XXXXXXX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XXX XXX XX XX XX XX XX XX XXX XXX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XX XX XXXX XXXX XXXX XXX XXX XXX XXX XXX XXX XXXX XXXX XXXX XX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XX XXXX XXXX XXXX XX XX XX XX XX XX XXXX XXXX XXXX XX XX ",
+" XX XX XX XXX XXX XXX XXX XXX XXX XX XX XX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XXX XXX XX XX XX XX XX XX XX XX XXX XXX ",
+" XXXXXXXXX XX XXXXX XXXXX XXXXX XX XXXXXXXXX ",
+" XXXXXX XX XXX XXX XXX XX XXXXXX ",
+" XX XXX XXX XXX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XX XX ",
+" ......... XX XX ......... ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX XX . ",
+" . XX ..... . ..... .... XX . ",
+" . XX . . ... . . . . XX . ",
+" . XX . . . . . . XX . ",
+" . . XX . . . . . . XX . ",
+" . XXX . . . . . ... XXX . . ",
+" . XXXXXX .... . .... . XXXXXX . . ",
+" ......... . . ... XXXXXX . . . . . . XXXXXX ......... .... . . .... ",
+" . .. . XXX . . . . . . . XXX . . . . . ",
+" . . . XXXXXX . . ..... . . .... XXXXXX . . . . . ",
+" . . . XXXXXX XXXXXX . . . . . ",
+" . . . XXXXX XXXXX . . . . . ",
+" . . . XXXXXX XXXXXX . . . .. . ",
+" . . . XXXXXX XXXXXX .... ... . .. ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXX XXXXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXX ",
+" XXXXXX XXXXXX ",
+" XXXXXX XXXXXX ",
+" XXX XXXX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XXXX XXXX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XX XX ",
+" XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXX XXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXX XXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXX XXXXXX ",
+" XXXXXXX XXXXXXX ",
+" XXXXXX XXXXXX ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/att_splitter.xpm b/pcb_calculator/bitmaps/att_splitter.xpm
new file mode 100644
index 0000000000..071f2dd4fe
--- /dev/null
+++ b/pcb_calculator/bitmaps/att_splitter.xpm
@@ -0,0 +1,169 @@
+/* XPM */
+static const char *att_splitter_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"250 160 3 1",
+". c Black",
+"X c #0000FF",
+" c #FFFFFF",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ....... .... ",
+" . . . . ........ ",
+" . . . . . ",
+" . . . . ",
+" . . . . ",
+" . . . . ",
+" ....... . . ",
+" . . . . ",
+" . . . . ",
+" . . . . . ",
+" . . . . . ",
+" . . ....... . ... . .... ",
+" .......... . . . . ",
+" . . . . . ",
+" . . . . . ",
+" . . . .. . ",
+" ... .. . .. ",
+" ",
+" ",
+" ",
+" ",
+" XXX XXX XXX ",
+" XXX XXX XXX XXXXXXX ",
+" XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XX XX XX XX XX XX XXX XXX ",
+" XX XX XX XX XX XX XX XX ",
+" XXXX XXX XXX XXX XXX XXX XXX XXXX XX XX ",
+" XXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XXXX XX XX XX XX XX XX XXXX XX XX ",
+" XX XXX XXX XXX XXX XXX XXX XX XX ",
+" XX XX XX XX XX XX XX XX XX ",
+" XX XX XX XX XX XX XX XXX XXX ",
+" XX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XX XXX XXX XXX XXXXXX ",
+" XX XXX XXX XXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" ........ XX ",
+" . XX ",
+" . XX ",
+" . XX ",
+" . XX ",
+" . XX ",
+" . XX ",
+" . XX ",
+" . . XX ",
+" . XX ",
+" . . .... XX ",
+" .......... . . XX ",
+" . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXX XXX XXX XX ",
+" XXXXXXX XXX XXX XXX XX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XX ",
+" XXX XXX XX XX XX XX XX XX XX ",
+" XX XX XX XX XX XX XX XX XX ",
+" XX XX XXXX XXX XXX XXX XXX XXX XXX XXXX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXX ",
+" XX XX XXXX XX XX XX XX XX XX XXXX ",
+" XX XX XXX XXX XXX XXX XXX XXX XX ",
+" XX XX XX XX XX XX XX XX XX ",
+" XXX XXX XX XX XX XX XX XX XX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XX ",
+" XXXXXX XXX XXX XXX XX ",
+" XXX XXX XXX XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" ....... . XX ",
+" . . .. XX ",
+" . . . . XX ",
+" . . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" ....... . XX ",
+" . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" . . . XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX XXX XXX XXX ",
+" XX XXX XXX XXX XXXXXXX ",
+" XX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XX XX XX XX XX XX XX XXX XXX ",
+" XX XX XX XX XX XX XX XX XX ",
+" XXXX XXX XXX XXX XXX XXX XXX XXXX XX XX ",
+" XXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XXXX XX XX XX XX XX XX XXXX XX XX ",
+" XXX XXX XXX XXX XXX XXX XX XX ",
+" XX XX XX XX XX XX XX XX ",
+" XX XX XX XX XX XX XXX XXX ",
+" XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XXX XXX XXX XXXXXX ",
+" XXX XXX XXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ........ ",
+" . ",
+" . ",
+" . ",
+" . ",
+" ....... ... . ",
+" . . . . . ",
+" . . . . . ",
+" . . . . . ",
+" . . .. . . ",
+" . . ... . ... . .... ",
+" ....... . .......... . . . . ",
+" . . . . . . . . ",
+" . . . . . . . . ",
+" . . . . . . . .. . ",
+" . . .. . ... .. . .. ",
+" . . ... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/att_tee.xpm b/pcb_calculator/bitmaps/att_tee.xpm
new file mode 100644
index 0000000000..b439bdb2ee
--- /dev/null
+++ b/pcb_calculator/bitmaps/att_tee.xpm
@@ -0,0 +1,146 @@
+/* XPM */
+static const char *att_tee_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"250 137 3 1",
+". c Black",
+"X c #0000FF",
+" c #FFFFFF",
+/* pixels */
+" ",
+" ",
+" ",
+" ..... . ",
+" . . ... ..... .... ",
+" . . . . . . . ",
+" . . . . . . ",
+" . . . . . . ",
+" .... . . . ... ",
+" . . . .... . ",
+" . . . . . . ",
+" . . ..... . . . . ",
+" . . .... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXX XXX XXX XXX XXX XXX ",
+" XXXXXXX XXX XXX XXX XXX XXX XXX XXXXXXX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XXX XXX XX XX XX XX XX XX XX XX XX XX XX XX XXX XXX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XX XX XXXX XXX XXX XXX XXX XXX XXX XXXX XXXX XXXX XXX XXX XXX XXX XXX XXX XXXX XX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XX ",
+" XX XX XXXX XX XX XX XX XX XX XXXX XXXX XXXX XX XX XX XX XX XX XXXX XX XX ",
+" XX XX XXX XXX XXX XXX XXX XXX XX XXX XXX XXX XXX XXX XXX XX XX ",
+" XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ",
+" XXX XXX XX XX XX XX XX XX XX XX XX XX XX XX XX XXX XXX ",
+" XXXXXXXXX XXXXX XXXXX XXXXX XX XXXXX XXXXX XXXXX XXXXXXXXX ",
+" XXXXXX XXX XXX XXX XX XXX XXX XXX XXXXXX ",
+" XXX XXX XXX XX XXX XXX XXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XX ",
+" ......... XX ......... ",
+" . XX . ",
+" . XX . ",
+" . XX . ",
+" . XX . ",
+" . ..... .... XX . ",
+" . . . . . XX . ",
+" . . . . . XX . ",
+" . . . . . XX . ",
+" . . . . XXX . . ",
+" . .... .. XXXXXX . . ",
+" ......... . . ... . . . XXXXXX ......... .... . . .... ",
+" . .. . . . . XXX . . . . . ",
+" . . . . . ...... XXXXXX . . . . . ",
+" . . . XXXXXX . . . . . ",
+" . . . XXXXX . . . . . ",
+" . . . XXXXXX . . . .. . ",
+" . . . XXXXXX .... ... . .. ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXX ",
+" XXXXXX ",
+" XXXXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XXXX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XX ",
+" XXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXXX ",
+" XXXXXXXXXXXXXX ",
+" ",
+" ",
+" ",
+" XXXXXX ",
+" XXXXXXX ",
+" XXXXXX ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/bridged_tee_formula.xpm b/pcb_calculator/bitmaps/bridged_tee_formula.xpm
new file mode 100644
index 0000000000..4d5b2da617
--- /dev/null
+++ b/pcb_calculator/bitmaps/bridged_tee_formula.xpm
@@ -0,0 +1,216 @@
+/* XPM */
+static const char *bridged_tee_formula_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"255 193 17 1",
+"X c Black",
+"> c #D9D9D9",
+"* c #E1E1E1",
+"- c #F0F0F0",
+" c #FFFFFF",
+"o c #E9E9E9",
+": c #BDBDBD",
+"O c #4D4D4D",
+"+ c #A7A7A7",
+"# c #7C7C7C",
+"& c #9A9A9A",
+"@ c #C7C7C7",
+". c #C0C0C0",
+"= c #8C8C8C",
+"; c #B2B2B2",
+"% c #D0D0D0",
+"$ c #686868",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............................................................. ",
+" . . ",
+" . X . ",
+" . XX . ",
+" . X X . ",
+" . X X . ",
+" . XXXX . ",
+" . X X . ",
+" . XXX XXX . ",
+" . . ",
+" . . ",
+" . XXXXXXXXXXXX . ",
+" . XX XX . ",
+" . X X X X . ",
+" . X X X . ",
+" . X X X . ",
+" . XXX X X XXX X X X . X X oO X X X XXXXXX ",
+" . XX XXX XX X X X X X X . XX +X@ XX X X ",
+" . X X X X X XXXX XX . X X #X$ X X X X X X ",
+" . X X X X X . X X %@&X% X X X X X X ",
+" . X *XXXXXXXXX= X X X . XXX XXX XXX X XXXX X XX #-*X= XXXXXXXXX XXX XXXXXXXX XXX X XX XX XX XXX XXXX X XX X XX X X XX XX X X X ",
+" . X XXXX X X X . X X X XX X XX X o& #X* X X X X X X XXX X X X X X X XX X X XXX X XX XXX X X XX XXXXX ",
+" . X X *XXXXXXXXX= X X X . X X X X X X X +% %X+ XX X X XXXXX X X X X XX X X X X X X X X X X X X X ",
+" . X X X X X . X X X X X X X X OXXXXXX- XXXXXXXXX XX X X X X X X X X XX X X X X X X X X X X X X X X ",
+" . X X X X X . X X X X X X X X @; ;X+ X X X X X X X X X X X X X X X X X X X X X X X X ",
+" . XXXXX XXX XXX . XX XX X X X X X *O* -XX% X XX X X X X X X X X X XXX X XX X X X X X X X X X X X XXX X X ",
+" . . X X XXX XX XXX XXX *XXX: *XXXX: XXX XX XX XX XXX XXX XXX XX X XXX XX XX XXX XX XXX XXX XXX XXX XXX XX X XXXXXXX ",
+" . . ",
+" . . ",
+" .............................................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXX& ## XXXXXXX& XXXXXXX& ",
+" X$* oXO- ## X$* oXO- : X$* oXO- ",
+" X> #X: X> #X: -O X> #X: ",
+" : @X$ : @X$ #X : @X$ ",
+" OX* XXX XXX%OX% XXXXXXXX OX* -+XX+- XXX XXX #XXXX XXXXXXXX OX* ",
+" +X+ XX XX% XO +X+ OX%%XO XX XX XX +X+ ",
+" *XO XX XX XX *XO XX XX XX XX XX *XO XX ",
+" $X@ X XX XX XX XXXXXXXX $X@ X XX XX XX XX XX XXXXXXXX $X@ X XX X ",
+" :X= %# XX XX XX :X= %# XX XX XX XX XX :X= %# XX X ",
+" -OXo @O= XX XX XX -OXo @O= OX%%XO OX %XX XX>= -OXo @O= XX X ",
+" &XXXXXXX= XXXX XXXX XXX &XXXXXXX= -+XX+- %OO:XXX %O$o &XXXXXXX= XX X ",
+" XX X ",
+" XX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXXX+- ##XX XXXXXXX& :X: $ o= %$XO:-X ##XX =o ",
+" -XX %XO XX X$* oXO- o#X+X#o X oO% ;X@ -+XX XX %O- ",
+" XX XX XX X> #X: XX% %XX $XXX$ #= *X; &X XX == ",
+" XX XX XX : @X$ XX XX -&&&- %X> &X* -X XX %X> ",
+" XX %XO XX XXXXXXXX OX* XX XX O# #O &X- OX XX -X& ",
+" XXXXXX+- XX +X+ XX XX $X XX XX X$ ",
+" XX $X* XX *XO XX XX XX XX XXXX XX XX ",
+" XX %X# XX XXXXXXXX $X@ X XX XX XX &Xo XX XXXXXXXX XX XX ",
+" XX =X@ XX :X= %# XX% %XX $X *X: XX XX X$ ",
+" -XX- *XOo -XX- -OXo @O= o#X+X#o &X- +X: -XO -XX- -X& ",
+" XXXXXX =XXX XXXXXX &XXXXXXX= :X: >X% >#XX$; XXXXXX >X% ",
+" == =# ",
+" -O% %Oo ",
+" o= =o ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXXX+- >$X& XXXXXXX& :X: -$ o= %$XO:-X ##XX =o ",
+" -XX %XO -XXXX+ X$* oXO- o#X+X#o @; oO% ;X@ -+XX XX %O- ",
+" XX XX ++ @XX X> #X: XX% %XX &> #= *X; &X XX == ",
+" XX XX o XO : @X$ XX XX O %X> &X* -X XX %X> ",
+" XX %XO X+ XXXXXXXX OX* XX XX *= &X- OX XX -X& ",
+" XXXXXX+- *Xo +X+ XX XX :: $X XX XX X$ ",
+" XX $X* +; *XO XX XX #o XX XX XXXX XX XX ",
+" XX %X# *# XXXXXXXX $X@ X XX XX O XX &Xo XX XXXX XX XX ",
+" XX =X@ -$- & :X= %# XX% %XX >& $X *X: XX XX X$ ",
+" -XX- *XOo #XXXX@ -OXo @O= o#X+X#o +% &X- +X: -XO -XX- -X& ",
+" XXXXXX =XXX&XXXXX- &XXXXXXX= :X: $- >X% >#XX$; XXXXXX >X% ",
+" == =# ",
+" -O% %Oo ",
+" o= =o ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/c_microstrip.xpm b/pcb_calculator/bitmaps/c_microstrip.xpm
new file mode 100644
index 0000000000..03451a3843
--- /dev/null
+++ b/pcb_calculator/bitmaps/c_microstrip.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *c_microstrip_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"& c #1C1E1C",
+"; c #3C3AFC",
+"# c #040204",
+"$ c #14122C",
+"% c #FCB23C",
+"- c #7472FC",
+"* c #CCCECC",
+"O c #1C1EFC",
+"@ c #ACAAAC",
+"= c #2426FC",
+"X c #0402FC",
+"o c #ACAAFC",
+"+ c #0C0AFC",
+". c #5456FC",
+": c #3C3AAC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .Xo .Xo oXo .XXXX. .Xo .Xo oXo ",
+" oX. XX. .X XXo oXX oX. XX. .X ",
+" XX XXX XX XXo oX. XX XXX XX ",
+" .X oXoXo X. XX .. .X oXoXo X. ",
+" oXo .X X. oXo XXo oXo .X X. oXo ",
+" X. X. .X .X oXXX.o X. X. .X .X ",
+" X. Xo oX XX .XXXX.o X. Xo oX XX ",
+" .X .X Xo X. o.XXo .X .X Xo X. ",
+" oX .. X.oXo oXX oX .. X.oXo ",
+" X.X. .X.X XX XX X.X. .X.X ",
+" XXX oXXX XX XX XXX oXXX ",
+" .XX XX. oX. .Xo .XX XX. ",
+" oX. .Xo o.XXXX.o oX. .Xo ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" o . . o . . o . . o ",
+" . .OXXO XXXO. . .OXXO XXXO. . .OXXO XXXO. . ",
+" .oXXXXXX+........XXXXXXO .oXXXXXX+..................XXXXXXO .oXXXXXX+........XXXXXXO . ",
+" . o.OXXO XXXO. . o.OXXO XXXO. . o.OXXO XXXO. . ",
+" o . . o . . o . . o ",
+" ",
+" ",
+" ",
+" o o o o ",
+" . . . . ",
+" . . . . ",
+" . . . . ",
+" @#########################$ @#########################$ ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@## @#@%%%%%%%%%%%%%%%%%%%%%%@## ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@# @#@%%%%%%%%%%%%%%%%%%%%%%@#@# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%# @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%# ",
+" @$##############################@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@##########################@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@###################################& ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************o.*************@## ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************=Xo************@#@# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@****************-XXO************@#@*# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@***************oOXXX************@#@**# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@****************;XXXo***********@#@***# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXXO***********@#@****# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo=o**********@#@*****# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@******# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@*******# ",
+" @#@***********************o***@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@********# ",
+" @#@************************.**@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@*********# ",
+" @#@*************************.*@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@**********# ",
+" @#@**************************.@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*******XX********oXo************@#@***********# ",
+" @#@***************************:#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@********XX*******oXo************@#@************# ",
+" @#@***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*********XX******oXo************@#@*************# ",
+" @#@***************************@#:%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********XX*****oXo************@#@**************# ",
+" @#@***************************@#@.%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@***********XX****oXo************@#@***************# ",
+" @#@***************************@#@%.%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@************XX***oXo************@#@****************# ",
+" @#@***************************@#@%%.%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*************XX**oXo************@#@*****************# ",
+" @#@***************************@#@%%%.%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**************XX**.o************@#@******************# ",
+" @#@***************************@#@%%%%.%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@***************XX***************@#@*******************# ",
+" @#@***************************@#@%%%.O+Oo%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@****************XX**************@#@********************# ",
+" @#@***************************@#@%%%%oXXO%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************XX*************@#@*********************# ",
+" @#@***************************@#@%%%%%%XXX%%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@******************XX************@#@**********************# ",
+" @#@***************************@#@%%%%%%%OXO%%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************ooXXXXXXXX.****@#@***********************# ",
+" @#@***************************@#@%%%%%%%%;X.%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@************************# ",
+" @#@***************************@#@%%%%%%%%%oX%%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@*************************# ",
+" @#@***************************@#@%%%%%%%%%%%X%%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@**************************# ",
+" @#@***************************@#@%%%%%%%%%%%%o%%%%%%%%%@#@%%%%%%%@#@**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************oXo************@#@***************************# ",
+" @#@****************************##########################@%%%%%%%@#@***********************##########################@%%%%%%%@#@*****************oXo************@#@****************************# ",
+" @#@*****************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%@#@************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%@#@*****************oXo************@#@*****************************# ",
+" @#@******************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%@#@*************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%@#@*****************oXo************@#@******************************# ",
+" @#@*******************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%@#@**************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%@#@***************o;oXo************@#@*******************************# ",
+" @#@********************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%@#@***************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%@#@****************OXXo************@#@********************************# ",
+" @#@*********************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%@#@****************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%@#@****************;XXX;***********@#@*********************************# ",
+" @#@**********************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%@#@*****************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%@#@*****************XXXOo**********@#@**********************************# ",
+" @#@***********************************#%%%%%%%%%%%%%%%%%%%%%%%%#%@#@******************************#%%%%%%%%%%%%%%%%%%%%%%%%#%@#@*****************=XXo***********@#@***********************************# ",
+" @#@************************************#%%%%%%%%%%%%%%%%%%%%%%%%#@#@*******************************#%%%%%%%%%%%%%%%%%%%%%%%%#@#@*****************-X=************@#@************************************# ",
+" @#@*************************************#%%%%%%%%%%%%%%%%%%%%%%%%##@********************************#%%%%%%%%%%%%%%%%%%%%%%%%##@******************X-************@#@*************************************# ",
+" #################################################################################################################################################################@*************************************@# ",
+" #***************************************************************************************************************************************************************#*************************************@## ",
+" #******************************************************X*****************************************************************************************X**************#************************************@#@# ",
+" #******************************************************X*****************************************************************************************X**************#***********************************@#@%# ",
+" #*****************************************************.Xo***************************************************************************************.Xo*************#**********************************@#@%%# ",
+" #*****************************************************OX;***************************************************************************************OX;*************#*********************************@#@%%%# ",
+" #*****************************************************XXO***************************************************************************************XXO*************#********************************@#@%%%%# ",
+" #****************************************************oXXO**************************************************************************************oXXO*************#*******************************@#@%%%%%# ",
+" #****************************************************.XXXo*************************************************************************************.XXXo************#******************************@#@%%%%%%# ",
+" #******************************************************.*****************************************************************************************.**************#*****************************@#@%%%%%%%# ",
+" #******************************************************.*****************************************************************************************.**************#****************************@#@%%%%%%%@# ",
+" #******************************************************.*****************************************************************************************.**************#***************************@#@%%%%%%%@#@ ",
+" #******************************************************.*****************************************************************************************.**************#**************************@#@%%%%%%%@#@ ",
+" #***************************************.XXXXXXXXX.****.***************************************************************************XX*******XX***.**************#*************************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#************************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#***********************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#**********************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#*********************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#********************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XXXXXXXXXXX***.**************#*******************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#******************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#*****************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#****************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#***************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#**************@#@%%%%%%%@#@ ",
+" #*******************************************XX*********.***************************************************************************XX*******XX***.**************#*************@#@%%%%%%%@#@ ",
+" #******************************************************.*****************************************************************************************.**************#************@#@%%%%%%%@#@ ",
+" #******************************************************;*****************************************************************************************;**************#***********@#@%%%%%%%@#@ ",
+" #******************************************************.*****************************************************************************************.**************#**********@#@%%%%%%%@#@ ",
+" #******************************************************.*****************************************************************************************.**************#*********@#@%%%%%%%@#@ ",
+" #******************************************************o*****************************************************************************************.**************#********@#@%%%%%%%@#@ ",
+" #************************************************************************************************************************************************.**************#*******@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************************************.O+Oo************#******@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************************************oXXO*************#*****@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************************************XXX*************#****@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************************************OXO*************#***@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************************************;X.*************#**@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************************************oX**************#*@#@%%%%%%%@#@ ",
+" #************************************************************************************************************************************************X**************#@#@%%%%%%%@#@ ",
+" #************************************************************************************************************************************************o**************##@%%%%%%%@#@ ",
+" #################################################################################################################################################################@%%%%%%%@#@ ",
+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%%%%%%%%%%%%#%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##@ ",
+" #################################################################################################################################################################@ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/coax.xpm b/pcb_calculator/bitmaps/coax.xpm
new file mode 100644
index 0000000000..f517448e03
--- /dev/null
+++ b/pcb_calculator/bitmaps/coax.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *coax_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"+ c #747274",
+"o c #040204",
+": c #1C1EC4",
+"O c #FCB23C",
+"$ c #7472FC",
+"X c #545654",
+"* c #191AFC",
+"; c #CCCECC",
+". c #ACAAAC",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;;;;;;;;;;;;;;;;;;;;;;;;;;;;.o. ",
+" - Xo.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;.oX ",
+" - Xo.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;.oX ",
+" - Xo.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;.oX - ",
+" - XoX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;XoX - ",
+" - .oX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Xo. - ",
+" - .ooX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Xoo. - ",
+" Xoo.;;;;;;;;;;;;;;;;;;;;;;;;;XooX ",
+" XoXX;;;;;;;;;;;;;;;;;;;;;XXoX ",
+" .XooXX;;;;;;;;;;;;;;;XXooX. ",
+" .XooXXXXX.;XXXXXoooX. ",
+" - .XXXoooooooXXX. - ",
+" - - ",
+" - - ",
+" - - ",
+" ",
+" &=*= =*=& ",
+" &=**%%%* *%%%**=& ",
+" &*%%%%%%------------------------------------------%%%%%%*& ",
+" - &=*= =*=& - ",
+" - % - ",
+" - % - ",
+" - % - ",
+" % ",
+" -%%%%-% ",
+" %%& -%% ",
+" -%& -% ",
+" %% % - ",
+" %% % % ",
+" %% % % ",
+" -%- -% -%%%& % % -%%% ",
+" %%& -%% -% &%& % % % ",
+" -%%%-&- % &% % % % ",
+" % % % % % ",
+" % % % % % ",
+" %& &% % % % ",
+" -% &%& %- -% % ",
+" -%%%& &%%%&% %%% ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/color_code_multiplier.xpm b/pcb_calculator/bitmaps/color_code_multiplier.xpm
new file mode 100644
index 0000000000..053b03a39e
--- /dev/null
+++ b/pcb_calculator/bitmaps/color_code_multiplier.xpm
@@ -0,0 +1,302 @@
+/* XPM */
+const char *color_code_multiplier_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"94 283 13 1",
+"$ c #6466FC",
+". c #040204",
+"% c #CC66FC",
+" c #9C9A34",
+"# c #34CE34",
+"+ c #FC6604",
+"o c #643234",
+"@ c #FCFE04",
+"& c #949294",
+"O c #FC0204",
+"= c #CCCECC",
+"X c #C4C2C4",
+"* c #CC9A34",
+/* pixels */
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" ......................................X.......XXXXX..........................................",
+" ....................................XXX......X.....X.........................................",
+" ......................................X.....X.......X........................................",
+" ......................................X.....X.......X........................................",
+" ......................................X.....X.......X........................................",
+" ......................................X.....X.......X........................................",
+" ......................................X......X.....X.........................................",
+" ......................................X.....X.XX.XX.X........................................",
+" ....................................XXXXX...XXXX.XXXX........................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXooooXXXXooooooXXXXXoooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooXXXoooXooooXooooXoooooXooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXoooXoooooooXoooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXoooXoooooooXoooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXoooXoooooooXoooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXoooXoooooooXoooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXooooXoooooXooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooXoooXooooXoooXoXXoXXoXoooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooXXXXXooXXXXooooXXXXoXXXXoooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",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OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO..",
+" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.++++.+++++.....++++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++...++++.+++.+++++.+++++.+++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.++.+++++.+++++++.++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.+.++++++.+++++++.++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++..+++++++.+++++++.++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.+.++++++.+++++++.++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.++.++++++.+++++.+++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++.++++.+++.++++.+..+..+.++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++.....++.++++.+++....+....++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################.####....####....###.####.#####.....############################..",
+" ..#######################...###.####.##.####.##.###.#####.#####.###########################..",
+" ..#########################.###.####.##.####.##.##.#####.#######.##########################..",
+" ..#########################.###.####.##.####.##.#.######.#######.##########################..",
+" ..#########################.###.####.##.####.##..#######.#######.##########################..",
+" ..#########################.###.####.##.####.##.#.######.#######.##########################..",
+" ..#########################.###.####.##.####.##.##.######.#####.###########################..",
+" ..#########################.###.####.##.####.##.###.####.#..#..#.##########################..",
+" ..#######################.....##....####....###.####.###....#....##########################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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XXXXXXXXXXXXXXXXXXX..",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" .............................................................................................",
+" .............................................................................................",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*********************.*******.***********************************************************..",
+" ..******....***********.*******.********************....**********.************************..",
+" ..*****.****.**********.*******.*******************.****.*******...************************..",
+" ..****.*********....***.***.....*******************.****.*********.************************..",
+" ..****.********.****.**.**.****.*******************.****.*********.************************..",
+" ..****.********.****.**.**.****.*******************.****.*********.************************..",
+" ..****.***...**.****.**.**.****.*******************.****.*********.************************..",
+" ..****.*****.**.****.**.**.****.*******************.****.*********.************************..",
+" ..*****.****.**.****.**.**.***..*******************.****.***.*****.************************..",
+" ..******.....***....***.***...*.********************....****.***.....**********************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" ..*****************************************************************************************..",
+" .............................................................................................",
+" .............................................................................................",
+" ..=====X=======X=======X===X========X==X=======X======X=X=X========X=============X====X==X=..",
+" ..X=======X==X===========================X===X==========================X==X=======X=======..",
+" ..===X==X=======X==X==========X=====X======X=====X==========X==X=====X=======X==X=====X===X..",
+" ..=====================X==X======X====X=X==========X=============X=======X========X========..",
+" ..==X=======X========X======X==X===========X==X========X==X=========X==X=====X==X=====X====..",
+" ..=====X==X====X==X=====X===========X============X==========X==X==================X======X=..",
+" ..X==========X===.====X==========X======X====X======X===X=================X==X==X=====X====..",
+" ..====X.....==.==.===========X========X===X=====....========....=X====.X==========X======X=..",
+" ..====.===X=.==X=.X========X====X==X==========X.====.=X===X.====.==X...=====X==X======X====..",
+" ..=X==.=X=====.==.==.==X.===....==.=..==X======.=X==.======.===X.=====.==========X=======X=..",
+" ..===X.=====X=.==.=X.X==.X=.==X=.=..========X==.====.==X===.X===.===X=.===X===X====X=X=====..",
+" ..=====.....==.=X.===.=.===.====.=.======X=====.==X=.======.==X=.=====.=X=======X=======X==..",
+" ..X=======X=.=.==.===.=.==X......=.==X========X.====.====X=.====.===X=.====================..",
+" ..======X===.=.==.===.=.===.=X====.X===========.=X==.======.=X==.=====.=X==X==========X====..",
+" ..X==X.=====.=.=X.===X.====.====.=.====X===X===.====.==X.==.====.==X==.========X===X=====X=..",
+" ..=====.....X=.==.X===.X===X....X=.==X===X===X==....X===.X==....X===.....X===X===X===X=====..",
+" ..=======================================================================================X=..",
+" ..=X=======================================================================================..",
+" ..===X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X=..",
+" ..=========================================================================================..",
+" ..X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X=..",
+" ..=========================================================================================..",
+" .............................................................................................",
+" ............................................................................................."
+};
diff --git a/pcb_calculator/bitmaps/color_code_tolerance.xpm b/pcb_calculator/bitmaps/color_code_tolerance.xpm
new file mode 100644
index 0000000000..a0b807e365
--- /dev/null
+++ b/pcb_calculator/bitmaps/color_code_tolerance.xpm
@@ -0,0 +1,303 @@
+/* XPM */
+const char *color_code_tolerance_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"97 284 13 1",
+"$ c #6466FC",
+". c #040204",
+"% c #CC66FC",
+" c #9C9A34",
+"# c #34CE34",
+"+ c #FC6604",
+"o c #643234",
+"@ c #FCFE04",
+"& c #949294",
+"O c #FC0204",
+"= c #CCCECC",
+"X c #C4C2C4",
+"* c #CC9A34",
+/* pixels */
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooooXooooooXXooooXoooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooXXXoooooXooXooXooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooooXoooooXooXooXooooooooooooooooooooooooooooooo... ",
+" ..oooooooooooooooooooXXXXXXXoooooooooooooooooooXoooooXooXoXoooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooooXooooooXXoXooXXooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooooXoooooooooXoXooXoooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooXooooooooooooooooooooooXooooooooXooXooXoooooooooooooooooooooooooooo... ",
+" ..oooooooooooooooooooXXXXXXXoooooooooooooooooooXooooooooXooXooXoooooooooooooooooooooooooooo... ",
+" ..oooooooooooooooooooooooooooooooooooooooooooXXXXXoooooXooooXXooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... ",
+" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO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OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..######################.#######....#######......####..####.###############################... ",
+" ..######################.######.####.######.########.##.##.################################... ",
+" ..######################.######.####.######.########.##.##.################################... ",
+" ..###################.......###.####.######.....####.##.#.#################################... ",
+" ..######################.######.####.###########.####..#.##..##############################... ",
+" ..######################.######.####.###########.#######.#.##.#############################... ",
+" ..######################.######.####.###########.######.##.##.#############################... ",
+" ..###################.......###.####.###.##.####.######.##.##.#############################... ",
+" ..##############################....####.###....######.####..##############################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..#########################################################################################... ",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$... ",
+" ..$$$$$$$$$$$$$$$$$$$$$$$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XXXXXXXXXXX... ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..**********************.*******************......****..****.******************************... ",
+" ..**********************.*******************.********.**.**.*******************************... ",
+" ..**********************.*******************.********.**.**.*******************************... ",
+" ..*******************.......****************.....****.**.*.********************************... ",
+" ..**********************.************************.****..*.**..*****************************... ",
+" ..**********************.************************.*******.*.**.****************************... ",
+" ..**********************.************************.******.**.**.****************************... ",
+" ..*******************.......****************.****.******.**.**.****************************... ",
+" ..*******************************************....******.****..*****************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" ..*****************************************************************************************... ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" ..====X======X===X======X===X==X==X======X===X==X===X===X==X=X======X=X==X==X==X==X==X====X... ",
+" ..X=======X==========X================X==========================X=====================X===... ",
+" ..===X==X====X==X==X====X==X==X==X==X====X=====================X===X====X==X==X==X==X======... ",
+" ..=========X==========X================X====X====X===X==X=X==========X====================X... ",
+" ..X=====X=====X==X==========X==X====X==========X===X========X=====X=====X==X==X==X==X==X===... ",
+" ..===X======X======X=====X=======X=====X==X==X=========X========X=====X====================... ",
+" ..=====X=======X======X=======X=====X=====================X==============X==X==X==X==X===X=... ",
+" ..=X=====X==X=====X========X======X=====X======X==X===========X====X==X====================... ",
+" ..====X========X=====X===X=====X====X======X========X===X===X===X========X==X==X==X==X===X=... ",
+" ..=X========X===========.===X==============.==X=....=====..====.======X====================... ",
+" ..======X=X====X======X=.========X=X====X...===.====.=X=.==.=X.====X====X==X===X===X====X==... ",
+" ..==X========X====X=====.=X===X==========X=.===.==X=.===.X=.==.=X============X===X=========... ",
+" ..====X=============X.......=========X=====.==X.====.===.==.=.======X=================X====... ",
+" ..================X=====.======X===========.X==.==X=.=X==..=.==..X======X==================... ",
+" ..=X==X===X===X=======X=.=X=======X===X===X.===.====.======X.=.=X.===X=====X===X===X===X==X... ",
+" ..======X===X===X===X===.===X===X===X======.=X=.==X=.X===X=.==.==.=======X===X===X===X=====... ",
+" ..=X=================.......============X==.===.====.======.=X.==.=X=======================... ",
+" ..=======================================.....==....======.====..========================X=... ",
+" ..=X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X===... ",
+" ..=========================================================================================... ",
+" ..=X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X==X... ",
+" ..=========================================================================================... ",
+" .............................................................................................. ",
+" .............................................................................................. ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/color_code_value.xpm b/pcb_calculator/bitmaps/color_code_value.xpm
new file mode 100644
index 0000000000..860529ef33
--- /dev/null
+++ b/pcb_calculator/bitmaps/color_code_value.xpm
@@ -0,0 +1,252 @@
+/* XPM */
+const char *color_code_value_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"94 235 11 1",
+"$ c #6466FC",
+". c #040204",
+"% c #CC66FC",
+" c #9C9A34",
+"# c #34CE34",
+"+ c #FC6604",
+"o c #643234",
+"@ c #FCFE04",
+"& c #949294",
+"O c #FC0204",
+"X c #C4C2C4",
+/* pixels */
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .................................................XXXX........................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" ................................................X....X.......................................",
+" .................................................XXXX........................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" .............................................................................................",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooXXXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooooXooooooooooooooooooooooooooooooooooooooo..",
+" ..oooooooooooooooooooooooooooooooooooooooooooooooXXXXXooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo..",
+" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO..",
+" ..OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO..",
+" ..OOOOOOOOOOOOOOOOOOOOOOOO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++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++....++++++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++++++++++++++++.++++.+++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++..",
+" ..++++++++++++++++++++++++++++++++++++++++++++++.++++.+++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++....++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@.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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..##############################################......#####################################..",
+" ..##############################################.##########################################..",
+" ..##############################################.##########################################..",
+" ..##############################################.....######################################..",
+" ..###################################################.#####################################..",
+" ..###################################################.#####################################..",
+" ..###################################################.#####################################..",
+" ..##############################################.####.#####################################..",
+" ..###############################################....######################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..#########################################################################################..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..",
+" ..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
+" .............................................................................................",
+" ............................................................................................."
+};
diff --git a/pcb_calculator/bitmaps/color_code_value_and_name.xpm b/pcb_calculator/bitmaps/color_code_value_and_name.xpm
new file mode 100644
index 0000000000..c0b7683ef9
--- /dev/null
+++ b/pcb_calculator/bitmaps/color_code_value_and_name.xpm
@@ -0,0 +1,250 @@
+/* XPM */
+const char *color_code_value_and_name_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"90 234 10 1",
+"# c #6466FC",
+" c #040204",
+"$ c #CC66FC",
+"@ c #34CE34",
+"O c #FC6604",
+"X c #643234",
+"+ c #FCFE04",
+"% c #949294",
+"o c #FC0204",
+". c #C4C2C4",
+/* pixels */
+" .........................................................................................",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . . ",
+" .... . . .... ",
+" . . . . . . ",
+" . . . .... .... . . . . ",
+" . . . . . . . . . ",
+" ..... . . . . . . . ",
+" . . . ..... . .. . . ",
+" . . . . . . . . . . ",
+" . . . . .. . . . . . ",
+" ..... . ... . .... . . .... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXX....XXXX.XXX.XXXX.XXXX.XXXXXXXXXXXXXXXXXXXXX.....XXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" oooo oooooooooooooooo oooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooo",
+" oooo oooo ooooooooooooooo ooooooooooooooooooooooooooooooooooo oooo oooooooooooooooooooooo",
+" oooo oooo ooo oooo oooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooo",
+" oooo oooo oo oooo oo oooo oooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooo",
+" oooo ooo ooo oooo oo oooo ooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooo",
+" oooo oooo oo oooo oooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooo",
+" oooo ooo ooo ooooooo oooo oooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooo",
+" oooo oooo oo oooo oo ooo ooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooo",
+" oooo ooooo oo oooo o ooooooooooooooooooooooooooooooooooo oooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo",
+" oooooooooooooooooooooooooooooooooooooooooooooo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++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++ ++ ++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++",
+" ++++ +++++ ++++++++ ++ +++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++",
+" +++++ +++ +++++++++ ++ ++++++++++++++++++++++++++++++++++++++++ + +++++++++++++++++++++++",
+" +++++ +++ ++ +++ ++ +++ ++ +++ +++ +++++++++++++++++++++ ++ +++++++++++++++++++++++",
+" ++++++ + ++ ++++ ++ ++ ++ ++++ + +++ +++ ++++++++++++++++++++ +++ +++++++++++++++++++++++",
+" +++++++ +++ ++++ ++ ++ ++ ++++ ++ + + + +++++++++++++++++++++ ++++++++++++++++++++++",
+" +++++++ +++ ++ ++ ++ ++++ ++ + + + +++++++++++++++++++++++++ +++++++++++++++++++++++",
+" +++++++ +++ +++++++ ++ ++ ++++ ++ + + + +++++++++++++++++++++++++ +++++++++++++++++++++++",
+" +++++++ +++ ++++ ++ ++ ++ ++++ +++ +++ ++++++++++++++++++++++++++ +++++++++++++++++++++++",
+" +++++++ ++++ +++ ++ +++ ++++ +++ ++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@ @@@@@@@@ @ @@ @@@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@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" ############# ###########################################################################",
+" #### ##### ################################################# #######################",
+" #### ### #### ################################################ ##########################",
+" #### ### #### # #### ### ################################# ###########################",
+" #### ### #### # #### ## #### ################################ #######################",
+" #### #### # #### ## #### ################################ #### ######################",
+" #### #### ### # #### ## ################################ #### ######################",
+" #### #### ### # #### ## ##################################### #### ######################",
+" #### #### ### # ### ## #### ################################ #### ######################",
+" #### #### ## # ### ################################## #######################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" #########################################################################################",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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%%%%%%%",
+" %%%% %%%%% %% %%%% %%%%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% %%%%%%%%%%%%%%%%%%%%%%",
+" %%%%% %%%% %% %%%% %%%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% %%%%%%%%%%%%%%%%%%%%%%",
+" %%%%%% %% %%%%% %%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%",
+" %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+" %%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+" %%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" ................ ............................................. .......................",
+" .... .... .... . ........ .. ................................ .... ......................",
+" .... .... .... . ........... ................................ .... ......................",
+" .... ... . ... . . .... . .. ........................ .... ......................",
+" .... ... . ... . ... ... .. ... .... ....................... .... ......................",
+" ..... .. . .. .. .... ... .. ... .... ........................ ......................",
+" ..... . ... . .. .... ... .. ... ............................ ......................",
+" ..... . ... . .. .... ... .. ... ................................ .......................",
+" ..... . ... . .. .... ... .. ... .... ........................ ........................",
+" ...... ..... ... .... ... ... .. ....................................................",
+" .........................................................................................",
+" .........................................................................................",
+" .........................................................................................",
+" "
+};
diff --git a/pcb_calculator/bitmaps/cpw.xpm b/pcb_calculator/bitmaps/cpw.xpm
new file mode 100644
index 0000000000..43f1f0f269
--- /dev/null
+++ b/pcb_calculator/bitmaps/cpw.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *cpw_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"@ c #1C1E1C",
+"; c #747274",
+"- c #3C3AFC",
+"% c #14166C",
+"# c #040204",
+"& c #FCB23C",
+"= c #7472FC",
+": c #CCCECC",
+"O c #1C1EFC",
+"+ c #ACAAAC",
+"* c #2426FC",
+"$ c #040458",
+"X c #0402FC",
+"o c #ACAAFC",
+". c #5456FC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .XXXX. .Xo .Xo oXo .XXXX. ",
+" XXo oXX oX. XX. .X XXo oXX ",
+" XXo oX. XX XXX XX XXo oX. ",
+" XX .. .X oXoXo X. XX .. ",
+" XXo oXo .X X. oXo XXo ",
+" oXXX.o X. X. .X .X oXXX.o ",
+" .XXXX.o X. Xo oX XX .XXXX.o ",
+" o.XXo .X .X Xo X. o.XXo ",
+" oXX oX .. X.oXo oXX ",
+" XX XX X.X. .X.X XX XX ",
+" XX XX XXX oXXX XX XX ",
+" oX. .Xo .XX XX. oX. .Xo ",
+" o.XXXX.o oX. .Xo o.XXXX.o ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" o . . o . . o . . o ",
+" . .OXXO XXXO. . .OXXO XXXO. . .OXXO XXXO. . ",
+" .oXXXXXXX........XXXXXXO .oXXXXXXX........XXXXXXO .oXXXXXXX........XXXXXXO . ",
+" . o.OXXO XXXO. . o.OXXO XXXO. . o.OXXO XXXO. . ",
+" o . . o . . o . . o ",
+" ",
+" ",
+" ",
+" o o o o ",
+" . . . . ",
+" . . . . ",
+" . . . . ",
+" +@############################################$ +$########################% +%######################################## ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+## +#+&&&&&&&&&&&&&&&&&&&&&&+## +#+&&&&&&&&&&&&&&&&&o.&&&&&&&&&&&&&&&&&&+## ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+# +#+&&&&&&&&&&&&&&&&&&&&&&+#+# +#+&&&&&&&&&&&&&&&&&*Xo&&&&&&&&&&&&&&&&&+#+# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+ +#+&&&&&&&&&&&&&&&&&&&&&&+#+ +#+&&&&&&&&&&&&&&&&=XX*&&&&&&&&&&&&&&&&&+#+ ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+& +#+&&&&&&&&&&&&&&&&&&&&&&+#+& +#+&&&&&&&&&&&&&&&oOXXX&&&&&&&&&&&&&&&&&+#+& ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+&& +#+&&&&&&&&&&&&&&&&&&&&&&+#+&& +#+&&&&&&&&&&&&&&&&-XXXo&&&&&&&&&&&&&&&&+#+&& ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+&&& +#+&&&&&&&&&&&&&&&&&&&&&&+#+&&& +#+&&&&&&&&&&&&&&&&&oXXO&&&&&&&&&&&&&&&&+#+&&& ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+&&&& +#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&& +#+&&&&&&&&&&&&&&&&&oXo-o&&&&&&&&&&&&&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+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&XX&&.o&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::# ",
+" +#+&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&XX&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::# ",
+" +#+&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&XX&&&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&XX&&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&XX&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&ooXXXXXXXX.&&&&&&&&&+#+&&&&&&&;#;:::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&.OXOo&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&oXXO&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&o-oXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&XXX&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&OXXo&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&OXO&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&-XXX-&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&-X.&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&XXXOo&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&oX&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&*XXo&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&X&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&=X*&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;::::::::::::::::::::::::::# ",
+" +#+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&o&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&&&&&+#+&&&&&&&+#+::::::::::::+#+&&&&&&&&&&&&&&&&&&X=&&&&&&&&&&&&&&&&&+#+&&&&&&&;#;:::::::::::::::::::::::::::# ",
+" ##############################################+&&&&&&&+#+:::::::::::::##########################+&&&&&&&+#+:::::::::::::#########################################+&&&&&&&;#;::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;:::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;:::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;::::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;:::::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;::::::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&+#+::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;#;:::::::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&+#+:::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#;::::::::::::::::::::::::::::::::::::# ",
+" #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#+::::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&#+::::::::::::::::::::::#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#;:::::::::::::::::::::::::::::::::::::# ",
+" #################################################################################################################################################################;:::::::::::::::::::::::::::::::::::::+# ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#:::::::::::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::X::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::#::::::::::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::X::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::#:::::::::::::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::.Xo::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.Xo::::::::::::::::::#::::::::::::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::OX-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OX-::::::::::::::::::#:::::::::::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::XXO::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXO::::::::::::::::::#::::::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::oXXO:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oXXO::::::::::::::::::#:::::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::.XXXo::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.XXXo:::::::::::::::::#::::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#:::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#::::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#:::::::::::::::::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#::::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::.XXXXXXXXX.::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXXXXXXXXXX:::.:::::::::::::::::::#:::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#::::::::::::::+#+ ",
+" #:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::#:::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#::::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#:::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#::::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#:::::::::+#+ ",
+" #::::::::::::::::::::::::::::::::::o::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#::::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::#:::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.OXOo:::::::::::::::::#::::::+#+ ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oXXO::::::::::::::::::#:::::+#+ ",
+" #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXX::::::::::::::::::#::::+#+ ",
+" #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OXO::::::::::::::::::#:::+#+ ",
+" #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-X.::::::::::::::::::#::+#+ ",
+" #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oX:::::::::::::::::::#:+#+ ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::#+#+ ",
+" #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::o:::::::::::::::::::##+ ",
+" #################################################################################################################################################################+ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/cpw_back.xpm b/pcb_calculator/bitmaps/cpw_back.xpm
new file mode 100644
index 0000000000..a75a04a1dc
--- /dev/null
+++ b/pcb_calculator/bitmaps/cpw_back.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *cpw_back_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"# c #1C1E1C",
+"; c #747274",
+"- c #3C3AFC",
+"$ c #040204",
+"& c #14122C",
+"* c #FCB23C",
+"= c #7472FC",
+": c #CCCECC",
+"O c #1C1EFC",
+"@ c #ACAAAC",
+"+ c #2426FC",
+"X c #0402FC",
+"o c #ACAAFC",
+"% c #040624",
+". c #5456FC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .XXXX. .Xo .Xo oXo .XXXX. ",
+" XXo oXX oX. XX. .X XXo oXX ",
+" XXo oX. XX XXX XX XXo oX. ",
+" XX .. .X oXoXo X. XX .. ",
+" XXo oXo .X X. oXo XXo ",
+" oXXX.o X. X. .X .X oXXX.o ",
+" .XXXX.o X. Xo oX XX .XXXX.o ",
+" o.XXo .X .X Xo X. o.XXo ",
+" oXX oX .. X.oXo oXX ",
+" XX XX X.X. .X.X XX XX ",
+" XX XX XXX oXXX XX XX ",
+" oX. .Xo .XX XX. oX. .Xo ",
+" o.XXXX.o oX. .Xo o.XXXX.o ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" o . . o . . o . . o ",
+" . .OXX+ XXXO. . .OXX+ XXXO. . .OXX+ XXXO. . ",
+" .oXXXXXXX........XXXXXXO .oXXXXXXX........XXXXXXO .oXXXXXXX........XXXXXXO . ",
+" . o.OXXO XXXO. . o.OXXO XXXO. . o.OXXO XXXO. . ",
+" o . . o . . o . . o ",
+" ",
+" ",
+" ",
+" o o o o ",
+" . . . . ",
+" . . . . ",
+" . . . . ",
+" @#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$% @$$$$$$$$$$$$$$$$$$$$$$$$$& @&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ",
+" @$@******************************************@$$ @$@**********************@$$ @$@*****************o.******************@$$ ",
+" @$@******************************************@$@$ @$@**********************@$@$ @$@*****************+Xo*****************@$@$ ",
+" @$@******************************************@$@*$ @$@**********************@$@*$ @$@****************=XX+*****************@$@*$ ",
+" @$@******************************************@$@**$ @$@**********************@$@**$ @$@***************oOXXX*****************@$@**$ ",
+" @$@******************************************@$@***$ @$@**********************@$@***$ @$@****************-XXXo****************@$@***$ ",
+" @$@******************************************@$@****$ @$@**********************@$@****$ @$@*****************oXXO****************@$@****$ ",
+" @$@******************************************@$@*****$ @$@**********************@$@*****$ @$@*****************oXo-o***************@$@*****$ ",
+" @$@******************************************@$@******$ @$@**********************@$@******$ @$@*****************oXo*****************@$@******$ ",
+" @$@******************************************@$@*******$ @$@**********************@$@*******$ @$@*****************oXo*****************@$@*******$ ",
+" @$@******************************************@$@*******@$$$$$$$$$$$$$$$$@**********************@$@*******@$$$$$$$$$$$$$$$$@*****************oXo*****************@$@*******;$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*******XX********oXo*****************@$@*******;$;:$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@********XX*******oXo*****************@$@*******;$;::$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*********XX******oXo*****************@$@*******;$;:::$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@**********XX*****oXo*****************@$@*******;$;::::$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@***********XX****oXo*****************@$@*******;$;:::::$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@************XX***oXo*****************@$@*******;$;::::::$ ",
+" @$@******************************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*************XX**oXo*****************@$@*******;$;:::::::$ ",
+" @$@*************o****************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@**************XX**.o*****************@$@*******;$;::::::::$ ",
+" @$@**************.***************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@***************XX********************@$@*******;$;:::::::::$ ",
+" @$@***************.**************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@****************XX*******************@$@*******;$;::::::::::$ ",
+" @$@****************.*************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************XX******************@$@*******;$;:::::::::::$ ",
+" @$@*****************.************************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@******************XX*****************@$@*******;$;::::::::::::$ ",
+" @$@******************.***********************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************ooXXXXXXXX.*********@$@*******;$;:::::::::::::$ ",
+" @$@*******************.**********************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;::::::::::::::$ ",
+" @$@********************.*********************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;:::::::::::::::$ ",
+" @$@*********************.********************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;::::::::::::::::$ ",
+" @$@**********************.*******************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;:::::::::::::::::$ ",
+" @$@***********************.******************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;::::::::::::::::::$ ",
+" @$@************************.*****************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;:::::::::::::::::::$ ",
+" @$@***********************.OXOo**************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************oXo*****************@$@*******;$;::::::::::::::::::::$ ",
+" @$@************************oXXO**************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@***************o-oXo*****************@$@*******;$;:::::::::::::::::::::$ ",
+" @$@**************************XXX*************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@****************OXXo*****************@$@*******;$;::::::::::::::::::::::$ ",
+" @$@***************************OXO************@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@****************-XXX-****************@$@*******;$;:::::::::::::::::::::::$ ",
+" @$@****************************-X.***********@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************XXXOo***************@$@*******;$;::::::::::::::::::::::::$ ",
+" @$@*****************************oX***********@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************+XXo****************@$@*******;$;:::::::::::::::::::::::::$ ",
+" @$@*******************************X**********@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@*****************=X+*****************@$@*******;$;::::::::::::::::::::::::::$ ",
+" @$@********************************o*********@$@*******@$@::::::::::::@$@**********************@$@*******@$@::::::::::::@$@******************X=*****************@$@*******;$;:::::::::::::::::::::::::::$ ",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@*******@$@:::::::::::::$$$$$$$$$$$$$$$$$$$$$$$$$$@*******@$@:::::::::::::$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@*******;$;::::::::::::::::::::::::::::$ ",
+" $********************************************$*******@$@::::::::::::::$************************$*******@$@::::::::::::::$***************************************$*******;$;:::::::::::::::::::::::::::::$ ",
+" $********************************************$******@$@:::::::::::::::$************************$******@$@:::::::::::::::$***************************************$******;$;::::::::::::::::::::::::::::::$ ",
+" $********************************************$*****@$@::::::::::::::::$************************$*****@$@::::::::::::::::$***************************************$*****;$;:::::::::::::::::::::::::::::::$ ",
+" $********************************************$****@$@:::::::::::::::::$************************$****@$@:::::::::::::::::$***************************************$****;$;::::::::::::::::::::::::::::::::$ ",
+" $********************************************$***@$@::::::::::::::::::$************************$***@$@::::::::::::::::::$***************************************$***;$;:::::::::::::::::::::::::::::::::$ ",
+" $********************************************$**@$@:::::::::::::::::::$************************$**@$@:::::::::::::::::::$***************************************$**;$;::::::::::::::::::::::::::::::::::$ ",
+" $********************************************$*@$@::::::::::::::::::::$************************$*@$@::::::::::::::::::::$***************************************$*;$;:::::::::::::::::::::::::::::::::::$ ",
+" $********************************************$@$@:::::::::::::::::::::$************************$@$@:::::::::::::::::::::$***************************************$;$;::::::::::::::::::::::::::::::::::::$ ",
+" $********************************************$$@::::::::::::::::::::::$************************$$@::::::::::::::::::::::$***************************************$$;:::::::::::::::::::::::::::::::::::::$ ",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$;:::::::::::::::::::::::::::::::::::::@$ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::$:::::::::::::::::::::::::::::::::::::@$$ ",
+" $::::::::::::::::::::::::::::::::::X::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::$::::::::::::::::::::::::::::::::::::@$@$ ",
+" $::::::::::::::::::::::::::::::::::X::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::$:::::::::::::::::::::::::::::::::::@$@*$ ",
+" $:::::::::::::::::::::::::::::::::.Xo::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.Xo::::::::::::::::::$::::::::::::::::::::::::::::::::::@$@**$ ",
+" $:::::::::::::::::::::::::::::::::OX-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OX-::::::::::::::::::$:::::::::::::::::::::::::::::::::@$@***$ ",
+" $:::::::::::::::::::::::::::::::::XXO::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXO::::::::::::::::::$::::::::::::::::::::::::::::::::@$@****$ ",
+" $::::::::::::::::::::::::::::::::oXXO:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oXXO::::::::::::::::::$:::::::::::::::::::::::::::::::@$@*****$ ",
+" $::::::::::::::::::::::::::::::::.XXXo::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.XXXo:::::::::::::::::$::::::::::::::::::::::::::::::@$@******$ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$:::::::::::::::::::::::::::::@$@*******$ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$::::::::::::::::::::::::::::@$@*******@$ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$:::::::::::::::::::::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$::::::::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::.XXXXXXXXX.::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXXXXXXXXXX:::.:::::::::::::::::::$:::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$::::::::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::XX:::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XX:::::::XX:::.:::::::::::::::::::$:::::::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$::::::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$:::::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$::::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$:::::::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::o::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$::::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.:::::::::::::::::::$:::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::.OXOo:::::::::::::::::$::::::@$@*******@$@ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oXXO::::::::::::::::::$:::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::XXX::::::::::::::::::$::::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OXO::::::::::::::::::$:::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-X.::::::::::::::::::$::@$@*******@$@ ",
+" $::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::oX:::::::::::::::::::$:@$@*******@$@ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::X:::::::::::::::::::$@$@*******@$@ ",
+" $:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::o:::::::::::::::::::$$@*******@$@ ",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@*******@$@ ",
+" $***************************************************************************************************************************************************************$*******@$@ ",
+" $***************************************************************************************************************************************************************$******@$@ ",
+" $***************************************************************************************************************************************************************$*****@$@ ",
+" $***************************************************************************************************************************************************************$****@$@ ",
+" $***************************************************************************************************************************************************************$***@$@ ",
+" $***************************************************************************************************************************************************************$**@$@ ",
+" $***************************************************************************************************************************************************************$*@$@ ",
+" $***************************************************************************************************************************************************************$@$@ ",
+" $***************************************************************************************************************************************************************$$@ ",
+" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/microstrip.xpm b/pcb_calculator/bitmaps/microstrip.xpm
new file mode 100644
index 0000000000..1a99e561ba
--- /dev/null
+++ b/pcb_calculator/bitmaps/microstrip.xpm
@@ -0,0 +1,224 @@
+/* XPM */
+const char *microstrip_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 15 1",
+" c #FCFEFC",
+"& c #1C1E1C",
+"; c #3C3AFC",
+"# c #040204",
+"$ c #14122C",
+"% c #FCB23C",
+"- c #7472FC",
+"* c #CCCECC",
+"O c #1C1EFC",
+"@ c #ACAAAC",
+"= c #2426FC",
+"X c #0402FC",
+"o c #ACAAFC",
+"+ c #0C0AFC",
+". c #5456FC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .Xo .Xo oXo ",
+" oX. XX. .X ",
+" XX XXX XX ",
+" .X oXoXo X. ",
+" oXo .X X. oXo ",
+" X. X. .X .X ",
+" X. Xo oX XX ",
+" .X .X Xo X. ",
+" oX .. X.oXo ",
+" X.X. .X.X ",
+" XXX oXXX ",
+" .XX XX. ",
+" oX. .Xo ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" o . . o ",
+" . .OXXO XXXO. . ",
+" .oXXXXXX+........XXXXXXO . ",
+" . o.OXXO XXXO. . ",
+" o . . o ",
+" ",
+" ",
+" ",
+" o o ",
+" . . ",
+" . . ",
+" . . ",
+" @#########################$ ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@## ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%# ",
+" @#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%# ",
+" @$############################################################@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#################################################################& ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************o.**************************************@## ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************=Xo*************************************@#@# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*********************-XXO*************************************@#@*# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@********************oOXXX*************************************@#@**# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*********************;XXXo************************************@#@***# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXXO************************************@#@****# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo=o***********************************@#@*****# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@******# ",
+" @#@*********************************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@*******# ",
+" @#@******************o**************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@********# ",
+" @#@*******************.*************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@*********# ",
+" @#@********************.************************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@**********# ",
+" @#@*********************.***********************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@************XX********oXo*************************************@#@***********# ",
+" @#@**********************.**********************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*************XX*******oXo*************************************@#@************# ",
+" @#@***********************.*********************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**************XX******oXo*************************************@#@*************# ",
+" @#@************************.********************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@***************XX*****oXo*************************************@#@**************# ",
+" @#@*************************.*******************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@****************XX****oXo*************************************@#@***************# ",
+" @#@**************************.******************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*****************XX***oXo*************************************@#@****************# ",
+" @#@***************************.*****************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@******************XX**oXo*************************************@#@*****************# ",
+" @#@****************************.****************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*******************XX**.o*************************************@#@******************# ",
+" @#@*****************************.***************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@********************XX****************************************@#@*******************# ",
+" @#@****************************.O+Oo************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@*********************XX***************************************@#@********************# ",
+" @#@*****************************oXXO************************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************XX**************************************@#@*********************# ",
+" @#@*******************************XXX***********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@***********************XX*************************************@#@**********************# ",
+" @#@********************************OXO**********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************ooXXXXXXXX.*****************************@#@***********************# ",
+" @#@*********************************;X.*********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@************************# ",
+" @#@**********************************oX*********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@*************************# ",
+" @#@************************************X********************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@**************************# ",
+" @#@*************************************o*******************@#@%%%%%%%%%%%%%%%%%%%%%%@#@%%%%%%%@#@**********************oXo*************************************@#@***************************# ",
+" @#@*********************************o...o***o...o***o...o***o##########################@%%%%%%%@#@**********************oXo*************************************@#@****************************# ",
+" @#@***********************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%@#@**********************oXo*************************************@#@*****************************# ",
+" @#@************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%@#@**********************oXo*************************************@#@******************************# ",
+" @#@*************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%@#@********************o;oXo*************************************@#@*******************************# ",
+" @#@**************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%@#@*********************OXXo*************************************@#@********************************# ",
+" @#@***************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%%@#@*********************;XXX;************************************@#@*********************************# ",
+" @#@****************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%%@#@**********************XXXOo***********************************@#@**********************************# ",
+" @#@*****************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#%@#@**********************=XXo************************************@#@***********************************# ",
+" @#@******************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%#@#@**********************-X=*************************************@#@************************************# ",
+" @#@*******************************************************************#%%%%%%%%%%%%%%%%%%%%%%%%##@***********************X-*************************************@#@*************************************# ",
+" #################################################################################################################################################################@*************************************@# ",
+" #***************************************************************************************************************************************************************#*************************************@## ",
+" #*************************************************X*********************************************************************X***************************************#************************************@#@# ",
+" #*************************************************X*********************************************************************X***************************************#***********************************@#@%# ",
+" #************************************************.Xo*******************************************************************.Xo**************************************#**********************************@#@%%# ",
+" #************************************************OX;*******************************************************************OX;**************************************#*********************************@#@%%%# ",
+" #************************************************XXO*******************************************************************XXO**************************************#********************************@#@%%%%# ",
+" #***********************************************oXXO******************************************************************oXXO**************************************#*******************************@#@%%%%%# ",
+" #***********************************************.XXXo*****************************************************************.XXXo*************************************#******************************@#@%%%%%%# ",
+" #*************************************************.*********************************************************************.***************************************#*****************************@#@%%%%%%%# ",
+" #*************************************************.*********************************************************************.***************************************#****************************@#@%%%%%%%@# ",
+" #*************************************************.*********************************************************************.***************************************#***************************@#@%%%%%%%@#@ ",
+" #*************************************************.*********************************************************************.***************************************#**************************@#@%%%%%%%@#@ ",
+" #**********************************.XXXXXXXXX.****.*********************************************************************.*****XX*******XX***********************#*************************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#************************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#***********************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#**********************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#*********************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#********************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XXXXXXXXXXX***********************#*******************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#******************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#*****************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#****************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#***************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#**************@#@%%%%%%%@#@ ",
+" #**************************************XX*********.*********************************************************************.*****XX*******XX***********************#*************@#@%%%%%%%@#@ ",
+" #*************************************************.*********************************************************************.***************************************#************@#@%%%%%%%@#@ ",
+" #*************************************************;*********************************************************************;***************************************#***********@#@%%%%%%%@#@ ",
+" #*************************************************.*********************************************************************.***************************************#**********@#@%%%%%%%@#@ ",
+" #*************************************************.*********************************************************************.***************************************#*********@#@%%%%%%%@#@ ",
+" #*************************************************o*********************************************************************.***************************************#********@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************.***************************************#*******@#@%%%%%%%@#@ ",
+" #*********************************************************************************************************************.O+Oo*************************************#******@#@%%%%%%%@#@ ",
+" #*********************************************************************************************************************oXXO**************************************#*****@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************XXX**************************************#****@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************OXO**************************************#***@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************;X.**************************************#**@#@%%%%%%%@#@ ",
+" #**********************************************************************************************************************oX***************************************#*@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************X***************************************#@#@%%%%%%%@#@ ",
+" #***********************************************************************************************************************o***************************************##@%%%%%%%@#@ ",
+" #################################################################################################################################################################@%%%%%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#@#@ ",
+" #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##@ ",
+" #################################################################################################################################################################@ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/pcb_calculator.xpm b/pcb_calculator/bitmaps/pcb_calculator.xpm
new file mode 100644
index 0000000000..b30c76ae52
--- /dev/null
+++ b/pcb_calculator/bitmaps/pcb_calculator.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+const char *pcb_calculator_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 16 1",
+"o c #AC9D99",
+"= c #6F5A87",
+"- c #4242BA",
+"& c #7E7EF7",
+"# c #37357B",
+"; c #9A5753",
+"O c #997366",
+". c #958280",
+"@ c #342D4E",
+"X c #B0816B",
+" c None",
+"$ c #3A1721",
+"* c #6258B4",
+": c #9C090B",
+"+ c #5C433C",
+"% c #6E5C55",
+/* pixels */
+" .XXX. ",
+" oXo..OX o ",
+" oX.+O.X.+@#$% ooo ",
+" oX.+%X%&&&&*@+o o oo ",
+" oOO%+.O&&&&&&*= o o ",
+" .@@=X%+OX&&&&&&& o o ",
+" oXX+@#&&&X%+%X&&&&&&& o o ",
+" oOoX=&&&&OX%+OX&&&&&&& o o=$ ",
+"O@O.OX..&O.%++OX&&&&&& oooooo-$o",
+"+-O.+O.XX.%+++%..&&&& ooo oo--@O",
+"@-*XO+++%%+++++%..&& oooo-----#+",
+"$--=XO+++++%++++OX. oooo----##@@",
+"$---OX..O..XO++++O ooo ---##@@@%",
+"@----*OOXOOOXO+++oooo --##@@@@@.",
+"%#----------OXO+oooo =#@@@@@@@@o",
+".#----------*;Xooooo.X+@@@@@@%$ ",
+" $=--------#$:$oooo++.X+@@@$%.+ ",
+" +O+#-----$:;;:$. ++++.O+$++..+ ",
+" o+O%$#--$::::::$.%++++.O. O..+ ",
+" +$$::::::::;.%++++.X %..+ ",
+" $:::::::::@O.%++++.X%.%+ ",
+" +:::;:::::$..O.++++%.X$%o ",
+" o$::+O:::::$O..+X.++++%.X ",
+" ;:::Oo:::::+ O..+ X.++++%.X ",
+" o$::;oo:::::$ O..+ X.++++%.o ",
+" +::X o:::::$ .+$+ X.++oo.X ",
+" $:o ;:::::$o %. X.% oOX ",
+" +:::::::::o X.OO.X ",
+" .::::::::% XXXXo ",
+" +::::::$ oo ",
+" +:::::o ",
+" %$:$. "
+};
diff --git a/pcb_calculator/bitmaps/pi_formula.xpm b/pcb_calculator/bitmaps/pi_formula.xpm
new file mode 100644
index 0000000000..4c5bcda76a
--- /dev/null
+++ b/pcb_calculator/bitmaps/pi_formula.xpm
@@ -0,0 +1,301 @@
+/* XPM */
+static const char *pi_formula_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"259 278 17 1",
+"X c Black",
+"> c #D9D9D9",
+"* c #E1E1E1",
+"= c #F0F0F0",
+" c #FFFFFF",
+"o c #E9E9E9",
+": c #BDBDBD",
+"O c #4D4D4D",
+"+ c #A7A7A7",
+"# c #7C7C7C",
+"& c #9A9A9A",
+"@ c #C7C7C7",
+". c #C0C0C0",
+"- c #8C8C8C",
+"; c #B2B2B2",
+"% c #D0D0D0",
+"$ c #686868",
+/* pixels */
+" ",
+" ",
+" ............................................................. ",
+" . . ",
+" . X . ",
+" . XX . ",
+" . X X . ",
+" . X X . ",
+" . XXX . ",
+" . X X . ",
+" . XXX XXX . ",
+" . . ",
+" . . ",
+" . XXXXXXXXXXXX . ",
+" . . ",
+" . XX XX . ",
+" . X X X X . ",
+" . X X X . ",
+" . XXXX X X XX X X X . X X oO X X X XXXXXX ",
+" . XX XXX XXX X X X X X . XX +X@ XX X X ",
+" . X X X X X X X X X . X X #X$ X X X X X X ",
+" . X X X X X XXXX XX . X X %@&X% X X X X X X ",
+" . X *XXXXXXXXX X X X . XXX XXX XXX X XXXX X XX #=*X- XXXXXXXXX XXX XXXXXXXX XXX X XX XX XX XXX XXXX X XX X XX X X XX XX X X X ",
+" . X XXXX X X X . X X X XX X XX X o& #X* X X X X X X XXX X X X X X X XX X X XXX X XX XXX X X XX XXXXX ",
+" . X X X X X . X X X X X X X +% %X+ XX X X XXXXX X X X X XX X X X X X X X X X X X X X ",
+" . X X *XXXXXXXXX X X X . X X X X X X X X OXXXXXX= XXXXXXXXX XX X X X X X X X X XX X X X X X X X X X X X X X X ",
+" . X X X X X . X X X X X X X X @; ;X+ X X X X X X X X X X X X X X X X X X X X X X X X ",
+" . X X X X X . XX XX X X X X X *O* =XX% X XX X X X X X X X X X XXX X XX X X X X X X X X X X X XXX X X ",
+" . XXXXXX XXX XX . X X XXX XX XXX XXX *XXX: *XXXX: XXX XX XX XX XXX XXX XXX XX X XXX XX XX XXX XX XXX XXX XXX XXX XXX XX X XXXXXXX ",
+" . . ",
+" . . ",
+" . . ",
+" ............................................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXX X X X X X X X ",
+" X X XX XX XX ",
+" X X X X X X ",
+" X X X X X ",
+" X X X XX XXXXXXXXX XX X XXX XXX X X XX XXX XX X X X XX X XX XX XX XXXX X X XX XX X XX XXX XX X XXX X XX XXX XXX ",
+" X XX XXX X X XX X X X X XX XXX X X X XX XX XXX X XXX X X X X XX XXX XX X XXX X X X X XX X X XXX X X X X X ",
+" X X X X X X XXXXX X X X XXXXX X X X X X X X X X X X X X X X X XXXXX X X XX X X X XXXXX ",
+" X X X X XXXXXXXXX X X X XX X X X X X X X X X X X X X X X X X X X X X X XX X X X X X ",
+" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ",
+" X X X X X X XXX X X X X X X X X X XXX X X X XX X X XXX X X X X X X XX X X X X XXX X XX X X X X X X ",
+" XXXXXXXX XXX XXX XXX XX X XXX XXX XXX XXX XXX XX X XXX XXX XXX X XX XX X XX XXX XXX XXX XXX X XX XXX XX X XXX XX XXX XXX XXX XXX ",
+" X X ",
+" X X ",
+" XXX XXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXX X X X X X ",
+" X X XX XX XX ",
+" X X X X X X X X ",
+" X X X X X X X ",
+" X XX XX XX XXXX XXXXXXXXX XX X XXX XXX X X XX XXX XX X XX XX XX XXXX X XX XX XX XXXX X X XX XX X XX XXX XX X XXX X XX XXX XXX ",
+" X X X X X X X XX X X X X XX XXX X X X XX X X X X X XXX X X X X XX XXX XX X XXX X X X X XX X X XXX X X X X X ",
+" X X X X X X X X XXXXX X X X XXXXX X X X X X X X X X X X X X X X X X X XXXXX X X XX X X X XXXXX ",
+" X X X X X X XXXXXXXXX X X X XX X X X X X X X X X X X X X X X X X X X X X X X X XX X X X X X ",
+" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ",
+" X X X X X XXX X X X XXX X X X X X X X X X XXX X X X XXX X X XX X X XXX X X X X X X XX X X X X XXX X XX X X X X X X ",
+" XXXXXXXX XX XX X XX XX X XXX XXX XXX XXX XXX XX X XX XX X XX X XX XX X XX XXX XXX XXX XXX X XX XXX XX X XXX XX XXX XXX XXX XXX ",
+" X X ",
+" X X ",
+" XXX XXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ................................................................................................................................................................................................... ",
+" . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . - . ",
+" . ; . ",
+" . & . ",
+" . & . ",
+" . X : XXXXXXX XXXXXXX . ",
+" . XXX *: X X X X X . ",
+" . X *% X X X X X . ",
+" . X @* X -* X X . ",
+" . X :* X XXX XX XX =; &*o; X XXX XX X XXX . ",
+" . X : X X X X X =+#&;$% X XX X X X X X . ",
+" . X - X X XX X %O$= X X X X X X . ",
+" . X & X X XX X o$;;%#+ X X X X X X . ",
+" . X o% %o + X X X X X > -* > X X X X X XX X . ",
+" . X + + - X X X X X X X ;o X X X XX X XX XX X . ",
+" . XXXXX XXX XXX o; XXXX X X ;= + XXXXXXX XX X XX XXXXXXX XXX XXX XX XXX . ",
+" . X X X X :% XX XXX XXX %@ *: . ",
+" . X X X -* X X X *& *: . ",
+" . X X X -* $ X X X # -* %* . ",
+" . X X X *XXXXXXXXX =; &*o; X X X X =; &*o; :* . ",
+" . XXXX X =+#&;$% X X XXXX X X =+#&;$% > :o . ",
+" . X X X XXXXXXXXXXX %O$= X X X *XXXXXXXXX X X %O$= O - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X *XXXXXXXXX o$;;%#+ X X X X X o$;;%#+ :$o - . ",
+" . X X X > -* > # X X X $ > -* > ::> - . ",
+" . X X X X ;o -* X X X *- ;o %: - . ",
+" . XXXX XX XXXXX @% XXXXXX XXX %: *+ - . ",
+" . XXX =; ;o - *: XXXX X . ",
+" . X X + + O *: XX XXX . ",
+" . X X o> >o - %@ X X . ",
+" . X ;*:* X X . ",
+" . X @@:* X . ",
+" . X *:- X XXXX . ",
+" . X =-- X X . ",
+" . X $$ X X . ",
+" . X -- X X . ",
+" . X X +- X X . ",
+" . XXXXXX :& XXXXXX . ",
+" . >: . ",
+" . . ",
+" ................................................................................................................................................................................................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ......................................................................................................................................................................... ",
+" . . ",
+" . . ",
+" . X . ",
+" . XXX . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . XXXXX XX X . ",
+" . X X X X XXX . ",
+" . X X X . ",
+" . X X X . ",
+" . X X X *XXXXXXXXX . ",
+" . XXXX XX . ",
+" . X X X . ",
+" . X X X *XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X X . ",
+" . XXXX XX XXX . ",
+" . XXXX X X X . ",
+" . XX XXX o XXX XXX . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . X - X X . ",
+" . X XXXX - X X . ",
+" . X X o----O---- X X . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . XXXXXX - XXX XXX . ",
+" . . ",
+" . . ",
+" . . ",
+" . . ",
+" . . ",
+" . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX *XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX . ",
+" . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX . ",
+" . o% %o . ",
+" . + + . ",
+" . XXXXXXX o; XXXX X X ;= XXXXX XXX . ",
+" . X X :% XX XXX XXX %@ X X X X . ",
+" . X X X -* X X X *& X X X . ",
+" . X X -* $ X X X # X X X . ",
+" . X XXX XX X XXX =; &*o; X X X X X X X . ",
+" . X XX X X X X X =+#&;$% X X XXXX X X XXXX X . ",
+" . X X X X X X %O$= X X X *XXXXXXXXX X X X X X . ",
+" . X X X X X X o$;;%#+ X X X X X X X X . ",
+" . X X X X X XX X > -* > # X X X $ X X X . ",
+" . X X X XX X XX XX X ;o -* X X X *- X X X X . ",
+" . XXXXXXX XXX XXX XX XXX @% XXXXXX XXX %: XXXX XX XXXXX . ",
+" . =; ;o . ",
+" . + + . ",
+" . o> >o . ",
+" ......................................................................................................................................................................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ............................................................................................................................................................... ",
+" . . ",
+" . . ",
+" . X . ",
+" . XXX . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . X . ",
+" . XXXXX XX X . ",
+" . X X X XXX . ",
+" . X X X . ",
+" . X X X . ",
+" . X X X *XXXXXXXXX . ",
+" . XXXX X . ",
+" . X X X . ",
+" . X X X *XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X . ",
+" . XXXX XX XXXX . ",
+" . . ",
+" . XXXX X X X . ",
+" . XX XXX o XXX XXX . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . X - X X . ",
+" . X XXXX - X X . ",
+" . X X o----O---- X X . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . X X - X X . ",
+" . XXXXXX - XXX XXX . ",
+" . . ",
+" . . ",
+" . . ",
+" . . ",
+" . . ",
+" . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX *XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX . ",
+" . . ",
+" . o% %o . ",
+" . + + . ",
+" . XXXXXXX o; XXXX X X ;= XXXXX XXX . ",
+" . X X X :% XX XXX XXX %@ X X X X . ",
+" . X X -* X X X *& X X X . ",
+" . X -* $ X X X # X X X . ",
+" . X XXX XX XX =; &*o; X X X X X X X . ",
+" . X X X X X =+#&;$% X X XXXX X X XXXX X . ",
+" . X X XX X %O$= X X X *XXXXXXXXX X X X X X . ",
+" . X X XX X o$;;%#+ X X X X X X X X . ",
+" . X X X X X > -* > # X X X $ X X X . ",
+" . X X X X X X X ;o -* X X X *- X X X X . ",
+" . XXXXXXX XX X XX @% XXXXXX XXX %: XXXX XX XXXXX . ",
+" . =; ;o . ",
+" . + + . ",
+" . o> >o . ",
+" ............................................................................................................................................................... ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/rectwaveguide.xpm b/pcb_calculator/bitmaps/rectwaveguide.xpm
new file mode 100644
index 0000000000..7889c79fbb
--- /dev/null
+++ b/pcb_calculator/bitmaps/rectwaveguide.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *rectwaveguide_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"O c #0D0C0D",
+"# c #5557FC",
+"= c #747274",
+"- c #1C1EC4",
+"@ c #FCB23C",
+"X c #545654",
+"$ c #191AFC",
+"; c #CCCECC",
+". c #ACAAAC",
+"o c #3C3A3C",
+"* c #3937FC",
+"& c #0402FC",
+": c #3030DC",
+"% c #ACAAFC",
+"+ c #3C3A8C",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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@@@@@@@@@@@@@@@@@oO.O. ",
+" %% XX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OOO. ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXOO. ",
+" #### #### ###:-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo: ",
+" # # ",
+" # # ",
+" # # ",
+" ",
+" ",
+" ",
+" ",
+" # # ",
+" # # ",
+" # # ",
+" # # ",
+" ",
+" %*$* *$*% ",
+" %*$$&&&$ $&&&$$*% ",
+" %$&&&&&################################################################################################&&&&&&$% ",
+" # %*$* *$*% # ",
+" # # ",
+" # # ",
+" # # ",
+" ",
+" #&&&&% ",
+" #&% %& ",
+" %% & ",
+" %%#& ",
+" &&#& ",
+" &&% & ",
+" && & ",
+" && %&& ",
+" &&%& ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/regul.xpm b/pcb_calculator/bitmaps/regul.xpm
new file mode 100644
index 0000000000..f4649f45fb
--- /dev/null
+++ b/pcb_calculator/bitmaps/regul.xpm
@@ -0,0 +1,386 @@
+/* XPM */
+static const char *regul_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"256 150 230 2",
+"sX c Black",
+" c #3628C3",
+"L. c #840904",
+"n c #3628C4",
+"9 c #990000",
+"G c #3628C5",
+"oX c #9F4320",
+"l c #860000",
+"7 c #3628C9",
+"+. c #D2AD53",
+"S. c #8F2110",
+".. c #CA9C4B",
+"n. c #EDE76F",
+"& c #AA0000",
+"y. c #E5D666",
+"r. c #E5D667",
+"V c #5353D0",
+"6. c #D5B456",
+"$X c #CDA34E",
+"R c #840000",
+"[. c #F0EE72",
+">. c #BD813E",
+"Z. c #B57036",
+"!. c #D8BB5A",
+"% c #3926C6",
+"H c #372CC8",
+"p. c #952C15",
+"* c #820000",
+"E. c #B87739",
+"a. c #8D1B0D",
+"h c #3729C2",
+"- c #3729C3",
+"4. c #B06631",
+"# c #3729C4",
+"q c #2E2EB9",
+"5X c #A85529",
+"! c #A0441F",
+"j. c #A04421",
+"W c #D3AE4F",
+"=. c #C38F45",
+"j c #352CC1",
+"c. c #983319",
+"B. c #B36D34",
+"X. c #881108",
+"q. c #EEE86F",
+"o c #800000",
+"< c #3529C1",
+"3X c #9B3A1C",
+"f. c #8B180B",
+"s. c #F1EF73",
+"`. c #D9BC5A",
+"t. c #D1AB52",
+"Y c #3329C2",
+"9. c #C99A4A",
+"] c #ECE56E",
+". c #FF0000",
+"yX c #E4D465",
+"+ c #382AC3",
+"i c #382AC4",
+"8. c #D4B256",
+"g. c #EFEC71",
+"m c #3636E0",
+"O c #0000FF",
+"/. c #E7DB69",
+"_. c #DFCA61",
+"I. c #D7B959",
+"o. c #A44C24",
+"_ c #CFA851",
+"F c #362AC2",
+"w c #362AC3",
+"U c #362AC4",
+"x c #4924B6",
+"E c #5C0047",
+"7X c #8C190C",
+"J c #3627C1",
+"D. c #840804",
+"A. c #A75328",
+"{. c #9F4220",
+"C. c #973118",
+"N. c #B26B33",
+"T. c #870F07",
+"@. c #EDE66E",
+"3 c #8B0000",
+"W. c #E5D566",
+"f c #392BC2",
+"a c #392BC3",
+"M. c #9A381B",
+"K c #3427C4",
+"0 c #392BC6",
+"+X c #922713",
+"i. c #8A160A",
+"r c #372EBF",
+"/ c #F0ED72",
+"B c #3030BF",
+"$. c #820502",
+"4 c #890000",
+"e c #372BC2",
+"{ c #8D1D0E",
+"d c #372BC4",
+"[ c #850C06",
+"b c #4020BF",
+"0. c #EBE36D",
+"). c #B87638",
+" . c #E3D265",
+"XX c #DBC15C",
+"t c #3728C2",
+"} c #B06530",
+"u c #3728C3",
+"A c #3728C4",
+"1X c #A0431E",
+"X c #870000",
+"^ c #EEEA70",
+">X c #C38E44",
+"9X c #E6D968",
+"x. c #BB7D3C",
+"2 c #352BC5",
+":. c #D6B758",
+"s c #4040BF",
+"u. c #AB5B2C",
+"-. c #A34A23",
+"OX c #9B391B",
+"; c #391CC6",
+"K. c #B67337",
+"L c #850000",
+"U. c #AE622F",
+"(. c #830603",
+"D c #3A29C5",
+"3. c #962F17",
+"O. c #B16932",
+"b. c #860D06",
+"&X c #ECE46D",
+"]. c #A9582A",
+"' c #E4D365",
+", c #830000",
+"N c #9595A9",
+"p c #3829C2",
+" X c #DCC25D",
+": c #3829C3",
+"S c #3829C4",
+"6X c #D4B155",
+"P c #3322BB",
+"#X c #912512",
+"H. c #89140A",
+"G. c #EFEB71",
+"<. c #810301",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . X o ",
+"O + @ @ @ @ # $ @ % o o o & o o o o o o o o o o o * o o o o o o o o o o o o o o o o o o o o = ",
+" + - - ; O - - : - - > = o o , o o o , o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ",
+" < - - > 1 - - 2 - - > 3 o o o o o o o o o o o o & 4 * o o o o o o o o o o o o o o o o o o o o o o o o o o ",
+" 5 - 5 : - - o o o o o o o = o o o o = o o o o o o o o o o o o ",
+" 6 - - % 7 - - 8 o o o o o o o o o o o o 9 = o o = o o o o o o o o o ",
+" 0 - - : + - - q w - e r - : % t 5 y u i o o o o o o = o o = o o o o o o o o o o o o o ",
+" # - - - - - - - > p - 5 a - - - - - - : s O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O o o o o , o o o o o o o o o o o o o o o o o o o ",
+" d - - f u - - g - - > p - @ - h 1 j k : - - w O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O l o o = o o o o o o = o o o o o o o o o o o o ",
+" - - - - - h - - > p - - # z x - - c O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O o o o o o o = o o o * o o o o o o o o o o o o ",
+" + - - v b - - @ - - > p - - n c - - O O O m M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M N O O O = o o o o o o 3 o o o , o o = o o o o o o o o o ",
+" B - - e n - - b - - > p - - # > - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o = o o * o o o o o o o o o ",
+" p - : A - S - - > p - - D F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o 4 o o o o o o = o o o o o o o o o o o o 9 ",
+" G - - H J - - K - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o L o o o = o o o o o o o o o * ",
+" # - # + - - - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o = o o o l o o o * o o = = o o , o o o = o o o o o o ",
+" - - h h - S - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O = o o o o o o o o o o o o o o l o o o o o o o , o o o o o o o ",
+" P - - I - u v - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o = o o o o o o o o * o o o o o o o o o o = o o o o o o o o o o o ",
+" - - - - 5 - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o * o o o o o o o o o o o o = o o o o o o o o o o o o o o o o o o o o o o ",
+" f - - - J - - > p - - j F - - O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o o o * o o o o o o o o o o o o o o o o o o o o o ",
+" c + U # + > Y + + T U + u O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O * o , o = o o o o L l = = o = o R * o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o ",
+" O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O E o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o * ",
+" O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O E o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o * ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o o o * ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o 9 ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C ~ ^ ^ / C C C C C C C C C C C C ( ^ ^ ( C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C ) _ ` ' C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C ] [ o { ( C C C C C C C C C C C } o | .C C C C C C C C C C C C C C C C C C C C C C C C C C C C ..X.o o o o.C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C O.o o +.C C C C C C C C C C @.[ o o.C C C C C C C C C C C C C C C C C C C C C C C C C C C C #.$.o %.&.*.=.C C C C Z O O O o o W Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ! o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C ) | o -.C C C C C C C C C C ;.o o :.C C C C C C C C C C C C C C C C C C C C C C C C C C C C >.o o ,.C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C -.o <.1.C C C C C C C C C 2.o 3.C C C C C C C C C C C C C C C C C C C C C C C C C C C C C 4.o 5./ C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C 6.o o 7.C C C C C C C C 8.o o 9.C C C ^ 0.q.C / w.e.( C C C C C C r.,.t.y.C C C C C C @.0.u.o i.0.0.q.C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C p.o a.s.C C C C C C C d.o f.g.C C C h.o j. .f.o o k.` C C ( ;.X.o o o o k.;.( C C C p.o o o o o o l.C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C z.o o _ C C C C C C r.<.o x.C C C C h.o c.v.o <.o b.n.C @.m.o o M.N.B.V.o o C.n.C C Z.A.S.o D.A.A.F.C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C G.H.o J.C C C C C C K.o L.P.C C C C h.o o $.9.n.y.I.C C U.o D.t.C C C C Y.T.o 4.C C C C R.o f.C C C C C C C C Z O O o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C E.o | W.C C C C G.H.o Q.C C C C C h.o o x.C C C C C !.%.o ~.C C C C C C =.o %.^.C C C R.o f.C C C C C C C C Z O O o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C /.(.o ).C C C C 9.o o _.C C C C C h.o o `.C C C C C 7.o | 0.C C C C C C '.%.o ;.C C C R.o f.C C C C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C ].o f.[.C C C m.o {.C C C C C C h.o o '.C C C C C }.o (.m.m.m.m.m.m.m.m.|.o } C C C R.o f.C C C C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Xo o .XC C XXo o ,.C C C C C C h.o D.C C C C C C &.o o o o o o o o o o o o oXC C C R.o f.C C C C C C C C Z O O O o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C OXo {.C C u.o +X~ C C C C C C h.o D.C C C C C C @Xo #X^ ^ ^ ^ ^ ^ ^ ^ ^ ^ / C C C R.o f.C C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C $Xo %.y.] L.o %XC C C C C C C h.o D.C C C C C C Z.o %.&XC C C C C C ~ *X0.C C C C R.o f.C C C C C C C C Z O O O o o o o o o o o o o o o o o o o o o o o o o o ",
+" O O O V C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C s.{ o x.=Xo -X;XC C C C C C C h.o D.C C C C C C ,.o o h.C C C C C C :Xo o >XC C C R.o f.C C C C C C C C Z O O O o o ,X c #C0C0C0",
+"; c #8C8C8C",
+": c #B2B2B2",
+"= c #D0D0D0",
+"O c #686868",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . . ... . ...... ",
+" . . .. . . ",
+" . . . . . . . . . ",
+" . . . . . . . . . ",
+" . . .... .... ... . .. .. .. ... .... . .. . .. ......... . .. .. . . . ",
+" . . . . . . ... . . . . . . .. . . ... . .. . . .. ..... ",
+" . . . . ..... . . . . .. . . . . . . . . . . . . ",
+" ..... . . . . . . . .. . . . . . . . ......... . . . . . . ",
+" . . . . . . . . . . . . . . . . . . . . . . . ",
+" . . . . . . . . . . . ... . .. . . . . . . . . . . ... . . ",
+" .... .... .. .. ... ... ... .. . ... .. .. ... .. ... ... .. .. . ....... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......X oo .......X ... oo ... oo ... ",
+" .O+ @.#$ oo .O+ @.#$ % .. oo .. oo .. ",
+" .& o.% .& o.% $# .. .. .. ",
+" % *.O % *.O o. .. .. .. ",
+" #.+ ... ...=#.= ........ #.+ $-..-$ ... ... o.... ........ $-.%.. $-..- =#... ... ...@Oo $-..- $-.%.. ... ...=#- =.-$ ...%.-$ $-..- $-.%.. $;..-$ ...=#.= X.#: $-..- ",
+" -.- .. ..= .# -.- #.==.# .. .. .. #.==.. #.==.# #. *. .. ..&=o #.==.# #.==.. .. ..==.#.-.# ..+=.# #.==.# #.==.. O.$=.# ..= .# X.+:# #.==.# ",
+" +.# .. .. .. +.# .. .. .. .. .. .. .. .. .. O.;$ .. .. .. .. .. .. .. .. ..= .. .. .. .. .. .. .. @.. .. .. #. .. .. ",
+" O.* . .. .. .. ........ O.* . .. .. .. .. .. ........ .. .. ...... @o.#@ .. .. ...... .. .. .. .. .. .. .. .. ...... .. .. -.-.. .. .. .. ...... ",
+" %.; =o .. .. .. %.; =o .. .. .. .. .. .. .. #. -.# .. .. #. .. .. .. .. .. .. .. .. #. .. .. :.= .. .. .. #o #. ",
+" $#.@ *#; .. .. .. $#.@ *#; #.==.# #. =.. ..&; #.=*.. :.% =X .* .# .. .. :.% =X #.=*.. .. .. .. .. ..*=.# :.% =X #.=*.. #.==.. .. .. -#&+X :.% =X ",
+" X.......; .... .... ... X.......; $-..-$ =##%... =#O@ $-.=... :..- .&O#= ........ :..- $-.=... .... .... ... ... ..:.-$ :..- $-.=... $Xo&o.: .... ... ;.;@ :..- ",
+" .. ",
+" .. ",
+" .... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ",
+" > > ",
+" > $ > ",
+" > ..... .. ..... ... ..... .. ....... O .... > ",
+" > . . . . . . . . . . . . . . &o . . > ",
+" > . . . . . . . . . . . -% . > ",
+" > . . . . . . . . . . O@ . > ",
+" > . . . +......... . . . +......... . . . +......... . ... .. .. @# . > ",
+" > .... . .... . .... .. . . . . . *X ... > ",
+" > . . . . . . . . . . . .. . ;= . > ",
+" > . . . +......... . . . +......... . . . +......... . . .. . .$ . > ",
+" > . . . . . . . . . . . . . . &o . > ",
+" > . . . . . . . . . . . . . . . . . . :: . > ",
+" > .... .. .... .... .. ..... .... .. ... ....... .. . .. O+ .... > ",
+" > > ",
+" > > ",
+" > > ",
+" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/sources/attenuator/tee_formula.png b/pcb_calculator/bitmaps/sources/attenuator/tee_formula.png
new file mode 100644
index 0000000000..34e19e03b5
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/attenuator/tee_formula.png differ
diff --git a/pcb_calculator/bitmaps/sources/attenuator_PI.png b/pcb_calculator/bitmaps/sources/attenuator_PI.png
new file mode 100644
index 0000000000..11b15a5b8e
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/attenuator_PI.png differ
diff --git a/pcb_calculator/bitmaps/sources/color_code/color_code_multiplier.png b/pcb_calculator/bitmaps/sources/color_code/color_code_multiplier.png
new file mode 100644
index 0000000000..b948c4f20f
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/color_code/color_code_multiplier.png differ
diff --git a/pcb_calculator/bitmaps/sources/color_code/color_code_tolerance.png b/pcb_calculator/bitmaps/sources/color_code/color_code_tolerance.png
new file mode 100644
index 0000000000..0ba4c5f900
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/color_code/color_code_tolerance.png differ
diff --git a/pcb_calculator/bitmaps/sources/color_code/color_code_value.png b/pcb_calculator/bitmaps/sources/color_code/color_code_value.png
new file mode 100644
index 0000000000..1e7dcb2ca8
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/color_code/color_code_value.png differ
diff --git a/pcb_calculator/bitmaps/sources/color_code/color_code_value_and_name.png b/pcb_calculator/bitmaps/sources/color_code/color_code_value_and_name.png
new file mode 100644
index 0000000000..d7dedfdcd2
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/color_code/color_code_value_and_name.png differ
diff --git a/pcb_calculator/bitmaps/sources/pcb_calculator.svg b/pcb_calculator/bitmaps/sources/pcb_calculator.svg
new file mode 100644
index 0000000000..b21a3c3a3f
--- /dev/null
+++ b/pcb_calculator/bitmaps/sources/pcb_calculator.svg
@@ -0,0 +1,688 @@
+
+
+
+
diff --git a/pcb_calculator/bitmaps/sources/regul.svg b/pcb_calculator/bitmaps/sources/regul.svg
new file mode 100644
index 0000000000..11a8cb7183
--- /dev/null
+++ b/pcb_calculator/bitmaps/sources/regul.svg
@@ -0,0 +1,231 @@
+
+
+
+
diff --git a/pcb_calculator/bitmaps/sources/transline/c_microstrip.png b/pcb_calculator/bitmaps/sources/transline/c_microstrip.png
new file mode 100644
index 0000000000..7e3cf79306
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/c_microstrip.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/coax.png b/pcb_calculator/bitmaps/sources/transline/coax.png
new file mode 100644
index 0000000000..78d098aba9
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/coax.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/cpw.png b/pcb_calculator/bitmaps/sources/transline/cpw.png
new file mode 100644
index 0000000000..a92c6e62df
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/cpw.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/cpw_back.png b/pcb_calculator/bitmaps/sources/transline/cpw_back.png
new file mode 100644
index 0000000000..b7c5b28ef4
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/cpw_back.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/microstrip.png b/pcb_calculator/bitmaps/sources/transline/microstrip.png
new file mode 100644
index 0000000000..6132fd5dc9
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/microstrip.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/rectwaveguide.png b/pcb_calculator/bitmaps/sources/transline/rectwaveguide.png
new file mode 100644
index 0000000000..d179d3cc1c
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/rectwaveguide.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/stripline.png b/pcb_calculator/bitmaps/sources/transline/stripline.png
new file mode 100644
index 0000000000..54918ee54f
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/stripline.png differ
diff --git a/pcb_calculator/bitmaps/sources/transline/twistedpair.png b/pcb_calculator/bitmaps/sources/transline/twistedpair.png
new file mode 100644
index 0000000000..75a5786f3a
Binary files /dev/null and b/pcb_calculator/bitmaps/sources/transline/twistedpair.png differ
diff --git a/pcb_calculator/bitmaps/splitter_formula.xpm b/pcb_calculator/bitmaps/splitter_formula.xpm
new file mode 100644
index 0000000000..781fe92ec2
--- /dev/null
+++ b/pcb_calculator/bitmaps/splitter_formula.xpm
@@ -0,0 +1,135 @@
+/* XPM */
+static const char *splitter_formula_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"230 112 17 1",
+". c Black",
+"& c #D9D9D9",
+"+ c #E1E1E1",
+"$ c #F0F0F0",
+" c #FFFFFF",
+"@ c #E9E9E9",
+"% c #BDBDBD",
+"# c #4D4D4D",
+"- c #A7A7A7",
+"o c #7C7C7C",
+"X c #9A9A9A",
+"* c #C7C7C7",
+"> c #C0C0C0",
+"; c #8C8C8C",
+": c #B2B2B2",
+"= c #D0D0D0",
+"O c #686868",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . . ... . ...... ",
+" . . .. . . ",
+" . . . . . . . . . ",
+" . . . . . . . . . ",
+" . . .... .... ... . .. .. .. ... .... . .. . .. ......... . .. .. . . . ",
+" . . . . . . ... . . . . . . .. . . ... . .. . . .. ..... ",
+" . . . . ..... . . . . .. . . . . . . . . . . . . ",
+" ..... . . . . . . . .. . . . . . . . ......... . . . . . . ",
+" . . . . . . . . . . . . . . . . . . . . . . . ",
+" . . . . . . . . . . . ... . .. . . . . . . . . . . ... . . ",
+" .... .... .. .. ... ... ... .. . ... .. .. ... .. ... ... .. .. . ....... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......X oo .......X ... oo ... oo ... ",
+" .O+ @.#$ oo .O+ @.#$ % .. oo .. oo .. ",
+" .& o.% .& o.% $# .. .. .. ",
+" % *.O % *.O o. .. .. .. ",
+" #.+ ... ...=#.= ........ #.+ $-..-$ ... ... o.... ........ $-.%.. $-..- =#... ... ...@Oo $-..- $-.%.. ... ...=#- =.-$ ...%.-$ $-..- $-.%.. $;..-$ ...=#.= X.#: $-..- ",
+" -.- .. ..= .# -.- #.==.# .. .. .. #.==.. #.==.# #. *. .. ..&=o #.==.# #.==.. .. ..==.#.-.# ..+=.# #.==.# #.==.. O.$=.# ..= .# X.+:# #.==.# ",
+" +.# .. .. .. +.# .. .. .. .. .. .. .. .. .. O.;$ .. .. .. .. .. .. .. .. ..= .. .. .. .. .. .. .. @.. .. .. #. .. .. ",
+" O.* . .. .. .. ........ O.* . .. .. .. .. .. ........ .. .. ...... @o.#@ .. .. ...... .. .. .. .. .. .. .. .. ...... .. .. -.-.. .. .. .. ...... ",
+" %.; =o .. .. .. %.; =o .. .. .. .. .. .. .. #. -.# .. .. #. .. .. .. .. .. .. .. .. #. .. .. :.= .. .. .. #o #. ",
+" $#.@ *#; .. .. .. $#.@ *#; #.==.# #. =.. ..&; #.=*.. :.% =X .* .# .. .. :.% =X #.=*.. .. .. .. .. ..*=.# :.% =X #.=*.. #.==.. .. .. -#&+X :.% =X ",
+" X.......; .... .... ... X.......; $-..-$ =##%... =#O@ $-.=... :..- .&O#= ........ :..- $-.=... .... .... ... ... ..:.-$ :..- $-.=... $Xo&o.: .... ... ;.;@ :..- ",
+" .. ",
+" .. ",
+" .... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ",
+" > > ",
+" > $ > ",
+" > ..... .. ..... ... ..... .. ....... O .... > ",
+" > . . . . . . . . . . . . . . &o . . > ",
+" > . . . . . . . . . . . -% . > ",
+" > . . . . . . . . . . O@ . > ",
+" > . . . +......... . . . +......... . . . +......... . ... .. .. @# . > ",
+" > .... . .... . .... .. . . . . . *X ... > ",
+" > . . . . . . . . . . . .. . ;= . > ",
+" > . . . +......... . . . +......... . . . +......... . . .. . .$ . > ",
+" > . . . . . . . . . . . . . . &o . > ",
+" > . . . . . . . . . . . . . . . . . . :: . > ",
+" > .... .. .... .... .. ..... .... .. ... ....... .. . .. O+ .... > ",
+" > > ",
+" > > ",
+" > > ",
+" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/stripline.xpm b/pcb_calculator/bitmaps/stripline.xpm
new file mode 100644
index 0000000000..23aa383bda
--- /dev/null
+++ b/pcb_calculator/bitmaps/stripline.xpm
@@ -0,0 +1,225 @@
+/* XPM */
+const char *stripline_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 16 1",
+" c #FCFEFC",
+"= c #3635FC",
+"X c #040204",
+"o c #FCB23C",
+": c #7472FC",
+"$ c #545654",
+"O c #CCCECC",
+"- c #343234",
+"* c #1C1EFC",
+"; c #8C8AF0",
+". c #ACAAAC",
+"# c #0402FC",
+"& c #ACAAFC",
+"+ c #131213",
+"@ c #222122",
+"% c #5456FC",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" .XXoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.XX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.X ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.oX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.oooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.oooooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.oooooooX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.XX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.X ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooX.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.ooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXo.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooX.X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXX.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+@@+XXXXXXXXXXXXXXXXXXXXX+@@+XXXXXXXXXXXXXXXXXXXXXXXXXXX.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOXOOOOOOOOOOOOO#OOOOOOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX ",
+" XOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.$OOOOOOOOOOOOOOOOOOOOOOO.$OOXOOOOOOOOOOOOO#OOOOOOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOOOO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o.X. ",
+" XOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOXO.X.ooooooo.X. ",
+" XOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOOOOX.X.ooooooo.X. ",
+" XOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO&OOOOOOOOOOXX.ooooooo.X. ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.ooooooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooooooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoooooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXooo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXoo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXo.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooX.X. ",
+" XoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooXX. ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/tee_formula.xpm b/pcb_calculator/bitmaps/tee_formula.xpm
new file mode 100644
index 0000000000..62e6f7a14e
--- /dev/null
+++ b/pcb_calculator/bitmaps/tee_formula.xpm
@@ -0,0 +1,271 @@
+/* XPM */
+static const char *tee_formula_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"255 248 17 1",
+"X c Black",
+"> c #D9D9D9",
+"* c #E1E1E1",
+"= c #F0F0F0",
+" c #FFFFFF",
+"o c #E9E9E9",
+": c #BDBDBD",
+"O c #4D4D4D",
+"+ c #A7A7A7",
+"# c #7C7C7C",
+"& c #9A9A9A",
+"@ c #C7C7C7",
+". c #C0C0C0",
+"- c #8C8C8C",
+"; c #B2B2B2",
+"% c #D0D0D0",
+"$ c #686868",
+/* pixels */
+" ",
+" ",
+" .............................................................. ",
+" . . ",
+" . X . ",
+" . XX . ",
+" . X X . ",
+" . X X . ",
+" . XXX . ",
+" . X X . ",
+" . XXX XXX . ",
+" . . ",
+" . . ",
+" . XXXXXXXXXXXX . ",
+" . . ",
+" . XX XX . ",
+" . X X X X . ",
+" . X X X . ",
+" . XXXX X X XX X X X . X X oO X X X XXXXXX ",
+" . XX XXX XXX X X X X X . XX +X@ XX X X ",
+" . X X X X X X X X X . X X #X$ X X X X X X ",
+" . X X X X X XXXX XX . X X %@&X% X X X X X X ",
+" . X *XXXXXXXXX X X X . XXX XXX XXX X XXXX X XX #=*X- XXXXXXXXX XXX XXXXXXXX XXX X XX XX XX XXX XXXX X XX X XX X X XX XX X X X ",
+" . X XXXX X X X . X X X XX X XX X o& #X* X X X X X X XXX X X X X X X XX X X XXX X XX XXX X X XX XXXXX ",
+" . X X X X X . X X X X X X X +% %X+ XX X X XXXXX X X X X XX X X X X X X X X X X X X X ",
+" . X X *XXXXXXXXX X X X . X X X X X X X X OXXXXXX= XXXXXXXXX XX X X X X X X X X XX X X X X X X X X X X X X X X ",
+" . X X X X X . X X X X X X X X @; ;X+ X X X X X X X X X X X X X X X X X X X X X X X X ",
+" . X X X X X . XX XX X X X X X *O* =XX% X XX X X X X X X X X X XXX X XX X X X X X X X X X X X XXX X X ",
+" . XXXXXX XXX XX . X X XXX XX XXX XXX *XXX: *XXXX: XXX XX XX XX XXX XXX XXX XX X XXX XX XX XXX XX XXX XXX XXX XXX XXX XX X XXXXXXX ",
+" . . ",
+" . . ",
+" . . ",
+" .............................................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXX X X X X X X X ",
+" X X XX XX XX ",
+" X X X X X X ",
+" X X X X X ",
+" X X X XX XXXXXXXXX XX X XXX XXX X X XX XXX XX X X X XX X XX XX XX XXXX X X XX XX X XX XXX XX X XXX X XX XXX XXX ",
+" X XX XXX X X XX X X X X XX XXX X X X XX XX XXX X XXX X X X X XX XXX XX X XXX X X X X XX X X XXX X X X X X ",
+" X X X X X X XXXXX X X X XXXXX X X X X X X X X X X X X X X X X XXXXX X X XX X X X XXXXX ",
+" X X X X XXXXXXXXX X X X XX X X X X X X X X X X X X X X X X X X X X X X XX X X X X X ",
+" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ",
+" X X X X X X XXX X X X X X X X X X XXX X X X XX X X XXX X X X X X X XX X X X X XXX X XX X X X X X X ",
+" XXXXXXXX XXX XXX XXX XX X XXX XXX XXXXXX XXX XX X XXX XXX XXX X XX XX X XX XXX XXX XXX XXX X XX XXX XX X XXX XXXXX XXX XXX XXX ",
+" X X ",
+" X X ",
+" XXX XXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXXXXXX X X X X X ",
+" X X XX XX XX ",
+" X X X X X X X X ",
+" X X X X X X X ",
+" X XX XX XX XXXX XXXXXXXXX XX X XXX XXX X X XX XXX XX X XX XX XX XXXX X XX XX XX XXXX X X XX XX X XX XXX XX X XXX X XX XXX XXX ",
+" X X X X X X X XX X X X X XX XXX X X X XX X X X X X XXX X X X X XX XXX XX X XXX X X X X XX X X XXX X X X X X ",
+" X X X X X X X X XXXXX X X X XXXXX X X X X X X X X X X X X X X X X X X XXXXX X X XX X X X XXXXX ",
+" X X X X X X XXXXXXXXX X X X XX X X X X X X X X X X X X X X X X X X X X X X X X XX X X X X X ",
+" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ",
+" X X X X X XXX X X X XXX X X X X X X X X X XXX X X X XXX X X XX X X XXX X X X X X X XX X X X X XXX X XX X X X X X X ",
+" XXXXXXXX XX XX X XX XX X XXX XXX XXXXXX XXX XX X XX XX X XX X XX XX X XX XXX XXX XXX XXX X XX XXX XX X XXX XXXXX XXX XXX XXX ",
+" X X ",
+" X X ",
+" XXX XXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ................................................................................................................................................................ ",
+" . ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . ; . ",
+" . ; . ",
+" . *> . ",
+" . XXX := XXXXXXX XXXXXXX XXXX X . ",
+" . X X + X X X X X XX XXX . ",
+" . X X + X X X X X X X . ",
+" . X -* *@ X -* X X -* X X . ",
+" . X =; &*o; > :o X XXX XX XX =; &*o; X XXX XX X XXX =; &*o; X . ",
+" . X =+#&;$% @-o - X X X X X =+#&;$% X XX X X X X X =+#&;$% X XXXX . ",
+" . X %O$= >+ - X X XX X %O$= X X X X X X %O$= X X . ",
+" . X o$;;%#+ # o: X X XX X o$;;%#+ X X X X X X o$;;%#+ X X . ",
+" . X > -* > ;>@> X X X X X > -* > X X X X X XX X > -* > X X . ",
+" . XXXXX XXX X X ;o =&& X X X X X X X ;o X X X XX X XX X X X ;o X X . ",
+" . X X X X XXXXXX #- XXXXXXX XX X XX XXXXXXX XXX XXX XX XXX XXXXXX . ",
+" . X X X %+ . ",
+" . X X X . ",
+" . X X X *XXXXXXXXX . ",
+" . XXXX X . ",
+" . X X X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X *XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX . ",
+" . X X X . ",
+" . X X X X o% %o . ",
+" . XXXX XX XXXXX + + . ",
+" . o; XXXX X X ;= . ",
+" . :% XX XXX XXX %@ . ",
+" . -* X X X *& . ",
+" . $ X X X # . ",
+" . X X X X . ",
+" . X X XXXX X X . ",
+" . X X X *XXXXXXXXX X X . ",
+" . X X X X X . ",
+" . # X X X $ . ",
+" . -* X X X *- . ",
+" . @% XXXXXX XXX %: . ",
+" . =; ;o . ",
+" . + + . ",
+" . o> >o . ",
+" ................................................................................................................................................................ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ........................................................................................................................................................ ",
+" . . ",
+" . . ",
+" . XXXX X X . ",
+" . XX XXX o XXX . ",
+" . X X - X . ",
+" . X X - X . ",
+" . X - X . ",
+" . X XXXX - X . ",
+" . X X o----O---- X . ",
+" . X X - X . ",
+" . X X - X . ",
+" . XXXXX XX XXXXXXX X X - X XXXXX XXX . ",
+" . X X X X X X XXXXXX - XXX X X X X . ",
+" . X X X X X X X X X . ",
+" . X X X X X -* X X X . ",
+" . X X X *XXXXXXXXX X XXX XX X XXX =; &*o; X X X . ",
+" . XXXX XX X XX X X X X X =+#&;$% XXXX X . ",
+" . X X X X X X X X X %O$= *XXXXXXXXX X X X . ",
+" . X X X *XXXXXXXXX X X X X X X o$;;%#+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X X X . ",
+" . X X X X X X X X XX X > -* > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X X X . ",
+" . X X X X X X X XX X XX X X X ;o X X X X . ",
+" . XXXX XX XXX XXXXXXX XXX XXX XX XXX XXXX XX XXXXX . ",
+" . XXXX X X . ",
+" . XX XXX XXX . ",
+" . X X X . ",
+" . X X X . ",
+" . X X . ",
+" . X XXXX X . ",
+" . X X *XXXXXXXXX X . ",
+" . X X X . ",
+" . X X X . ",
+" . X X X . ",
+" . XXXXXX XXX . ",
+" . . ",
+" . . ",
+" . . ",
+" ........................................................................................................................................................ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............................................................................................................................................. ",
+" . . ",
+" . . ",
+" . XXXX X X . ",
+" . XX XXX o XXX . ",
+" . X X - X . ",
+" . X X - X . ",
+" . X - X . ",
+" . X XXXX - X . ",
+" . X X o----O---- X . ",
+" . X X - X . ",
+" . X X - X . ",
+" . XXXXX XX XXXXXXX X X - X XXXXX XXX . ",
+" . X X X X X X XXXXXX - XXX X X X X . ",
+" . X X X X X X X X . ",
+" . X X X X -* X X X . ",
+" . X X X *XXXXXXXXX X XXX XX XX =; &*o; X X X . ",
+" . XXXX X X X X X X =+#&;$% XXXX X . ",
+" . X X X X X XX X %O$= *XXXXXXXXX X X X . ",
+" . X X X *XXXXXXXXX X X XX X o$;;%#+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X X X . ",
+" . X X X X X X X X > -* > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X X X . ",
+" . X X X X X X X X X X ;o X X X X . ",
+" . XXXX XX XXXX XXXXXXX XX X XX XXXX XX XXXXX . ",
+" . XXXX X X . ",
+" . XX XXX XXX . ",
+" . X X X . ",
+" . X X X . ",
+" . X X . ",
+" . X XXXX X . ",
+" . X X *XXXXXXXXX X . ",
+" . X X X . ",
+" . X X X . ",
+" . X X X . ",
+" . XXXXXX XXX . ",
+" . . ",
+" . . ",
+" . . ",
+" .............................................................................................................................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/bitmaps/twistedpair.xpm b/pcb_calculator/bitmaps/twistedpair.xpm
new file mode 100644
index 0000000000..2e75415206
--- /dev/null
+++ b/pcb_calculator/bitmaps/twistedpair.xpm
@@ -0,0 +1,427 @@
+/* XPM */
+const char *twistedpair_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"203 203 218 2",
+"o c Black",
+"F. c #141312",
+"8X c #1E1E1F",
+",X c #BBAF9B",
+"5 c #464748",
+"; c #5A5A5A",
+"n. c #B69F7C",
+"d. c #CAAF82",
+"w. c #CAAC7B",
+"]. c #DB9A32",
+"' c #EAAF53",
+", c #C3C3C3",
+"7X c #303439",
+"(. c #D2D2D2",
+"s c #B4AEA4",
+"C c #303744",
+"h c #262626",
+"i c #F9B240",
+"[ c #6C7687",
+" c #FFFFFF",
+"U. c #585A5C",
+"y c #FEB33C",
+"XX c #443E34",
+"H c #6C6D6E",
+"2. c #F9AC33",
+"^ c #534A3B",
+"^. c #8C6A35",
+"B. c #6C6150",
+": c #ADADAD",
+"= c #3939FF",
+"*. c #BCBCBC",
+"K c #EDB04F",
+"B c #151413",
+"* c #1313FF",
+"k. c #565758",
+"D c #C39348",
+"g c #424141",
+"&. c #423B31",
+"9X c #797979",
+"6. c #9CA1A8",
+"] c #FFB734",
+"-. c #FFB735",
+"W c #FFB736",
+".X c #A88247",
+";X c #272A2F",
+"b. c #FFB434",
+"Z. c #FFB437",
+"} c #313234",
+"L c #FFB438",
+"%. c #FAB64C",
+"+ c #727272",
+"h. c #909398",
+";. c #7C7465",
+">X c #C9AD80",
+"p. c #4D5664",
+"-X c #2F2F2F",
+"w c #D8AD68",
+"r c #F8B03E",
+"G. c #C49448",
+"J. c #4D473D",
+"c. c #7A7A7A",
+"0. c #C7B08B",
+"+. c #756D62",
+"P. c #DD9C34",
+"`. c #ECAB43",
+"*X c #1E2024",
+"m. c #19191A",
+"! c #323333",
+":. c #282828",
+"7 c #373737",
+"e. c #846D48",
+"X c #555555",
+"3X c #C0AC8A",
+"6X c #919499",
+"5X c #A5A7A9",
+"4X c #CAAE82",
+"O c #CDCDCD",
+"4 c #4E5765",
+"~. c #303030",
+".. c #3A3E46",
+"rX c #FAFAFA",
+"oX c #535860",
+"p c #F9B13E",
+"t c #F9B13F",
+"C. c #444343",
+"/ c #FEB238",
+"v. c #94989D",
+"T c #6C6C6D",
+"X. c #8A8A8A",
+"J c #534630",
+"5. c #999999",
+"<. c #FFBF36",
+"wX c #1D1DFF",
+"A c #FFBF38",
+"l c #EDB55D",
+"y. c #9B7231",
+"l. c #FFBC34",
+"E c #FFBC35",
+"2X c #F2AA37",
+"u. c #F2AA38",
+"2 c #856E49",
+"6 c #747474",
+"8 c #838382",
+"=. c #A1A1A1",
+"#X c #FFB634",
+"[. c #B0B0AF",
+"N c #8D8880",
+"!. c #B0B0B0",
+"A. c #AD884C",
+"3. c #FFB635",
+"S c #FFB93F",
+"T. c #E6A848",
+"N. c #FFB639",
+"m c #FFB331",
+"H. c #F5B144",
+"z. c #313439",
+"g. c #FFB332",
+"_ c #36383A",
+"). c #36383B",
+"q. c #4A515D",
+"Y c #404348",
+"P c #FFB336",
+":X c #636871",
+">. c #595A5C",
+"u c #FFB33A",
+"%X c #B59F7C",
+"{. c #7C7C7C",
+"< c #8B8B8B",
+"|. c #726B5F",
+"@X c #7C7365",
+"r. c #E9AC4A",
+"$ c #7272FF",
+"a c #EEAD46",
+"9 c #2F3134",
+"@ c #393939",
+"1 c #484848",
+"4. c #66696E",
+"- c #2626FF",
+") c #8B6A35",
+"% c #0000FF",
+"=X c #B1B1B1",
+"}. c #373C43",
+" . c #ECAA43",
+"i. c #50565F",
+",. c #B1A89B",
+"O. c #FBB648",
+"K. c #323233",
+"V c #4B4C4E",
+"7. c #505050",
+"j. c #6E6E6E",
+"0X c #9B9B9B",
+"R. c #1C2533",
+"| c #9D773A",
+"R c #736959",
+". c #AAAAAA",
+"3 c #9D7433",
+"` c #353C48",
+"j c #353638",
+"U c #96856B",
+"f c #494C51",
+"e c #F9B03C",
+"8. c #F9B03E",
+"{ c #6C6B6B",
+"~ c #8F9091",
+"d c #94979D",
+"q c #A8AAAD",
+"> c #5555FF",
+"( c #FFBE39",
+"I. c #2E323A",
+"tX c #FDFDFD",
+"@. c #5B5C5E",
+"# c #39398D",
+"s. c #C1AC8A",
+"/. c #FFB834",
+"qX c #7E7E7E",
+"f. c #A6A7AA",
+"Z c #9E783B",
+"z c #FFB533",
+" O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O & O & % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O . X X X o o o o o o o X X X . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O O O . X X X o o o o o o o X X X . O O O O O O O O O O O O O O O O O % - % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O X X o o X X X X X O O O X X X X X o o X X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . O O X X o o X X X X X O O O X X X X X o o X X O O O O O O O O O O O O O = % % - O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . . X o o X X O O O O O O O O O O O O O O O X X o o X . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . . X o o X X O O O O O O O O O O O O O O O X X o o X . O O O O O O O O O & % % % % & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o + X o X . O O O O O O O O O O O O O O O O O O O O O . X o X . O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o + X o X . O O O O O O O O O O O O O O O O O O O O O . X o X . O O O O O O O * % * = O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o @ o X . O O O O O O O O O O O O O O O O O O O O O O O O O . X o X O O O O O O O O O O O O O O O O O O O O O O O O O O . o @ o X . O O O O O O O O O O O O O O O O O O O O O O O O O . X o X O O O O O $ % * & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o o o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o o . O O O O O O O O O O O O O O O O O O O O O O O . o o o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o o . O O O % $ O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O O O . o o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o . O & O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o X O O O O O O O O O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X X . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O O O X X . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o . O O O O O O O O O O O O O O O O O O O , o o o O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O , o o o O O O O O O O O O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O O O O < 1 o o o o 2 3 4 o o o 5 6 O O O O O O O O O O O O O O O O X o . O O O O O O O O O O . o . O O O O O O O O O O O O O O O < 1 o o o o 2 3 4 o o o 5 6 O O O O O O O O O O O O O O O O X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" o X O O O O O O O O O O O O O 7 8 9 0 q w e r t y u i p t a s d f g O O O O O O O O O O O O O O O X o O O O O O O O O O O o X O O O O O O O O O O O O O 7 8 9 0 q w e r t y u i p t a s d f g O O O O O O O O O O O O O O O X o O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o O O O O O O O O O O O O O h j k l z x c v v v v v v v v b n m M N B O O O O O O O O O O O O O O O o X O O O O O O O O X o O O O O O O O O O O O O O h j k l z x c v v v v v v v v b n m M N B O O O O O O O O O O O O O O O o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O O V C Z A c v v v v v v v v v v v v v v b S D F G O O O O O O O O O O O O O X o O O O O O O O . o . O O O O O O O O O O O O V C Z A c v v v v v v v v v v v v v v b S D F G O O O O O O O O O O O O O X o O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O O O H J K L v v v v v v v v v v v v v v v v v v P I U Y O O O O O O O O O O O O O o X O O O O O O X X O O O O O O O O O O O O H J K L v v v v v v v v v v v v v v v v v v P I U Y O O O O O O O O O O O O O o X O O O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" . o . O O O O O O O O O O O T R E v v v v v v v v v v v v v v v v v v v v v v W Q ! O O O O O O O O O O O O . o . O O O O . o . O O O O O O O O O O O T R E v v v v v v v v v v v v v v v v v v v v v v W Q ! O O O O O O O O O O O O . o . O O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O O ~ ^ E / v v v v v v v v v v v v v v v v v v v v v v v ( ) _ O O O O O O O O O O O O X X O O O O X X O O O O O O O O O O O ~ ^ E / v v v v v v v v v v v v v v v v v v v v v v v ( ) _ O O O O O O O O O O O O X X O O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" o . O O O O O O O O O O O ` ' b v v v v v v v v v v v v v v v v v v v v v v v v v ] [ { O O O O O O O O O O O X o O O O O o . O O O O O O O O O O O ` ' b v v v v v v v v v v v v v v v v v v v v v v v v v ] [ { O O O O O O O O O O O X o O O O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X o O O O O O O O O O O O } | L v v v v v v v v v v v v v v v v v v v v v v v v v v v ...O O O O O O O O O O O O o . O O X o O O O O O O O O O O O } | L v v v v v v v v v v v v v v v v v v v v v v v v v v v ...O O O O O O O O O O O O o . O O O O O O O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O X.o.A v v v v v v v v v v v v v v v v v v v v v v v v v v v v O.+.@.O O O O O O O O O O O X X O O X X O O O O O O O O O O X.o.A v v v v v v v v v v v v v v v v v v v v v v v v v v v v O.+.@.O O O O O O O O O O O X X O O O O O O O O O O O O O O O O O O O O . o . ",
+" o O O O O O O O O O O O #.l c v v v v v v v v v v v v v v v v v v v v v v v v v v v v $.%.&.*.O O O O O O O O O O X o O O o O O O O O O O O O O O #.l c v v v v v v v v v v v v v v v v v v v v v v v v v v v v $.%.&.*.O O O O O O O O O O X o O O O O O O O O O O O O O O O O O O O . o . ",
+" . o O O O O O O O O O O =.0 z v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v -.;.:.O O O O O O O O O O O o . . o O O O O O O O O O O =.0 z v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v -.;.:.O O O O O O O O O O O o . O O O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O >.,.n v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v / <.1.O O O O O O O O O O O o X X X O O O O O O O O O O >.,.n v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v / <.1.O O O O O O O O O O O o X O O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O o 2.v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 3.4.5.O O O O O O O O O O X X X X O O O O O O O O O O o 2.v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 3.4.5.O O O O O O O O O O X X O O O O O O O O O O O O O O O . o . ",
+" X X O O O O O O O O O O o r v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v x 6.7.O O O O O O O O O O X X X X O O O O O O O O O O o r v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v x 6.7.O O O O O O O O O O X X O O O O O O O O O O O O O O . o . ",
+" o X O O O O O O O O O O o 8.v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.0.o O O O O O O O O O O X o o X O O O O O O O O O O o 8.v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.0.o O O O O O O O O O O X o O O O O O O O O O O O O O . o . ",
+" o X O O O O O O O O O o q.t v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.w.o O O O O O O O O O O X o o X O O O O O O O O O o q.t v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.w.o O O O O O O O O O O X o O O O O O O O O O O O O . o . ",
+" o O O O O O O O O O O o e.y v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v b r.t.o O O O O O O O O O . o o O O O O O O O O O O o e.y v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v b r.t.o O O O O O O O O O . o O O O O O O O O O O O . o . ",
+" o O O O O O O O O O O o y.u v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v u.i.o O O O O O O O O O O o o O O O O O O O O O O o y.u v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v u.i.o O O O O O O O O O O o O O O O O O O O O O . o . ",
+" o O O O O O O O O O O o p.i v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v a.s.o O O O O O O O O O O X o o O O O O O O O O O O o p.i v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v a.s.o O O O O O O O O O O X o O O O O O O O O O . o . ",
+" o X O O O O O O O O O O o p v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.d.o O O O O O O O O O O X o o X O O O O O O O O O O o p v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v 9.d.o O O O O O O O O O O X o O O O O O O O O . o . ",
+" o X O O O O O O O O O O o t v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v x f.o O O O O O O O O O O X o o X O O O O O O O O O O o t v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v x f.o O O O O O O O O O O X o O O O O O O O . o . ",
+" X X O O O O O O O O O O o a b v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v g.h.j.O O O O O O O O O O X X X X O O O O O O O O O O o a b v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v g.h.j.O O O O O O O O O O X X O O O O O O . o . ",
+" X X O O O O O O O O O O k.s n v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v l.z.x.O O O O O O O O O O X X X X O O O O O O O O O O k.s n v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v l.z.x.O O O O O O O O O O X X O O O O O . o . ",
+" X X O O O O O O O O O O c.v.m v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v b.n.m.O O O O O O O O O O O o X X X O O O O O O O O O > c.v.m v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v b.n.m.O > O O O O O O O O O o X O O O O . o . ",
+" . o O O O O O O O O O O O M.M b v v v v v v v v v v v v v v v v v v v v v v v v v v v v v N.B.V.O O O O O O O O O O O o . O o O O O O O O O O O > O M.M b v v v v v v v v v v v v v v v v v v v v v v v v v v v v v N.B.V.O > O O O O O O O O O o . O O O . o . ",
+" o X O O O O O O O O O O C.N S v v v v v v v v v v v v v v v v v v v v v v v v v v v v Z.A.S.D.O O O O O O O O O O X o O O o X O O O O O O O O > O C.N S v v v v v v v v v v v v v v v v v v v v v v v v v v v v Z.A.S.D.O > O O O O O O O O X o O O O . o . ",
+" X X O O O O O O O O O O O F.G.P v v v v v v v v v v v v v v v v v v v v v v v v v v v H.J.K.O O O O O O O O O O O X X O O X X O O O O O O O O O O O F.G.P v v v v v v v v v v v v v v v v v v v v v v v v v v v H.J.K.O O O O O O O O O O O X X O O . o . ",
+" X o O O O O O O O O O O O O L.I v v v v v v v v v v v v v v v v v v v v v v v v v v v P.I.O O O O O O O O O O O O o . O . o o O O O O O O O O O O O O L.I v v v v v v v v v v v v v v v v v v v v v v v v v v v P.I.O O O O O O O O O O O O o . O . o . ",
+" o . O O O O O O O O O O O U.U W v v v v v v v v v v v v v v v v v v v v v v v v Y.T.R.O O O O O O O O O O O O X o O . o . o . O O O O O O O O O O O U.U W v v v v v v v v v v v v v v v v v v v v v v v v Y.T.R.O O O O O O O O O O O O X o . o . ",
+" X X O O O O O O O O O O O O E.Q ( v v v v v v v v v v v v v v v v v v v v v v Y.W.Q.!.O O O O O O O O O O O O X X . o . X X O O O O O O O O O O O O E.Q ( v v v v v v v v v v v v v v v v v v v v v v Y.W.Q.!.O O O O O O O O O O O O X X . o . ",
+" . o . O O O O O O O O O O O O ~.^./.v v v v v v v v v v v v v v v v v v v v v T.Q.(.O O O O O O O O O O O O X o + o . . o . O O O O O O > O O O O O ~.^./.v v v v v v v v v v v v v v v v v v v v v T.Q.(.O O O O O > O O O O O O X o + o . ",
+" > X X O O O O O O O O O O O O O )._.`.O.$.v v v v v v v v v v v v v v v Z.'.].R.[.O O O O O O O O O O O O O o @ o . X X O O O O O O > O O O O O O )._.`.O.$.v v v v v v v v v v v v v v v Z.'.].R.[.O O O O O O > O O O O O O o @ o . ",
+" > . o X O O O O O O O O O O O O O {.}.|. X-./ v v v v v v v v v v v b.N..XXXoXO O O O O O O O O O O O O O X o o . . o X O O O O O > O O O O O O O {.}.|. X-./ v v v v v v v v v v v b.N..XXXoXO O O O O O O O > O O O O O X o o . ",
+" > X o O O O O O O O O O O O O O O O OX+X@X<.#X9.a.$Xb v a.9.x g.l.%X&X*XO O O O O O O O O O O O O O O O o o . X o O O O O O > O O O O O O O O O OX+X@X<.#X9.a.$Xb v a.9.x g.l.%X&X*XO O O O O O O O O O > O O O O O o o . ",
+" > o X O O O O O O O O O O O O O O O =X-X;X:X>X,X o X O O O O O O O O O O O O O O O =X-X;X:X>X,X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O > . o X ",
+" > X o . O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O . o X > X o > O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O > o X ",
+" > X o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o X > X > X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X > X ",
+" > . o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o . > > o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o > ",
+" > . o o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o o . > . o o X O O O O O O O O O O O O O O O O O O O O O O O O O O O O O X o o . ",
+" X o o . O O O O O O O O O O O O O O O O O O O O O O O O O X o o X X o o . O O O O O O O O O O O O O O O O O O O O O O O O O X o o X ",
+" X o X X O O O O O O O O O O O O O O O O O O O O O X X o X X o X X O O O O O O O O O O O O O O O O O O O O O X X o X ",
+" . X o o X X O O O O O O O O O O O O O O O X X o o X . . X o o X X O O O O O O O O O O O O O O O X X o o X . ",
+" . X o o X X X X X . O X X X X X o o o X . > . X o o X X X X X . O X X X X X o o o X . > ",
+" > . X X X o o o o o o o X X X . > > . X X X o o o o o o o X X X . > ",
+" > > > > ",
+" > > > > ",
+" > > ",
+" ",
+" & = wX= = wX= & ",
+" & = wXwX% % % wX wX% % % wXwX= & ",
+" & * eX% % % % eX> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > eX% % % % eX* & > > ",
+" > & = wX= = wX= & > > > ",
+" > % > > > ",
+" > % > > > ",
+" > % > ",
+" % & = wX= = wX= & rX ",
+" > % % % % > % & = wXwX% % % wX wX% % % wXwX= & ",
+" % % & > % % & * eX% % % % eX> > > > > > > > > > > > > > > > > > > > > eX% % % % eX* & ",
+" > % & > % > & = wX= = wX= & > ",
+" % % % > > > ",
+" % % % % > > tX ",
+" % % % % > > ",
+" > % > > % > % % % & % % > % % % % ",
+" % % & > % % > % & % & % % % % ",
+" > % % % > & > % & % % % % % ",
+" % % % % % % ",
+" % % % % % > % % % % > % ",
+" % & & % % % % % % & > % % ",
+" > % & % & % > > % % > % & > % ",
+" > % % % & & % % % & % % % % % % % % ",
+" % % % & ",
+" % % % ",
+" > % > > % % % & % % % > ",
+" % % & > % % % % % & % ",
+" > % % % > & > % % % ",
+" % % % ",
+" % % % ",
+" % % % ",
+" % % % ",
+" % % % ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/pcb_calculator/board_classes_values.cpp b/pcb_calculator/board_classes_values.cpp
new file mode 100644
index 0000000000..646bd83646
--- /dev/null
+++ b/pcb_calculator/board_classes_values.cpp
@@ -0,0 +1,139 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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
+#include
+#include
+
+#include "pcb_calculator_frame_base.h"
+#include "pcb_calculator.h"
+#include "UnitSelector.h"
+#include "units_scales.h"
+
+// A helper class to handle min values
+// Values are in meters.
+// Note : use -1.0 when a vaule is irrelevant in a class
+class BOARD_MIN_SIZE_VALUES
+{
+public:
+ int m_Class; // Class Id
+ double m_Lines; // min copper lines width
+ double m_Clearance; // min dist between copper lines
+ double m_ViaDiamDiff; // Min value for diff between Via diameter
+ // and its hole diameter
+ double m_PadDiamDiffPlated; // Min value for diff between Pad diameter
+ // and its hole diameter (plated)
+ double m_PadDiamDiffNotPlated; // Min value for diff between Pad diameter
+ // and its hole diameter (not plated)
+public:
+ BOARD_MIN_SIZE_VALUES( int aClass, double aLines,
+ double aClearance, double aViaDiffPlated,
+ double aPadDiffPlated , double aPadDiffNotPlated )
+ {
+ m_Class = aClass;
+ m_Lines = aLines;
+ m_Clearance = aClearance;
+ m_ViaDiamDiff = aViaDiffPlated;
+ m_PadDiamDiffPlated = aPadDiffPlated;
+ m_PadDiamDiffNotPlated = aPadDiffNotPlated;
+ }
+};
+
+#define BRDCLASS_COUNT 6
+static BOARD_MIN_SIZE_VALUES clist[BRDCLASS_COUNT] =
+{
+ // class 1
+ BOARD_MIN_SIZE_VALUES(1, 0.80*UNIT_MM, 0.68*UNIT_MM,
+ -1.0,
+ 1.19*UNIT_MM, 1.57*UNIT_MM ),
+ // class 2
+ BOARD_MIN_SIZE_VALUES(1, 0.50*UNIT_MM, 0.50*UNIT_MM,
+ -1.0,
+ 0.78*UNIT_MM, 1.13*UNIT_MM ),
+ // class 3
+ BOARD_MIN_SIZE_VALUES(1, 0.31*UNIT_MM, 0.31*UNIT_MM,
+ 0.45*UNIT_MM,
+ 0.6*UNIT_MM, 0.90*UNIT_MM ),
+ // class 4
+ BOARD_MIN_SIZE_VALUES(1, 0.21*UNIT_MM, 0.21*UNIT_MM,
+ 0.34*UNIT_MM,
+ 0.49*UNIT_MM, -1.0 ),
+ // class 5
+ BOARD_MIN_SIZE_VALUES(1, 0.15*UNIT_MM, 0.15*UNIT_MM,
+ 0.24*UNIT_MM,
+ 0.39*UNIT_MM, -1.0 ),
+ // class 6
+ BOARD_MIN_SIZE_VALUES(1, 0.12*UNIT_MM, 0.12*UNIT_MM,
+ 0.20*UNIT_MM,
+ 0.35*UNIT_MM, -1.0 )
+};
+
+
+void PCB_CALCULATOR_FRAME::OnBoardClassesUnitsSelection( wxCommandEvent& event )
+{
+ BoardClassesUpdateData( m_BoardClassesUnitsSelector->GetUnitScale() );
+}
+
+void PCB_CALCULATOR_FRAME::BoardClassesUpdateData( double aUnitScale )
+{
+ wxString txt;
+ for( int ii = 0; ii < BRDCLASS_COUNT; ii ++ )
+ {
+ // Display min tracks width
+ if( clist[ii].m_Lines > -1.0 )
+ txt.Printf( wxT("%f"), clist[ii].m_Lines / aUnitScale);
+ else
+ txt = wxT("--");
+ m_gridClassesValuesDisplay->SetCellValue(0, ii, txt );
+
+ // Display min clearance
+ if( clist[ii].m_Clearance > -1.0 )
+ txt.Printf( wxT("%f"), clist[ii].m_Clearance / aUnitScale);
+ else
+ txt = wxT("--");
+ m_gridClassesValuesDisplay->SetCellValue(1, ii, txt );
+
+ // Display min Via diam diff
+ if( clist[ii].m_ViaDiamDiff > -1.0 )
+ txt.Printf( wxT("%f"), clist[ii].m_ViaDiamDiff / aUnitScale);
+ else
+ txt = wxT("--");
+ m_gridClassesValuesDisplay->SetCellValue(2, ii, txt );
+
+ // Display min Pad diam diff (plated)
+ if( clist[ii].m_PadDiamDiffPlated > -1.0 )
+ txt.Printf( wxT("%f"), clist[ii].m_PadDiamDiffPlated / aUnitScale);
+ else
+ txt = wxT("--");
+ m_gridClassesValuesDisplay->SetCellValue(3, ii, txt );
+
+ // Display min Pad diam diff (non plated)
+ if( clist[ii].m_PadDiamDiffNotPlated > -1.0 )
+ txt.Printf( wxT("%f"), clist[ii].m_PadDiamDiffNotPlated / aUnitScale);
+ else
+ txt = wxT("--");
+ m_gridClassesValuesDisplay->SetCellValue(4, ii, txt );
+ }
+}
+
diff --git a/pcb_calculator/colorcode.cpp b/pcb_calculator/colorcode.cpp
new file mode 100644
index 0000000000..76d3ffcc86
--- /dev/null
+++ b/pcb_calculator/colorcode.cpp
@@ -0,0 +1,64 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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
+#include
+#include
+
+#include "pcb_calculator_frame_base.h"
+#include "pcb_calculator.h"
+
+void PCB_CALCULATOR_FRAME::OnToleranceSelection( wxCommandEvent& event )
+{
+ ToleranceSelection( event.GetSelection() );
+}
+
+void PCB_CALCULATOR_FRAME::ToleranceSelection( int aSelection )
+{
+ /* For tolerance = 5 or 10 %, there are 3 ring for the value
+ * but for tolerance < 5 %, there are 4 ring
+ */
+ bool enable = true;
+ switch( aSelection )
+ {
+ case 0:
+ case 1:
+ enable = false;
+ break;
+
+ default:
+ break;
+ }
+ bool oldstate = m_Band4Label->IsShown();
+ if( oldstate != enable )
+ {
+ m_Band4bitmap->Show(enable);
+ m_Band4Label->Show(enable);
+ // m_Band4Label visibility has changed:
+ // The new size must be taken in account
+ m_panelColorCode->GetSizer()->Layout();
+ m_panelColorCode->Refresh();
+ }
+}
+
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
new file mode 100644
index 0000000000..1106195796
--- /dev/null
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
@@ -0,0 +1,834 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 30 2011)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "UnitSelector.h"
+
+#include "pcb_calculator_frame_base.h"
+
+#include "../bitmaps/arrow_bottom.xpm"
+#include "../bitmaps/arrow_top.xpm"
+#include "../bitmaps/color_code_multiplier.xpm"
+#include "../bitmaps/color_code_tolerance.xpm"
+#include "../bitmaps/color_code_value.xpm"
+#include "../bitmaps/color_code_value_and_name.xpm"
+#include "../bitmaps/regul.xpm"
+
+///////////////////////////////////////////////////////////////////////////
+
+PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ m_menubar = new wxMenuBar( 0 );
+ this->SetMenuBar( m_menubar );
+
+ m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
+ wxBoxSizer* bmainFrameSizer;
+ bmainFrameSizer = new wxBoxSizer( wxVERTICAL );
+
+ m_Notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelRegulators = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizerMainReg;
+ bSizerMainReg = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerBitmapReg;
+ bSizerBitmapReg = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizerBitmapReg->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bitmapRegul = new wxStaticBitmap( m_panelRegulators, wxID_ANY, wxBitmap( regul_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerBitmapReg->Add( m_bitmapRegul, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_RegulFormula = new wxStaticText( m_panelRegulators, wxID_ANY, _("Vout = Vref * (R1 + R2) / R2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_RegulFormula->Wrap( -1 );
+ m_RegulFormula->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerBitmapReg->Add( m_RegulFormula, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerBitmapReg->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizerMainReg->Add( bSizerBitmapReg, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerRegulRight;
+ bSizerRegulRight = new wxBoxSizer( wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerRegParams;
+ fgSizerRegParams = new wxFlexGridSizer( 2, 4, 0, 0 );
+ fgSizerRegParams->AddGrowableCol( 2 );
+ fgSizerRegParams->SetFlexibleDirection( wxBOTH );
+ fgSizerRegParams->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_rbRegulR1 = new wxRadioButton( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_rbRegulR1->SetValue( true );
+ fgSizerRegParams->Add( m_rbRegulR1, 0, wxALL, 5 );
+
+ m_labelRegultR1 = new wxStaticText( m_panelRegulators, wxID_ANY, _("R1"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_labelRegultR1->Wrap( -1 );
+ fgSizerRegParams->Add( m_labelRegultR1, 0, wxALL, 5 );
+
+ m_RegulR1Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_RegulR1Value, 0, wxALL|wxEXPAND, 5 );
+
+ m_UnitRegultR11 = new wxStaticText( m_panelRegulators, wxID_ANY, _("KOhm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_UnitRegultR11->Wrap( -1 );
+ fgSizerRegParams->Add( m_UnitRegultR11, 0, wxALL, 5 );
+
+ m_rbRegulR2 = new wxRadioButton( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_rbRegulR2, 0, wxALL, 5 );
+
+ m_labelRegultR2 = new wxStaticText( m_panelRegulators, wxID_ANY, _("R2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_labelRegultR2->Wrap( -1 );
+ fgSizerRegParams->Add( m_labelRegultR2, 0, wxALL, 5 );
+
+ m_RegulR2Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_RegulR2Value, 0, wxALL|wxEXPAND, 5 );
+
+ m_UnitRegultR1 = new wxStaticText( m_panelRegulators, wxID_ANY, _("KOhm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_UnitRegultR1->Wrap( -1 );
+ fgSizerRegParams->Add( m_UnitRegultR1, 0, wxALL, 5 );
+
+
+ fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_lableVRef = new wxStaticText( m_panelRegulators, wxID_ANY, _("Vref"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_lableVRef->Wrap( -1 );
+ fgSizerRegParams->Add( m_lableVRef, 0, wxALL, 5 );
+
+ m_RegulVrefValue = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_RegulVrefValue, 0, wxALL|wxEXPAND, 5 );
+
+ m_unitsVref = new wxStaticText( m_panelRegulators, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_unitsVref->Wrap( -1 );
+ fgSizerRegParams->Add( m_unitsVref, 0, wxALL, 5 );
+
+ m_rbRegulVout = new wxRadioButton( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_rbRegulVout, 0, wxALL, 5 );
+
+ m_labelVout = new wxStaticText( m_panelRegulators, wxID_ANY, _("Vout"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_labelVout->Wrap( -1 );
+ fgSizerRegParams->Add( m_labelVout, 0, wxALL, 5 );
+
+ m_RegulVoutValue = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRegParams->Add( m_RegulVoutValue, 0, wxALL|wxEXPAND, 5 );
+
+ m_unitsVout = new wxStaticText( m_panelRegulators, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_unitsVout->Wrap( -1 );
+ fgSizerRegParams->Add( m_unitsVout, 0, wxALL, 5 );
+
+ bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND, 5 );
+
+ m_buttonCalculate = new wxButton( m_panelRegulators, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerRegulRight->Add( m_buttonCalculate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_RegulMessage = new wxStaticText( m_panelRegulators, wxID_ANY, _("Message"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_RegulMessage->Wrap( -1 );
+ bSizerRegulRight->Add( m_RegulMessage, 0, wxALL, 5 );
+
+ bSizerMainReg->Add( bSizerRegulRight, 1, wxEXPAND, 5 );
+
+ m_panelRegulators->SetSizer( bSizerMainReg );
+ m_panelRegulators->Layout();
+ bSizerMainReg->Fit( m_panelRegulators );
+ m_Notebook->AddPage( m_panelRegulators, _("Regulators"), false );
+ m_panelTransline = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizeTransline;
+ bSizeTransline = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bLeftSizer;
+ bLeftSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxString m_TranslineSelectionChoices[] = { _("Microstrip Line"), _("Coplanar wave guide"), _("Grounded Coplanar wave guide"), _("Rectangular Waveguide"), _("Coaxial Line"), _("Coupled Microstrip Line"), _("Stripline"), _("Twisted Pair") };
+ int m_TranslineSelectionNChoices = sizeof( m_TranslineSelectionChoices ) / sizeof( wxString );
+ m_TranslineSelection = new wxRadioBox( m_panelTransline, wxID_ANY, _("Transmission Line Type:"), wxDefaultPosition, wxDefaultSize, m_TranslineSelectionNChoices, m_TranslineSelectionChoices, 1, wxRA_SPECIFY_COLS );
+ m_TranslineSelection->SetSelection( 0 );
+ bLeftSizer->Add( m_TranslineSelection, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_panelDisplayshape = new wxPanel( m_panelTransline, wxID_ANY, wxDefaultPosition, wxSize( 205,205 ), wxTAB_TRAVERSAL );
+ bLeftSizer->Add( m_panelDisplayshape, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizeTransline->Add( bLeftSizer, 0, wxEXPAND, 5 );
+
+ m_staticline1 = new wxStaticLine( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizeTransline->Add( m_staticline1, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bMiddleSizer;
+ bMiddleSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSubstrateBoxSizer;
+ sbSubstrateBoxSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Substrate Parameters") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerSubstPrms;
+ fgSizerSubstPrms = new wxFlexGridSizer( 9, 3, 0, 0 );
+ fgSizerSubstPrms->AddGrowableCol( 1 );
+ fgSizerSubstPrms->SetFlexibleDirection( wxBOTH );
+ fgSizerSubstPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_EpsilonR_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Er"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_EpsilonR_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_EpsilonR_label, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Value_EpsilonR = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Value_EpsilonR, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_button_EpsilonR = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+ fgSizerSubstPrms->Add( m_button_EpsilonR, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_TanD_label = new wxStaticText( m_panelTransline, wxID_ANY, _("TanD"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_TanD_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_TanD_label, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Value_TanD = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Value_TanD, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_button_TanD = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+ fgSizerSubstPrms->Add( m_button_TanD, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Rho_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Rho"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Rho_label->Wrap( -1 );
+ m_Rho_label->SetToolTip( _("Specific resistance in ohms * meters") );
+
+ fgSizerSubstPrms->Add( m_Rho_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Value_Rho = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Value_Rho, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button_Rho = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+ fgSizerSubstPrms->Add( m_button_Rho, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_substrate_prm4_label = new wxStaticText( m_panelTransline, wxID_ANY, _("H"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm4_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm4_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Substrate_prm4_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm4_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm4_choiceUnitChoices;
+ m_SubsPrm4_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm4_choiceUnitChoices, 0 );
+ m_SubsPrm4_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm4_choiceUnit, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_substrate_prm5_label = new wxStaticText( m_panelTransline, wxID_ANY, _("H_t"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm5_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm5_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Substrate_prm5_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm5_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm5_choiceUnitChoices;
+ m_SubsPrm5_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm5_choiceUnitChoices, 0 );
+ m_SubsPrm5_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm5_choiceUnit, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_substrate_prm6_label = new wxStaticText( m_panelTransline, wxID_ANY, _("T"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm6_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm6_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Substrate_prm6_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm6_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm6_choiceUnitChoices;
+ m_SubsPrm6_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm6_choiceUnitChoices, 0 );
+ m_SubsPrm6_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm6_choiceUnit, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_substrate_prm7_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Rough"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm7_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm7_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
+
+ m_Substrate_prm7_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm7_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm7_choiceUnitChoices;
+ m_SubsPrm7_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm7_choiceUnitChoices, 0 );
+ m_SubsPrm7_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm7_choiceUnit, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_substrate_prm8_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Mur"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm8_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm8_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
+
+ m_Substrate_prm8_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm8_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm8_choiceUnitChoices;
+ m_SubsPrm8_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm8_choiceUnitChoices, 0 );
+ m_SubsPrm8_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm8_choiceUnit, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_substrate_prm9_label = new wxStaticText( m_panelTransline, wxID_ANY, _("MurC"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_substrate_prm9_label->Wrap( -1 );
+ fgSizerSubstPrms->Add( m_substrate_prm9_label, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Substrate_prm9_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerSubstPrms->Add( m_Substrate_prm9_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_SubsPrm9_choiceUnitChoices;
+ m_SubsPrm9_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_SubsPrm9_choiceUnitChoices, 0 );
+ m_SubsPrm9_choiceUnit->SetSelection( 0 );
+ fgSizerSubstPrms->Add( m_SubsPrm9_choiceUnit, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ sbSubstrateBoxSizer->Add( fgSizerSubstPrms, 1, wxEXPAND, 5 );
+
+ bMiddleSizer->Add( sbSubstrateBoxSizer, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ wxStaticBoxSizer* sbCmpPrmsSizer;
+ sbCmpPrmsSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Component Parameters:") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizeCmpPrms;
+ fgSizeCmpPrms = new wxFlexGridSizer( 1, 3, 0, 0 );
+ fgSizeCmpPrms->AddGrowableCol( 1 );
+ fgSizeCmpPrms->SetFlexibleDirection( wxBOTH );
+ fgSizeCmpPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_Frequency_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Frequency"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Frequency_label->Wrap( -1 );
+ fgSizeCmpPrms->Add( m_Frequency_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Value_Frequency_Ctrl = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizeCmpPrms->Add( m_Value_Frequency_Ctrl, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnit_FrequencyChoices;
+ m_choiceUnit_Frequency = new UNIT_SELECTOR_FREQUENCY( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_FrequencyChoices, 0 );
+ m_choiceUnit_Frequency->SetSelection( 0 );
+ fgSizeCmpPrms->Add( m_choiceUnit_Frequency, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ sbCmpPrmsSizer->Add( fgSizeCmpPrms, 0, wxEXPAND, 5 );
+
+ bMiddleSizer->Add( sbCmpPrmsSizer, 0, wxEXPAND|wxTOP, 5 );
+
+ bSizeTransline->Add( bMiddleSizer, 1, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* bRightSizer;
+ bRightSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* btranslineRightSizer;
+ btranslineRightSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Physical Parameters") ), wxVERTICAL );
+
+ wxBoxSizer* sbRightBoxizer;
+ sbRightBoxizer = new wxBoxSizer( wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerPhysPrms;
+ fgSizerPhysPrms = new wxFlexGridSizer( 4, 4, 0, 0 );
+ fgSizerPhysPrms->AddGrowableCol( 1 );
+ fgSizerPhysPrms->SetFlexibleDirection( wxBOTH );
+ fgSizerPhysPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_phys_prm1_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Prm1"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_phys_prm1_label->Wrap( -1 );
+ fgSizerPhysPrms->Add( m_phys_prm1_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Phys_prm1_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerPhysPrms->Add( m_Phys_prm1_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnit_Param1Choices;
+ m_choiceUnit_Param1 = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_Param1Choices, 0 );
+ m_choiceUnit_Param1->SetSelection( 0 );
+ fgSizerPhysPrms->Add( m_choiceUnit_Param1, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_radioBtnPrm1 = new wxRadioButton( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ fgSizerPhysPrms->Add( m_radioBtnPrm1, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_phys_prm2_label = new wxStaticText( m_panelTransline, wxID_ANY, _("prm2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_phys_prm2_label->Wrap( -1 );
+ fgSizerPhysPrms->Add( m_phys_prm2_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Phys_prm2_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerPhysPrms->Add( m_Phys_prm2_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnit_Param2Choices;
+ m_choiceUnit_Param2 = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_Param2Choices, 0 );
+ m_choiceUnit_Param2->SetSelection( 0 );
+ fgSizerPhysPrms->Add( m_choiceUnit_Param2, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_radioBtnPrm2 = new wxRadioButton( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerPhysPrms->Add( m_radioBtnPrm2, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_phys_prm3_label = new wxStaticText( m_panelTransline, wxID_ANY, _("prm3"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_phys_prm3_label->Wrap( -1 );
+ fgSizerPhysPrms->Add( m_phys_prm3_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Phys_prm3_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerPhysPrms->Add( m_Phys_prm3_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnit_Param3Choices;
+ m_choiceUnit_Param3 = new UNIT_SELECTOR_LEN( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_Param3Choices, 0 );
+ m_choiceUnit_Param3->SetSelection( 0 );
+ fgSizerPhysPrms->Add( m_choiceUnit_Param3, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerPhysPrms->Add( 0, 0, 0, 0, 5 );
+
+ sbRightBoxizer->Add( fgSizerPhysPrms, 0, wxEXPAND, 5 );
+
+ btranslineRightSizer->Add( sbRightBoxizer, 0, wxBOTTOM|wxEXPAND, 5 );
+
+ bRightSizer->Add( btranslineRightSizer, 0, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* btranslineButtonsSizer;
+ btranslineButtonsSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerButtons;
+ bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapAnalyse = new wxStaticBitmap( m_panelTransline, wxID_ANY, wxBitmap( arrow_bottom_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtons->Add( m_bitmapAnalyse, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_AnalyseButton = new wxButton( m_panelTransline, wxID_ANY, _("Analyze"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtons->Add( m_AnalyseButton, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_SynthetizeButton = new wxButton( m_panelTransline, wxID_ANY, _("Synthetize"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtons->Add( m_SynthetizeButton, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_bitmapSynthetize = new wxStaticBitmap( m_panelTransline, wxID_ANY, wxBitmap( arrow_top_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtons->Add( m_bitmapSynthetize, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ btranslineButtonsSizer->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bRightSizer->Add( btranslineButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ wxStaticBoxSizer* sbElectricalResultsSizer;
+ sbElectricalResultsSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Electrical Parameters:") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerResults;
+ fgSizerResults = new wxFlexGridSizer( 3, 3, 0, 0 );
+ fgSizerResults->AddGrowableCol( 1 );
+ fgSizerResults->SetFlexibleDirection( wxBOTH );
+ fgSizerResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_elec_prm1_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Z"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_elec_prm1_label->Wrap( -1 );
+ fgSizerResults->Add( m_elec_prm1_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Elec_prm1_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerResults->Add( m_Elec_prm1_Value, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ wxArrayString m_choiceUnit_ElecPrm1Choices;
+ m_choiceUnit_ElecPrm1 = new UNIT_SELECTOR_RESISTOR( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_ElecPrm1Choices, 0 );
+ m_choiceUnit_ElecPrm1->SetSelection( 0 );
+ fgSizerResults->Add( m_choiceUnit_ElecPrm1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_elec_prm2_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Z"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_elec_prm2_label->Wrap( -1 );
+ fgSizerResults->Add( m_elec_prm2_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Elec_prm2_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerResults->Add( m_Elec_prm2_Value, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ wxArrayString m_choiceUnit_ElecPrm2Choices;
+ m_choiceUnit_ElecPrm2 = new UNIT_SELECTOR_RESISTOR( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_ElecPrm2Choices, 0 );
+ m_choiceUnit_ElecPrm2->SetSelection( 0 );
+ fgSizerResults->Add( m_choiceUnit_ElecPrm2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_elec_prm3_label = new wxStaticText( m_panelTransline, wxID_ANY, _("Angle"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_elec_prm3_label->Wrap( -1 );
+ fgSizerResults->Add( m_elec_prm3_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Elec_prm3_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerResults->Add( m_Elec_prm3_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnit_ElecPrm3Choices;
+ m_choiceUnit_ElecPrm3 = new UNIT_SELECTOR_ANGLE( m_panelTransline, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnit_ElecPrm3Choices, 0 );
+ m_choiceUnit_ElecPrm3->SetSelection( 0 );
+ fgSizerResults->Add( m_choiceUnit_ElecPrm3, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbElectricalResultsSizer->Add( fgSizerResults, 0, wxEXPAND, 5 );
+
+ bRightSizer->Add( sbElectricalResultsSizer, 0, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbMessagesSizer;
+ sbMessagesSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelTransline, wxID_ANY, _("Results:") ), wxVERTICAL );
+
+ wxGridSizer* gSizerResults;
+ gSizerResults = new wxGridSizer( 7, 2, 0, 0 );
+
+ m_left_message1 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message1->Wrap( -1 );
+ gSizerResults->Add( m_left_message1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message1 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message1->Wrap( -1 );
+ gSizerResults->Add( m_Message1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_left_message2 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message2->Wrap( -1 );
+ gSizerResults->Add( m_left_message2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message2 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message2->Wrap( -1 );
+ gSizerResults->Add( m_Message2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_left_message3 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message3->Wrap( -1 );
+ gSizerResults->Add( m_left_message3, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message3 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message3->Wrap( -1 );
+ gSizerResults->Add( m_Message3, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_left_message4 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message4->Wrap( -1 );
+ gSizerResults->Add( m_left_message4, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message4 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message4->Wrap( -1 );
+ gSizerResults->Add( m_Message4, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_left_message5 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message5->Wrap( -1 );
+ gSizerResults->Add( m_left_message5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 );
+
+ m_Message5 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message5->Wrap( -1 );
+ gSizerResults->Add( m_Message5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_left_message6 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message6->Wrap( -1 );
+ gSizerResults->Add( m_left_message6, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message6 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message6->Wrap( -1 );
+ gSizerResults->Add( m_Message6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_left_message7 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_left_message7->Wrap( -1 );
+ gSizerResults->Add( m_left_message7, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ m_Message7 = new wxStaticText( m_panelTransline, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Message7->Wrap( -1 );
+ gSizerResults->Add( m_Message7, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbMessagesSizer->Add( gSizerResults, 1, wxEXPAND, 5 );
+
+ bRightSizer->Add( sbMessagesSizer, 1, wxEXPAND|wxTOP, 5 );
+
+ bSizeTransline->Add( bRightSizer, 1, wxEXPAND, 5 );
+
+ m_panelTransline->SetSizer( bSizeTransline );
+ m_panelTransline->Layout();
+ bSizeTransline->Fit( m_panelTransline );
+ m_Notebook->AddPage( m_panelTransline, _("TransLine"), false );
+ m_panelAttenuators = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxStaticBoxSizer* sbSizerAtt;
+ sbSizerAtt = new wxStaticBoxSizer( new wxStaticBox( m_panelAttenuators, wxID_ANY, _("label") ), wxHORIZONTAL );
+
+ wxBoxSizer* bLeftSizerAtt;
+ bLeftSizerAtt = new wxBoxSizer( wxVERTICAL );
+
+ wxString m_AttenuatorsSelectionChoices[] = { _("PI"), _("Tee"), _("Bridged Tee"), _("Resistive Splitter") };
+ int m_AttenuatorsSelectionNChoices = sizeof( m_AttenuatorsSelectionChoices ) / sizeof( wxString );
+ m_AttenuatorsSelection = new wxRadioBox( m_panelAttenuators, wxID_ANY, _("Attenuators:"), wxDefaultPosition, wxDefaultSize, m_AttenuatorsSelectionNChoices, m_AttenuatorsSelectionChoices, 1, wxRA_SPECIFY_COLS );
+ m_AttenuatorsSelection->SetSelection( 0 );
+ bLeftSizerAtt->Add( m_AttenuatorsSelection, 0, wxEXPAND|wxALL, 5 );
+
+ m_panelDisplayAttenuator = new wxPanel( m_panelAttenuators, wxID_ANY, wxDefaultPosition, wxSize( 256,256 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ bLeftSizerAtt->Add( m_panelDisplayAttenuator, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ sbSizerAtt->Add( bLeftSizerAtt, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bMiddleSizerAtt;
+ bMiddleSizerAtt = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizerAttPrms;
+ sbSizerAttPrms = new wxStaticBoxSizer( new wxStaticBox( m_panelAttenuators, wxID_ANY, _("Parameters:") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerAttPrms;
+ fgSizerAttPrms = new wxFlexGridSizer( 3, 3, 0, 0 );
+ fgSizerAttPrms->AddGrowableRow( 1 );
+ fgSizerAttPrms->SetFlexibleDirection( wxBOTH );
+ fgSizerAttPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_attenuationLabel = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Attenuation"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attenuationLabel->Wrap( -1 );
+ fgSizerAttPrms->Add( m_attenuationLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_AttValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms->Add( m_AttValueCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_attUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("dB"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attUnit->Wrap( -1 );
+ fgSizerAttPrms->Add( m_attUnit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_attenuationZinLabel = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Zin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attenuationZinLabel->Wrap( -1 );
+ fgSizerAttPrms->Add( m_attenuationZinLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_ZinValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms->Add( m_ZinValueCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_attZinUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attZinUnit->Wrap( -1 );
+ fgSizerAttPrms->Add( m_attZinUnit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_ZoutLabel = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Zout"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ZoutLabel->Wrap( -1 );
+ fgSizerAttPrms->Add( m_ZoutLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_ZoutValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms->Add( m_ZoutValueCtrl, 0, wxALL, 5 );
+
+ m_attZoutUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attZoutUnit->Wrap( -1 );
+ fgSizerAttPrms->Add( m_attZoutUnit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizerAttPrms->Add( fgSizerAttPrms, 0, wxEXPAND, 5 );
+
+ bMiddleSizerAtt->Add( sbSizerAttPrms, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerAttButt;
+ bSizerAttButt = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonAlcAtt = new wxButton( m_panelAttenuators, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerAttButt->Add( m_buttonAlcAtt, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bitmapAnalyse1 = new wxStaticBitmap( m_panelAttenuators, wxID_ANY, wxBitmap( arrow_bottom_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerAttButt->Add( m_bitmapAnalyse1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bMiddleSizerAtt->Add( bSizerAttButt, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ wxStaticBoxSizer* sbSizerAttValues;
+ sbSizerAttValues = new wxStaticBoxSizer( new wxStaticBox( m_panelAttenuators, wxID_ANY, _("Values") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerAttResults;
+ fgSizerAttResults = new wxFlexGridSizer( 3, 3, 0, 0 );
+ fgSizerAttResults->AddGrowableRow( 1 );
+ fgSizerAttResults->SetFlexibleDirection( wxBOTH );
+ fgSizerAttResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_attenuatorR1Label = new wxStaticText( m_panelAttenuators, wxID_ANY, _("R1"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attenuatorR1Label->Wrap( -1 );
+ fgSizerAttResults->Add( m_attenuatorR1Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Att_R1_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttResults->Add( m_Att_R1_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_attR1Unit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attR1Unit->Wrap( -1 );
+ fgSizerAttResults->Add( m_attR1Unit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_attenuatorR2Label = new wxStaticText( m_panelAttenuators, wxID_ANY, _("R2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attenuatorR2Label->Wrap( -1 );
+ fgSizerAttResults->Add( m_attenuatorR2Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Att_R2_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttResults->Add( m_Att_R2_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_attR2Unit1 = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attR2Unit1->Wrap( -1 );
+ fgSizerAttResults->Add( m_attR2Unit1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_attenuatorR3Label = new wxStaticText( m_panelAttenuators, wxID_ANY, _("R3"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attenuatorR3Label->Wrap( -1 );
+ fgSizerAttResults->Add( m_attenuatorR3Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_Att_R3_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttResults->Add( m_Att_R3_Value, 0, wxALL, 5 );
+
+ m_attR3Unit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_attR3Unit->Wrap( -1 );
+ fgSizerAttResults->Add( m_attR3Unit, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizerAttValues->Add( fgSizerAttResults, 0, wxEXPAND, 5 );
+
+ bMiddleSizerAtt->Add( sbSizerAttValues, 0, wxEXPAND, 5 );
+
+ m_staticTextAttMsg = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAttMsg->Wrap( -1 );
+ bMiddleSizerAtt->Add( m_staticTextAttMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_Attenuator_Messages = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
+ bMiddleSizerAtt->Add( m_Attenuator_Messages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ sbSizerAtt->Add( bMiddleSizerAtt, 0, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbRightSizerFormula;
+ sbRightSizerFormula = new wxStaticBoxSizer( new wxStaticBox( m_panelAttenuators, wxID_ANY, _("Formula") ), wxVERTICAL );
+
+ m_panelAttFormula = new wxPanel( m_panelAttenuators, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ m_panelAttFormula->SetMinSize( wxSize( 200,-1 ) );
+
+ sbRightSizerFormula->Add( m_panelAttFormula, 1, wxALL|wxEXPAND, 5 );
+
+ sbSizerAtt->Add( sbRightSizerFormula, 1, wxEXPAND, 5 );
+
+ m_panelAttenuators->SetSizer( sbSizerAtt );
+ m_panelAttenuators->Layout();
+ sbSizerAtt->Fit( m_panelAttenuators );
+ m_Notebook->AddPage( m_panelAttenuators, _("RF Attenuators"), false );
+ m_panelColorCode = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizerPanelColorCode;
+ bSizerPanelColorCode = new wxBoxSizer( wxHORIZONTAL );
+
+ wxString m_rbToleranceSelectionChoices[] = { _("10%"), _("5%"), _("2%"), _("1%"), _("0.5%"), _("0.25%"), _("0.1%"), _("0.05%") };
+ int m_rbToleranceSelectionNChoices = sizeof( m_rbToleranceSelectionChoices ) / sizeof( wxString );
+ m_rbToleranceSelection = new wxRadioBox( m_panelColorCode, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDefaultSize, m_rbToleranceSelectionNChoices, m_rbToleranceSelectionChoices, 1, wxRA_SPECIFY_COLS );
+ m_rbToleranceSelection->SetSelection( 0 );
+ bSizerPanelColorCode->Add( m_rbToleranceSelection, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxFlexGridSizer* fgSizerColoCode;
+ fgSizerColoCode = new wxFlexGridSizer( 2, 6, 0, 0 );
+ fgSizerColoCode->SetFlexibleDirection( wxBOTH );
+ fgSizerColoCode->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticText31 = new wxStaticText( m_panelColorCode, wxID_ANY, _("1st Band"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText31->Wrap( -1 );
+ fgSizerColoCode->Add( m_staticText31, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticText34 = new wxStaticText( m_panelColorCode, wxID_ANY, _("2nd Band"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText34->Wrap( -1 );
+ fgSizerColoCode->Add( m_staticText34, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticText35 = new wxStaticText( m_panelColorCode, wxID_ANY, _("3rd Band"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText35->Wrap( -1 );
+ fgSizerColoCode->Add( m_staticText35, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_Band4Label = new wxStaticText( m_panelColorCode, wxID_ANY, _("4rd Band"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Band4Label->Wrap( -1 );
+ fgSizerColoCode->Add( m_Band4Label, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticText37 = new wxStaticText( m_panelColorCode, wxID_ANY, _("Multiplier"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText37->Wrap( -1 );
+ fgSizerColoCode->Add( m_staticText37, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticText38 = new wxStaticText( m_panelColorCode, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText38->Wrap( -1 );
+ fgSizerColoCode->Add( m_staticText38, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_Band1bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_value_and_name_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band1bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_Band2bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_value_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band2bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_Band3bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_value_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band3bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_Band4bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_value_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band4bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ m_Band_mult_bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_multiplier_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band_mult_bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ m_Band_tol_bitmap = new wxStaticBitmap( m_panelColorCode, wxID_ANY, wxBitmap( color_code_tolerance_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerColoCode->Add( m_Band_tol_bitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerPanelColorCode->Add( fgSizerColoCode, 1, wxEXPAND|wxLEFT, 5 );
+
+ m_panelColorCode->SetSizer( bSizerPanelColorCode );
+ m_panelColorCode->Layout();
+ bSizerPanelColorCode->Fit( m_panelColorCode );
+ m_Notebook->AddPage( m_panelColorCode, _("Color Code"), true );
+ m_panelBoardClass = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizerBoardClass;
+ bSizerBoardClass = new wxBoxSizer( wxHORIZONTAL );
+
+ wxArrayString m_BoardClassesUnitsSelectorChoices;
+ m_BoardClassesUnitsSelector = new UNIT_SELECTOR_LEN( m_panelBoardClass, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardClassesUnitsSelectorChoices, 0 );
+ m_BoardClassesUnitsSelector->SetSelection( -1 );
+ bSizerBoardClass->Add( m_BoardClassesUnitsSelector, 0, wxALL, 5 );
+
+ wxBoxSizer* brdclsSizerRight;
+ brdclsSizerRight = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextBrdClass = new wxStaticText( m_panelBoardClass, wxID_ANY, _("Note: Values are minimal values"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBrdClass->Wrap( -1 );
+ m_staticTextBrdClass->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 92, false, wxEmptyString ) );
+
+ brdclsSizerRight->Add( m_staticTextBrdClass, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_gridClassesValuesDisplay = new wxGrid( m_panelBoardClass, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridClassesValuesDisplay->CreateGrid( 5, 6 );
+ m_gridClassesValuesDisplay->EnableEditing( false );
+ m_gridClassesValuesDisplay->EnableGridLines( true );
+ m_gridClassesValuesDisplay->EnableDragGridSize( false );
+ m_gridClassesValuesDisplay->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridClassesValuesDisplay->EnableDragColMove( false );
+ m_gridClassesValuesDisplay->EnableDragColSize( true );
+ m_gridClassesValuesDisplay->SetColLabelSize( 70 );
+ m_gridClassesValuesDisplay->SetColLabelValue( 0, _("Class 1") );
+ m_gridClassesValuesDisplay->SetColLabelValue( 1, _("Class 2") );
+ m_gridClassesValuesDisplay->SetColLabelValue( 2, _("Class 3") );
+ m_gridClassesValuesDisplay->SetColLabelValue( 3, _("Class 4") );
+ m_gridClassesValuesDisplay->SetColLabelValue( 4, _("Class 5") );
+ m_gridClassesValuesDisplay->SetColLabelValue( 5, _("Class 6") );
+ m_gridClassesValuesDisplay->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridClassesValuesDisplay->AutoSizeRows();
+ m_gridClassesValuesDisplay->EnableDragRowSize( false );
+ m_gridClassesValuesDisplay->SetRowLabelSize( 160 );
+ m_gridClassesValuesDisplay->SetRowLabelValue( 0, _("Lines width") );
+ m_gridClassesValuesDisplay->SetRowLabelValue( 1, _("Min clearance") );
+ m_gridClassesValuesDisplay->SetRowLabelValue( 2, _("Via: (diam - drill)") );
+ m_gridClassesValuesDisplay->SetRowLabelValue( 3, _("Plated Pad: (diam - drill)") );
+ m_gridClassesValuesDisplay->SetRowLabelValue( 4, _("NP Pad: (diam - drill)") );
+ m_gridClassesValuesDisplay->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridClassesValuesDisplay->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ brdclsSizerRight->Add( m_gridClassesValuesDisplay, 0, wxALL|wxEXPAND, 5 );
+
+ m_panelShowClassPrms = new wxPanel( m_panelBoardClass, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ brdclsSizerRight->Add( m_panelShowClassPrms, 1, wxEXPAND | wxALL, 5 );
+
+ bSizerBoardClass->Add( brdclsSizerRight, 1, wxEXPAND, 5 );
+
+ m_panelBoardClass->SetSizer( bSizerBoardClass );
+ m_panelBoardClass->Layout();
+ bSizerBoardClass->Fit( m_panelBoardClass );
+ m_Notebook->AddPage( m_panelBoardClass, _("Board Classes"), false );
+
+ bmainFrameSizer->Add( m_Notebook, 1, wxEXPAND, 5 );
+
+ this->SetSizer( bmainFrameSizer );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
+ m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
+ m_panelDisplayshape->Connect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintTranslinePanel ), NULL, this );
+ m_button_EpsilonR->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineEpsilonR_Button ), NULL, this );
+ m_button_TanD->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineTanD_Button ), NULL, this );
+ m_button_Rho->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineRho_Button ), NULL, this );
+ m_AnalyseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
+ m_SynthetizeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
+ m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
+ m_panelDisplayAttenuator->Connect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
+ m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
+ m_panelAttFormula->Connect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttFormulaPanel ), NULL, this );
+ m_rbToleranceSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnToleranceSelection ), NULL, this );
+ m_BoardClassesUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnBoardClassesUnitsSelection ), NULL, this );
+}
+
+PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
+{
+ // Disconnect Events
+ m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
+ m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
+ m_panelDisplayshape->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintTranslinePanel ), NULL, this );
+ m_button_EpsilonR->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineEpsilonR_Button ), NULL, this );
+ m_button_TanD->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineTanD_Button ), NULL, this );
+ m_button_Rho->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineRho_Button ), NULL, this );
+ m_AnalyseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
+ m_SynthetizeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
+ m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
+ m_panelDisplayAttenuator->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
+ m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
+ m_panelAttFormula->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttFormulaPanel ), NULL, this );
+ m_rbToleranceSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnToleranceSelection ), NULL, this );
+ m_BoardClassesUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnBoardClassesUnitsSelection ), NULL, this );
+
+}
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
new file mode 100644
index 0000000000..bf10da0376
--- /dev/null
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
@@ -0,0 +1,12913 @@
+
+
+
+
+
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
new file mode 100644
index 0000000000..46cdda46c7
--- /dev/null
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
@@ -0,0 +1,221 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 30 2011)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PCB_CALCULATOR_FRAME_BASE_H__
+#define __PCB_CALCULATOR_FRAME_BASE_H__
+
+#include
+#include
+#include
+class UNIT_SELECTOR_ANGLE;
+class UNIT_SELECTOR_FREQUENCY;
+class UNIT_SELECTOR_LEN;
+class UNIT_SELECTOR_RESISTOR;
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PCB_CALCULATOR_FRAME_BASE
+///////////////////////////////////////////////////////////////////////////////
+class PCB_CALCULATOR_FRAME_BASE : public wxFrame
+{
+ private:
+
+ protected:
+ wxMenuBar* m_menubar;
+ wxStatusBar* m_statusBar;
+ wxNotebook* m_Notebook;
+ wxPanel* m_panelRegulators;
+ wxStaticBitmap* m_bitmapRegul;
+ wxStaticText* m_RegulFormula;
+ wxRadioButton* m_rbRegulR1;
+ wxStaticText* m_labelRegultR1;
+ wxTextCtrl* m_RegulR1Value;
+ wxStaticText* m_UnitRegultR11;
+ wxRadioButton* m_rbRegulR2;
+ wxStaticText* m_labelRegultR2;
+ wxTextCtrl* m_RegulR2Value;
+ wxStaticText* m_UnitRegultR1;
+ wxStaticText* m_lableVRef;
+ wxTextCtrl* m_RegulVrefValue;
+ wxStaticText* m_unitsVref;
+ wxRadioButton* m_rbRegulVout;
+ wxStaticText* m_labelVout;
+ wxTextCtrl* m_RegulVoutValue;
+ wxStaticText* m_unitsVout;
+ wxButton* m_buttonCalculate;
+ wxStaticText* m_RegulMessage;
+ wxPanel* m_panelTransline;
+ wxRadioBox* m_TranslineSelection;
+ wxPanel* m_panelDisplayshape;
+ wxStaticLine* m_staticline1;
+ wxStaticText* m_EpsilonR_label;
+ wxTextCtrl* m_Value_EpsilonR;
+ wxButton* m_button_EpsilonR;
+ wxStaticText* m_TanD_label;
+ wxTextCtrl* m_Value_TanD;
+ wxButton* m_button_TanD;
+ wxStaticText* m_Rho_label;
+ wxTextCtrl* m_Value_Rho;
+ wxButton* m_button_Rho;
+ wxStaticText* m_substrate_prm4_label;
+ wxTextCtrl* m_Substrate_prm4_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm4_choiceUnit;
+ wxStaticText* m_substrate_prm5_label;
+ wxTextCtrl* m_Substrate_prm5_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm5_choiceUnit;
+ wxStaticText* m_substrate_prm6_label;
+ wxTextCtrl* m_Substrate_prm6_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm6_choiceUnit;
+ wxStaticText* m_substrate_prm7_label;
+ wxTextCtrl* m_Substrate_prm7_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm7_choiceUnit;
+ wxStaticText* m_substrate_prm8_label;
+ wxTextCtrl* m_Substrate_prm8_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm8_choiceUnit;
+ wxStaticText* m_substrate_prm9_label;
+ wxTextCtrl* m_Substrate_prm9_Value;
+ UNIT_SELECTOR_LEN* m_SubsPrm9_choiceUnit;
+ wxStaticText* m_Frequency_label;
+ wxTextCtrl* m_Value_Frequency_Ctrl;
+ UNIT_SELECTOR_FREQUENCY* m_choiceUnit_Frequency;
+ wxStaticText* m_phys_prm1_label;
+ wxTextCtrl* m_Phys_prm1_Value;
+ UNIT_SELECTOR_LEN* m_choiceUnit_Param1;
+ wxRadioButton* m_radioBtnPrm1;
+ wxStaticText* m_phys_prm2_label;
+ wxTextCtrl* m_Phys_prm2_Value;
+ UNIT_SELECTOR_LEN* m_choiceUnit_Param2;
+ wxRadioButton* m_radioBtnPrm2;
+ wxStaticText* m_phys_prm3_label;
+ wxTextCtrl* m_Phys_prm3_Value;
+ UNIT_SELECTOR_LEN* m_choiceUnit_Param3;
+ wxStaticBitmap* m_bitmapAnalyse;
+ wxButton* m_AnalyseButton;
+ wxButton* m_SynthetizeButton;
+ wxStaticBitmap* m_bitmapSynthetize;
+ wxStaticText* m_elec_prm1_label;
+ wxTextCtrl* m_Elec_prm1_Value;
+ UNIT_SELECTOR_RESISTOR* m_choiceUnit_ElecPrm1;
+ wxStaticText* m_elec_prm2_label;
+ wxTextCtrl* m_Elec_prm2_Value;
+ UNIT_SELECTOR_RESISTOR* m_choiceUnit_ElecPrm2;
+ wxStaticText* m_elec_prm3_label;
+ wxTextCtrl* m_Elec_prm3_Value;
+ UNIT_SELECTOR_ANGLE* m_choiceUnit_ElecPrm3;
+ wxStaticText* m_left_message1;
+ wxStaticText* m_Message1;
+ wxStaticText* m_left_message2;
+ wxStaticText* m_Message2;
+ wxStaticText* m_left_message3;
+ wxStaticText* m_Message3;
+ wxStaticText* m_left_message4;
+ wxStaticText* m_Message4;
+ wxStaticText* m_left_message5;
+ wxStaticText* m_Message5;
+ wxStaticText* m_left_message6;
+ wxStaticText* m_Message6;
+ wxStaticText* m_left_message7;
+ wxStaticText* m_Message7;
+ wxPanel* m_panelAttenuators;
+ wxRadioBox* m_AttenuatorsSelection;
+ wxPanel* m_panelDisplayAttenuator;
+ wxStaticText* m_attenuationLabel;
+ wxTextCtrl* m_AttValueCtrl;
+ wxStaticText* m_attUnit;
+ wxStaticText* m_attenuationZinLabel;
+ wxTextCtrl* m_ZinValueCtrl;
+ wxStaticText* m_attZinUnit;
+ wxStaticText* m_ZoutLabel;
+ wxTextCtrl* m_ZoutValueCtrl;
+ wxStaticText* m_attZoutUnit;
+ wxButton* m_buttonAlcAtt;
+ wxStaticBitmap* m_bitmapAnalyse1;
+ wxStaticText* m_attenuatorR1Label;
+ wxTextCtrl* m_Att_R1_Value;
+ wxStaticText* m_attR1Unit;
+ wxStaticText* m_attenuatorR2Label;
+ wxTextCtrl* m_Att_R2_Value;
+ wxStaticText* m_attR2Unit1;
+ wxStaticText* m_attenuatorR3Label;
+ wxTextCtrl* m_Att_R3_Value;
+ wxStaticText* m_attR3Unit;
+ wxStaticText* m_staticTextAttMsg;
+ wxTextCtrl* m_Attenuator_Messages;
+ wxPanel* m_panelAttFormula;
+ wxPanel* m_panelColorCode;
+ wxRadioBox* m_rbToleranceSelection;
+ wxStaticText* m_staticText31;
+ wxStaticText* m_staticText34;
+ wxStaticText* m_staticText35;
+ wxStaticText* m_Band4Label;
+ wxStaticText* m_staticText37;
+ wxStaticText* m_staticText38;
+ wxStaticBitmap* m_Band1bitmap;
+ wxStaticBitmap* m_Band2bitmap;
+ wxStaticBitmap* m_Band3bitmap;
+ wxStaticBitmap* m_Band4bitmap;
+ wxStaticBitmap* m_Band_mult_bitmap;
+ wxStaticBitmap* m_Band_tol_bitmap;
+ wxPanel* m_panelBoardClass;
+ UNIT_SELECTOR_LEN* m_BoardClassesUnitsSelector;
+ wxStaticText* m_staticTextBrdClass;
+ wxGrid* m_gridClassesValuesDisplay;
+ wxPanel* m_panelShowClassPrms;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnRegulatorCalcButtonClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPaintTranslinePanel( wxPaintEvent& event ) { event.Skip(); }
+ virtual void OnTranslineEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTranslineTanD_Button( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTranslineRho_Button( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTranslineAnalyse( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTranslineSynthetize( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAttenuatorSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPaintAttenuatorPanel( wxPaintEvent& event ) { event.Skip(); }
+ virtual void OnCalculateAttenuator( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPaintAttFormulaPanel( wxPaintEvent& event ) { event.Skip(); }
+ virtual void OnToleranceSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBoardClassesUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pcb Calculator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 752,465 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
+
+ ~PCB_CALCULATOR_FRAME_BASE();
+
+};
+
+#endif //__PCB_CALCULATOR_FRAME_BASE_H__
diff --git a/pcb_calculator/docs/NFC93713_English_A1T.pdf b/pcb_calculator/docs/NFC93713_English_A1T.pdf
new file mode 100644
index 0000000000..62cc203179
Binary files /dev/null and b/pcb_calculator/docs/NFC93713_English_A1T.pdf differ
diff --git a/pcb_calculator/docs/RF_attenuators.odt b/pcb_calculator/docs/RF_attenuators.odt
new file mode 100644
index 0000000000..e2ddfed01f
Binary files /dev/null and b/pcb_calculator/docs/RF_attenuators.odt differ
diff --git a/pcb_calculator/docs/tracks_width_thickness.pdf b/pcb_calculator/docs/tracks_width_thickness.pdf
new file mode 100644
index 0000000000..4bb30e34eb
Binary files /dev/null and b/pcb_calculator/docs/tracks_width_thickness.pdf differ
diff --git a/pcb_calculator/params_read_write.cpp b/pcb_calculator/params_read_write.cpp
new file mode 100644
index 0000000000..b179485b4c
--- /dev/null
+++ b/pcb_calculator/params_read_write.cpp
@@ -0,0 +1,222 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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
+#include
+#include
+#include
+
+#include "pcb_calculator_frame_base.h"
+#include "pcb_calculator.h"
+#include "transline.h"
+
+/*
+ * Return the value from a string,
+ * Unlike standard string to double convertion,
+ * both point and comma F.P. separator are accepted
+ * and values having units (like 4.7 K) are accepted
+ * but units are ignored.
+ * notation like 1e+3 is legal
+ */
+double ReturnDoubleFromString( const wxString& TextValue )
+{
+ double value = 0;
+
+ /* Acquire the 'right' decimal point separator */
+ const struct lconv* lc = localeconv();
+ wxChar decimal_point = lc->decimal_point[0];
+ wxString buf( TextValue.Strip( wxString::both ) );
+
+ /* Convert the period in decimal point */
+ buf.Replace( wxT( "." ), wxString( decimal_point, 1 ) );
+ // An ugly fix needed by WxWidgets 2.9.1 that sometimes
+ // back to a point as separator, although the separator is the comma
+ buf.Replace( wxT( "," ), wxString( decimal_point, 1 ) );
+
+ /* Find the end of the numeric part
+ *(when units are append to the number, remove them)
+ */
+ unsigned brk_point = 0;
+ while( brk_point < buf.Len() )
+ {
+ wxChar ch = buf[brk_point];
+ if( !( (ch >= '0' && ch <='9') || (ch == decimal_point)
+ || (ch == '-') || (ch == '+') || (ch == 'e') || (ch == 'E') ) )
+ {
+ break;
+ }
+ ++brk_point;
+ }
+
+ /* Extract the numeric part */
+ buf.Left( brk_point ).ToDouble( &value );
+
+ return value;
+}
+
+
+// Functions to Read/Write parameters in pcb_calculator main frame:
+// They are only wrapper to actual functions, so all transline functions do not
+// depend on Graphic User Interface
+void SetPropertyInDialog( enum PRMS_ID aPrmId, double value )
+{
+ PCB_CALCULATOR_FRAME * frame = (PCB_CALCULATOR_FRAME *) wxTheApp->GetTopWindow();
+ frame->SetPrmValue( aPrmId, value );
+}
+
+/* Puts the text into the given result line.
+*/
+void SetResultInDialog( int line, const char* aText )
+{
+ PCB_CALCULATOR_FRAME * frame = (PCB_CALCULATOR_FRAME *) wxTheApp->GetTopWindow();
+ wxString msg = wxString::FromUTF8( aText );
+ frame->SetResult( line, msg );
+}
+
+/* print aValue into the given result line.
+*/
+void SetResultInDialog( int aLineNumber, double aValue, const char* aText )
+{
+ PCB_CALCULATOR_FRAME * frame = (PCB_CALCULATOR_FRAME *) wxTheApp->GetTopWindow();
+ wxString msg = wxString::FromUTF8( aText );
+ wxString fullmsg;
+ fullmsg.Printf( wxT("%g "), aValue );
+ fullmsg += msg;
+ frame->SetResult( aLineNumber, fullmsg );
+}
+
+/* Returns a named property value. */
+double GetPropertyInDialog( enum PRMS_ID aPrmId )
+{
+ PCB_CALCULATOR_FRAME * frame = (PCB_CALCULATOR_FRAME *) wxTheApp->GetTopWindow();
+ return frame->GetPrmValue( aPrmId );
+}
+
+// Returns true if the param aPrmId is selected
+// Has meaning only for params that have a radio button
+bool IsSelectedInDialog( enum PRMS_ID aPrmId )
+{
+ PCB_CALCULATOR_FRAME * frame = (PCB_CALCULATOR_FRAME *) wxTheApp->GetTopWindow();
+ return frame->IsPrmSelected( aPrmId );
+}
+
+
+/**
+ * Function GetPrmValue
+ * Returns a param value.
+ * @param aPrmId = param id to write
+ * @return the value always in normalized unit (meter, Hz, Ohm, radian)
+ */
+double PCB_CALCULATOR_FRAME::GetPrmValue( enum PRMS_ID aPrmId )
+{
+ TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
+ for( unsigned ii = 0; ii < tr_ident->GetPrmsCount(); ii++ )
+ {
+ TRANSLINE_PRM* prm = tr_ident->GetPrm( ii );
+ if( aPrmId == prm->m_Id )
+ return prm->m_NormalizedValue;
+ }
+
+ wxLogMessage( wxT("GetPrmValue: prm %d not found"), (int) aPrmId );
+ return 1.0;
+}
+
+/**
+ * Function SetPrmValue
+ * Read/write params values and results
+ * @param aPrmId = param id to write
+ * @param aValue = value to write
+ */
+void PCB_CALCULATOR_FRAME::SetPrmValue( enum PRMS_ID aPrmId, double aValue )
+{
+ TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
+ for( unsigned ii = 0; ii < tr_ident->GetPrmsCount(); ii++ )
+ {
+ TRANSLINE_PRM* prm = tr_ident->GetPrm( ii );
+ if( aPrmId == prm->m_Id )
+ {
+ prm->m_Value = prm->m_NormalizedValue = aValue;
+ prm->m_NormalizedValue = aValue;
+ prm->m_Value = prm->m_NormalizedValue * prm->ToUserUnit();
+ wxString msg;
+ msg.Printf( wxT("%g"), prm->m_Value);
+ ((wxTextCtrl*)prm->m_ValueCtrl )->SetValue( msg );
+ return;
+ }
+ }
+
+ wxLogMessage( wxT("GetPrmValue: prm %d not found"), (int) aPrmId );
+}
+
+/**
+ * Function SetResult
+ * Puts the text into the given result line.
+ * @param aLineNumber = the line (0 to MSG_CNT_MAX-1) wher to display the text
+ * @param aText = the text to display
+ */
+void PCB_CALCULATOR_FRAME::SetResult( int aLineNumber, const wxString & aText )
+{
+ #define MSG_CNT_MAX 7
+ wxStaticText * messages[MSG_CNT_MAX] =
+ { m_Message1, m_Message2, m_Message3,
+ m_Message4, m_Message5, m_Message6,
+ m_Message7
+ };
+
+ wxASSERT( ( aLineNumber >= 0 ) && ( aLineNumber < MSG_CNT_MAX ) );
+
+ if( aLineNumber < 0 )
+ aLineNumber = 0;
+ if( aLineNumber >= MSG_CNT_MAX )
+ aLineNumber = MSG_CNT_MAX-1;
+
+ messages[aLineNumber]->SetLabel( aText );
+}
+
+/**
+ * Function IsPrmSelected
+ * @return true if the param aPrmId is selected
+ * Has meaning only for params that have a radio button
+ */
+bool PCB_CALCULATOR_FRAME::IsPrmSelected( enum PRMS_ID aPrmId )
+{
+ switch( aPrmId )
+ {
+ default:
+ wxMessageBox( wxT("IsPrmSelected() error") );
+ break;
+
+ case PHYS_WIDTH_PRM:
+ case PHYS_DIAM_IN_PRM:
+ return m_radioBtnPrm1->GetValue();
+ break;
+
+ case PHYS_S_PRM:
+ case PHYS_DIAM_OUT_PRM:
+ return m_radioBtnPrm2->GetValue();
+ break;
+ }
+ return false;
+}
+
diff --git a/pcb_calculator/pcb_calculator.cpp b/pcb_calculator/pcb_calculator.cpp
new file mode 100644
index 0000000000..7f5ec626dc
--- /dev/null
+++ b/pcb_calculator/pcb_calculator.cpp
@@ -0,0 +1,55 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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/config.h"
+
+#include "pcb_calculator_frame_base.h"
+#include "pcb_calculator.h"
+
+// PCB_CALCULATOR_APP
+
+class PCB_CALCULATOR_APP : public wxApp
+{
+public:
+ virtual bool OnInit();
+};
+
+
+IMPLEMENT_APP( PCB_CALCULATOR_APP )
+
+///-----------------------------------------------------------------------------
+// PCB_CALCULATOR_APP
+// main program
+//-----------------------------------------------------------------------------
+
+bool PCB_CALCULATOR_APP::OnInit()
+{
+ SetVendorName( wxT( "kicad" ) );
+
+ wxFrame* frame = new PCB_CALCULATOR_FRAME( NULL );
+ SetTopWindow( frame );
+ frame->Show( true );
+
+ return true;
+}
diff --git a/pcb_calculator/pcb_calculator.h b/pcb_calculator/pcb_calculator.h
new file mode 100644
index 0000000000..e55149cbd1
--- /dev/null
+++ b/pcb_calculator/pcb_calculator.h
@@ -0,0 +1,164 @@
+/**
+ * @file pcb_calculator.h
+ */
+
+#ifndef PCB_CALCULATOR_H
+#define PCB_CALCULATOR_H
+
+#include "pcb_calculator_frame_base.h"
+
+#include "transline.h" // Included for SUBST_PRMS_ID definition.
+#include "transline_ident.h"
+#include "attenuator_classes.h"
+
+/* Class PCB_CALCULATOR_FRAME_BASE
+This is the main frame for this application
+*/
+class PCB_CALCULATOR_FRAME : public PCB_CALCULATOR_FRAME_BASE
+{
+private:
+ wxSize m_FrameSize;
+ wxPoint m_FramePos;
+ wxConfig * m_Config;
+ enum transline_type_id m_currTransLineType;
+ TRANSLINE * m_currTransLine; // a pointer to the active transline
+ // List of translines: ordered like in dialog menu list
+ std::vector m_transline_list;
+ ATTENUATOR * m_currAttenuator;
+ // List ofattenuators: ordered like in dialog menu list
+ std::vector m_attenuator_list;
+
+
+public:
+ PCB_CALCULATOR_FRAME( wxWindow * parent = NULL );
+ ~PCB_CALCULATOR_FRAME();
+
+private:
+
+ // Event handlers
+ // These 3 functions are called by the OnPaint event, to draw
+ // icons that show the current item on the specific panels
+ void OnPaintTranslinePanel( wxPaintEvent& event );
+ void OnPaintAttenuatorPanel( wxPaintEvent& event );
+ void OnPaintAttFormulaPanel( wxPaintEvent& event );
+
+ // Config read-write
+ void ReadConfig();
+ void WriteConfig();
+
+ // Transline functions:
+ /**
+ * Function OnTranslineSelection
+ * Called on new transmission line selection
+ */
+ void OnTranslineSelection( wxCommandEvent& event );
+
+ /**
+ * Function OnTranslineAnalyse
+ * Run a new analyse for the current transline with current parameters
+ * and displays the electrical parmeters
+ */
+ void OnTranslineAnalyse( wxCommandEvent& event );
+
+ /**
+ * Function OnTranslineSynthetize
+ * Run a new synthezis for the current transline with current parameters
+ * and displays the geometrical parmeters
+ */
+ void OnTranslineSynthetize( wxCommandEvent& event );
+
+ /**
+ * Function OnTranslineEpsilonR_Button
+ * Shows a list of current relative dielectric constant(Er)
+ * and set the selected value in main dialog frame
+ */
+ void OnTranslineEpsilonR_Button( wxCommandEvent& event );
+
+ /**
+ * Function OnTranslineTanD_Button
+ * Shows a list of current dielectric loss factor (tangent delta)
+ * and set the selected value in main dialog frame
+ */
+ void OnTranslineTanD_Button( wxCommandEvent& event );
+
+ /**
+ * Function OnTranslineRho_Button
+ * Shows a list of current Specific resistance list (rho)
+ * and set the selected value in main dialog frame
+ */
+ void OnTranslineRho_Button( wxCommandEvent& event );
+
+ /**
+ * Function TranslineTypeSelection
+ * Must be called after selection of a new transline.
+ * Update all values, labels and tool tips of parameters needed
+ * by the new transline
+ * Irrelevant parameters texts are blanked.
+ * @param aType = the transline_type_id of the new selected transline
+ */
+ void TranslineTypeSelection( enum transline_type_id aType );
+
+ /**
+ * Function TransfDlgDataToTranslineParams
+ * Read values entered in dialog frame, and transfert these
+ * values in current transline parameters, converted in normalized units
+ */
+ void TransfDlgDataToTranslineParams();
+
+ // Color Code panel
+ void OnToleranceSelection( wxCommandEvent& event );
+ void ToleranceSelection( int aSelection );
+
+ // Attenuators Panel
+ void OnAttenuatorSelection( wxCommandEvent& event );
+ void SetAttenuator( unsigned aIdx );
+ void OnCalculateAttenuator( wxCommandEvent& event );
+ void TransfPanelDataToAttenuator();
+ void TransfAttenuatorDataToPanel();
+ void TransfAttenuatorResultsToPanel();
+
+ // Regulators Panel
+ void OnRegulatorCalcButtonClick( wxCommandEvent& event );
+ void RegulatorsSolve();
+
+public:
+ // Read/write params values and results
+
+ /**
+ * Function SetPrmValue
+ * Read/write params values and results
+ * @param aPrmId = param id to write
+ * @param aValue = valmue to write
+ */
+ void SetPrmValue( enum PRMS_ID aPrmId, double aValue );
+
+ /**
+ * Function SetResult
+ * Puts the text into the given result line.
+ * @param aLineNumber = the line (0 to 5) wher to display the text
+ * @param aText = the text to display
+ */
+ void SetResult( int aLineNumber, const wxString & aText );
+
+ /**
+ * Function GetPrmValue
+ * Returns a param value.
+ * @param aPrmId = param id to write
+ * @return the value always in normalized unit (meter, Hz, Ohm, radian)
+ */
+ double GetPrmValue( enum PRMS_ID aPrmId );
+
+ /**
+ * Function IsPrmSelected
+ * @return true if the param aPrmId is selected
+ * Has meaning only for params that have a radio button
+ */
+ bool IsPrmSelected( enum PRMS_ID aPrmId );
+
+ // Board classes panel:
+ void OnBoardClassesUnitsSelection( wxCommandEvent& event );
+ void BoardClassesUpdateData( double aUnitScale );
+
+};
+
+#endif // PCB_CALCULATOR_H
diff --git a/pcb_calculator/pcb_calculator.ico b/pcb_calculator/pcb_calculator.ico
new file mode 100644
index 0000000000..aa351f5a46
Binary files /dev/null and b/pcb_calculator/pcb_calculator.ico differ
diff --git a/pcb_calculator/pcb_calculator.rc b/pcb_calculator/pcb_calculator.rc
new file mode 100644
index 0000000000..fcf6af9fa2
--- /dev/null
+++ b/pcb_calculator/pcb_calculator.rc
@@ -0,0 +1,2 @@
+pcb_calculator_icon ICON pcb_calculator.ico
+#include "wx/msw/wx.rc"
diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp
new file mode 100644
index 0000000000..74b8dae856
--- /dev/null
+++ b/pcb_calculator/pcb_calculator_frame.cpp
@@ -0,0 +1,229 @@
+/*
+ * 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 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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/config.h"
+
+#include "pcb_calculator.h"
+#include "UnitSelector.h"
+
+#include "pcb_calculator.xpm"
+
+#define KEYWORD_FRAME_POSX wxT( "Pcb_calculator_Pos_x" )
+#define KEYWORD_FRAME_POSY wxT( "Pcb_calculator_Pos_y" )
+#define KEYWORD_FRAME_SIZEX wxT( "Pcb_calculator_Size_x" )
+#define KEYWORD_FRAME_SIZEY wxT( "Pcb_calculator_Size_y" )
+#define KEYWORD_TRANSLINE_SELECTION wxT( "Transline_selection" )
+#define KEYWORD_PAGE_SELECTION wxT( "Page_selection" )
+#define KEYWORD_COLORCODE_SELECTION wxT( "CC_selection" )
+#define KEYWORD_ATTENUATORS_SELECTION wxT( "Att_selection" )
+#define KEYWORD_BRDCLASS_SELECTION wxT( "BrdClass_selection" )
+#define KEYWORD_REGUL_R1 wxT( "RegulR1" )
+#define KEYWORD_REGUL_R2 wxT( "RegulR2" )
+#define KEYWORD_REGUL_VREF wxT( "RegulVREF" )
+#define KEYWORD_REGUL_VOUT wxT( "RegulVOUT" )
+
+PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( wxWindow * parent ) :
+ PCB_CALCULATOR_FRAME_BASE( parent )
+{
+ m_currTransLine = NULL;
+ m_currTransLineType = default_type;
+ m_currAttenuator = NULL;
+ m_Config = new wxConfig();
+
+ // Populate transline list ordered like in dialog menu list
+ transline_type_id tltype_list[8] =
+ {
+ microstrip_type, cpw_type, grounded_cpw_type,
+ rectwaveguide_type, coax_type, c_microstrip_type,
+ stripline_type, twistedpair_type
+ };
+ for( int ii = 0; ii < 8; ii++ )
+ m_transline_list.push_back( new TRANSLINE_IDENT( tltype_list[ii] ) );
+
+ // Populate attenuator list ordered like in dialog menu list
+ m_attenuator_list.push_back( new ATTENUATOR_PI() );
+ m_attenuator_list.push_back( new ATTENUATOR_TEE() );
+ m_attenuator_list.push_back( new ATTENUATOR_BRIDGE() );
+ m_attenuator_list.push_back( new ATTENUATOR_SPLITTER() );
+ m_currAttenuator = m_attenuator_list[0];
+
+ ReadConfig();
+
+ TranslineTypeSelection( m_currTransLineType );
+ m_TranslineSelection->SetSelection( m_currTransLineType );
+
+ SetAttenuator( m_AttenuatorsSelection->GetSelection() );
+
+ ToleranceSelection( m_rbToleranceSelection->GetSelection() );
+
+ BoardClassesUpdateData( m_BoardClassesUnitsSelector->GetUnitScale() );
+
+ #ifdef __WINDOWS__
+ SetIcon( wxICON( pcb_calculator_icon ) );
+ #else
+ SetIcon( wxICON( pcb_calculator ) );
+ #endif
+
+ GetSizer()->SetSizeHints( this );
+
+ // Set previous size and position
+ SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
+
+ if( m_FramePos == wxDefaultPosition )
+ Centre();
+}
+
+
+PCB_CALCULATOR_FRAME::~PCB_CALCULATOR_FRAME()
+{
+ WriteConfig();
+ for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
+ delete m_transline_list[ii];
+
+ for( unsigned ii = 0; ii < m_attenuator_list.size(); ii++ )
+ delete m_attenuator_list[ii];
+
+ delete m_Config;
+
+ /* This needed for OSX: avoids furter OnDraw processing after this
+ * destructor and before the native window is destroyed
+ */
+ this->Freeze();
+}
+
+
+void PCB_CALCULATOR_FRAME::ReadConfig()
+{
+ if( m_Config == NULL )
+ return;
+
+ long ltmp;
+ wxString msg;
+ m_Config->Read( KEYWORD_FRAME_POSX, &m_FramePos.x, -1 );
+ m_Config->Read( KEYWORD_FRAME_POSY, &m_FramePos.y, -1 );
+ m_Config->Read( KEYWORD_FRAME_SIZEX, &m_FrameSize.x, -1 );
+ m_Config->Read( KEYWORD_FRAME_SIZEY, &m_FrameSize.y, -1 );
+ m_Config->Read( KEYWORD_TRANSLINE_SELECTION, <mp, (long) default_type );
+ m_currTransLineType = (enum transline_type_id) ltmp;
+ m_Config->Read( KEYWORD_PAGE_SELECTION, <mp, 0 );
+ m_Notebook->ChangeSelection( ltmp );
+ m_Config->Read( KEYWORD_COLORCODE_SELECTION, <mp, 1 );
+ m_rbToleranceSelection->SetSelection( ltmp );
+ m_Config->Read( KEYWORD_ATTENUATORS_SELECTION, <mp, 0 );
+ m_AttenuatorsSelection->SetSelection( ltmp );
+ m_Config->Read( KEYWORD_BRDCLASS_SELECTION, <mp, 0 );
+ m_BoardClassesUnitsSelector->SetSelection( ltmp );
+ m_Config->Read( KEYWORD_REGUL_R1, &msg, wxT("10") );
+ m_RegulR1Value->SetValue( msg );
+ m_Config->Read( KEYWORD_REGUL_R2, &msg, wxT("10") );
+ m_RegulR2Value->SetValue( msg );
+ m_Config->Read( KEYWORD_REGUL_VREF, &msg, wxT("3") );
+ m_RegulVrefValue->SetValue( msg );
+ m_Config->Read( KEYWORD_REGUL_VOUT, &msg, wxT("12") );
+ m_RegulVoutValue->SetValue( msg );
+
+ for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
+ m_transline_list[ii]->ReadConfig( m_Config );
+ for( unsigned ii = 0; ii < m_attenuator_list.size(); ii++ )
+ m_attenuator_list[ii]->ReadConfig( m_Config );
+}
+
+
+void PCB_CALCULATOR_FRAME::WriteConfig()
+{
+ if( m_Config == NULL )
+ return;
+
+ if( !IsIconized() )
+ {
+ m_FrameSize = GetSize();
+ m_FramePos = GetPosition();
+
+ m_Config->Write( KEYWORD_FRAME_POSX, (long) m_FramePos.x );
+ m_Config->Write( KEYWORD_FRAME_POSY, (long) m_FramePos.y );
+ m_Config->Write( KEYWORD_FRAME_SIZEX, (long) m_FrameSize.x );
+ m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y );
+ }
+ m_Config->Write( KEYWORD_TRANSLINE_SELECTION, (long) m_currTransLineType );
+ m_Config->Write( KEYWORD_PAGE_SELECTION, m_Notebook->GetSelection() );
+ m_Config->Write( KEYWORD_COLORCODE_SELECTION, m_rbToleranceSelection->GetSelection() );
+ m_Config->Write( KEYWORD_ATTENUATORS_SELECTION, m_AttenuatorsSelection->GetSelection());
+ m_Config->Write( KEYWORD_BRDCLASS_SELECTION, m_BoardClassesUnitsSelector->GetSelection() );
+ m_Config->Write( KEYWORD_REGUL_R1, m_RegulR1Value->GetValue() );
+ m_Config->Write( KEYWORD_REGUL_R2, m_RegulR2Value->GetValue() );
+ m_Config->Write( KEYWORD_REGUL_VREF, m_RegulVrefValue->GetValue() );
+ m_Config->Write( KEYWORD_REGUL_VOUT, m_RegulVoutValue->GetValue() );
+
+ for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
+ m_transline_list[ii]->WriteConfig( m_Config );
+ for( unsigned ii = 0; ii < m_attenuator_list.size(); ii++ )
+ m_attenuator_list[ii]->WriteConfig( m_Config );
+}
+
+
+
+/**
+ * Function OnTranslineAnalyse
+ * Run a new analyse for the current transline with current parameters
+ * and displays the electrical parmeters
+ */
+void PCB_CALCULATOR_FRAME::OnTranslineAnalyse( wxCommandEvent& event )
+{
+ if( m_currTransLine )
+ {
+ TransfDlgDataToTranslineParams();
+ m_currTransLine->analyze();
+ }
+}
+
+/**
+ * Function OnTranslineSynthetize
+ * Run a new synthezis for the current transline with current parameters
+ * and displays the geometrical parmeters
+ */
+void PCB_CALCULATOR_FRAME::OnTranslineSynthetize( wxCommandEvent& event )
+{
+ if( m_currTransLine )
+ {
+ TransfDlgDataToTranslineParams();
+ m_currTransLine->synthesize();
+ }
+}
+
+
+void PCB_CALCULATOR_FRAME::OnPaintTranslinePanel( wxPaintEvent& event )
+{
+ wxPaintDC dc( m_panelDisplayshape );
+
+ TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
+ if( tr_ident )
+ {
+ wxSize size = m_panelDisplayshape->GetSize();
+ size.x -= tr_ident->m_Icon->GetWidth();
+ size.y -= tr_ident->m_Icon->GetHeight();
+ dc.DrawBitmap( *tr_ident->m_Icon, size.x / 2, size.y / 2 );
+ }
+
+ event.Skip();
+}
diff --git a/pcb_calculator/regulators_funct.cpp b/pcb_calculator/regulators_funct.cpp
new file mode 100644
index 0000000000..d0d978b443
--- /dev/null
+++ b/pcb_calculator/regulators_funct.cpp
@@ -0,0 +1,118 @@
+/**
+ * @file regulators_funct.cpp
+ */
+/*
+ * 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 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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/config.h"
+
+#include "pcb_calculator.h"
+
+extern double ReturnDoubleFromString( const wxString& TextValue );
+
+void PCB_CALCULATOR_FRAME::OnRegulatorCalcButtonClick( wxCommandEvent& event )
+{
+ RegulatorsSolve();
+}
+
+// Calculate a value from the 3 other values
+// Vref is given by the regulator properties, so
+// we can calculate only R1, R2 or Vout
+void PCB_CALCULATOR_FRAME::RegulatorsSolve()
+{
+ int id;
+ if( m_rbRegulR1->GetValue() )
+ id = 0; // for R1 calculation
+ else if( m_rbRegulR2->GetValue() )
+ id = 1; // for R2 calculation
+ else if( m_rbRegulVout->GetValue() )
+ id = 2; // for Vout calculation
+ else
+ {
+ wxMessageBox( wxT("Selection error" ) );
+ return;
+ }
+
+ double r1, r2, vref, vout;
+
+ wxString txt;
+
+ m_RegulMessage->SetLabel( wxEmptyString);
+
+ // Read values from panel:
+ txt = m_RegulR1Value->GetValue();
+ r1 = ReturnDoubleFromString(txt);
+ txt = m_RegulR2Value->GetValue();
+ r2 = ReturnDoubleFromString(txt);
+ txt = m_RegulVrefValue->GetValue();
+ vref = ReturnDoubleFromString(txt);
+ txt = m_RegulVoutValue->GetValue();
+ vout = ReturnDoubleFromString(txt);
+
+ // Some tests:
+ if( vout < vref && id != 2)
+ {
+ m_RegulMessage->SetLabel( _(" Vout must be greater than vref" ) );
+ return;
+ }
+
+ if( vref == 0.0 )
+ {
+ m_RegulMessage->SetLabel( _(" Vref set to 0 !" ) );
+ return;
+ }
+
+ if( (r1 < 0 && id != 0 ) || (r2 <= 0 && id != 1) )
+ {
+ m_RegulMessage->SetLabel( _("Incorrect value for R1 R2" ) );
+ return;
+ }
+
+ // Calculate
+ switch( id )
+ {
+ case 0:
+ r1 = ( vout / vref - 1 ) * r2;
+ break;
+
+ case 1:
+ r2 = r1 / ( vout / vref - 1);
+ break;
+
+ case 2:
+ vout = vref * (r1 + r2) / r2;
+ break;
+ }
+ // write values to panel:
+ txt.Printf(wxT("%f"), r1);
+ m_RegulR1Value->SetValue(txt);
+ txt.Printf(wxT("%f"), r2);
+ m_RegulR2Value->SetValue(txt);
+ txt.Printf(wxT("%f"), vref);
+ m_RegulVrefValue->SetValue(txt);
+ txt.Printf(wxT("%f"), vout);
+ m_RegulVoutValue->SetValue(txt);
+
+}
+
diff --git a/pcb_calculator/transline/c_microstrip.cpp b/pcb_calculator/transline/c_microstrip.cpp
new file mode 100644
index 0000000000..14722b6aa0
--- /dev/null
+++ b/pcb_calculator/transline/c_microstrip.cpp
@@ -0,0 +1,998 @@
+/*
+ * c_microstrip.cpp - coupled microstrip class implementation
+ *
+ * Copyright (C) 2002 Claudio Girardi
+ * Copyright (C) 2005, 2006 Stefan Jahn
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+/* c_microstrip.c - Puts up window for coupled microstrips and
+ * performs the associated calculations
+ * Based on the original microstrip.c by Gopal Narayanan
+ */
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "microstrip.h"
+#include "c_microstrip.h"
+
+C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE()
+{
+ m_name = "Coupled_MicroStrip";
+ aux_ms = NULL;
+}
+
+
+C_MICROSTRIP::~C_MICROSTRIP()
+{
+ if( aux_ms )
+ delete aux_ms;
+}
+
+
+/*
+ * delta_u_thickness_single() computes the thickness effect on
+ * normalized width for a single microstrip line
+ *
+ * References: H. A. Atwater, "Simplified Design Equations for
+ * Microstrip Line Parameters", Microwave Journal, pp. 109-115,
+ * November 1989.
+ */
+double C_MICROSTRIP::delta_u_thickness_single( double u, double t_h )
+{
+ double delta_u;
+
+ if( t_h > 0.0 )
+ {
+ delta_u =
+ (1.25 * t_h /
+ M_PI) *
+ ( 1.0 +
+ log( ( 2.0 +
+ (4.0 * M_PI * u -
+ 2.0) / ( 1.0 + exp( -100.0 * ( u - 1.0 / (2.0 * M_PI) ) ) ) ) / t_h ) );
+ }
+ else
+ {
+ delta_u = 0.0;
+ }
+ return delta_u;
+}
+
+
+/*
+ * delta_u_thickness() - compute the thickness effect on normalized
+ * width for coupled microstrips
+ *
+ * References: Rolf Jansen, "High-Speed Computation of Single and
+ * Coupled Microstrip Parameters Including Dispersion, High-Order
+ * Modes, Loss and Finite Strip Thickness", IEEE Trans. MTT, vol. 26,
+ * no. 2, pp. 75-82, Feb. 1978
+ */
+void C_MICROSTRIP::delta_u_thickness()
+{
+ double e_r, u, g, t_h;
+ double delta_u, delta_t, delta_u_e, delta_u_o;
+
+ e_r = er;
+ u = w / h; /* normalized line width */
+ g = s / h; /* normalized line spacing */
+ t_h = t / h; /* normalized strip thickness */
+
+ if( t_h > 0.0 )
+ {
+ /* single microstrip correction for finite strip thickness */
+ delta_u = delta_u_thickness_single( u, t_h );
+ delta_t = t_h / (g * e_r);
+ /* thickness correction for the even- and odd-mode */
+ delta_u_e = delta_u * ( 1.0 - 0.5 * exp( -0.69 * delta_u / delta_t ) );
+ delta_u_o = delta_u_e + delta_t;
+ }
+ else
+ {
+ delta_u_e = delta_u_o = 0.0;
+ }
+
+ w_t_e = w + delta_u_e * h;
+ w_t_o = w + delta_u_o * h;
+}
+
+
+/*
+ * compute various parameters for a single line
+ */
+void C_MICROSTRIP::compute_single_line()
+{
+ double w_h, ht_h;
+ double Z0_single, er_eff_single;
+
+ ht_h = ht / h;
+ w_h = w / h;
+
+ if( aux_ms == NULL )
+ aux_ms = new MICROSTRIP();
+
+ /* prepare parameters for single microstrip computations */
+ aux_ms->er = er;
+ aux_ms->w = w;
+ aux_ms->h = h;
+ aux_ms->t = 0.0;
+
+ //aux_ms->t = t;
+ aux_ms->ht = 1e12; /* arbitrarily high */
+ aux_ms->f = f;
+ aux_ms->murC = murC;
+ aux_ms->microstrip_Z0();
+ aux_ms->dispersion();
+
+ er_eff_single = aux_ms->er_eff_0;
+ Z0_single = aux_ms->Z0_0;
+}
+
+
+/*
+ * filling_factor_even() - compute the filling factor for the coupled
+ * microstrips even-mode without cover and zero conductor thickness
+ */
+double C_MICROSTRIP::filling_factor_even( double u, double g, double e_r )
+{
+ double v, v3, v4, a_e, b_e, q_inf;
+
+ v = u * (20.0 + g * g) / (10.0 + g * g) + g* exp( -g );
+ v3 = v * v * v;
+ v4 = v3 * v;
+ a_e = 1.0 + log( (v4 + v * v / 2704.0) / (v4 + 0.432) ) / 49.0 + log( 1.0 + v3 / 5929.741 )
+ / 18.7;
+ b_e = 0.564 * pow( ( (e_r - 0.9) / (e_r + 3.0) ), 0.053 );
+
+ /* filling factor, with width corrected for thickness */
+ q_inf = pow( (1.0 + 10.0 / v), -a_e * b_e );
+
+ return q_inf;
+}
+
+
+/**
+ * filling_factor_odd() - compute the filling factor for the coupled
+ * microstrips odd-mode without cover and zero conductor thickness
+ */
+double C_MICROSTRIP::filling_factor_odd( double u, double g, double e_r )
+{
+ double b_o, c_o, d_o, q_inf;
+
+ b_o = 0.747 * e_r / (0.15 + e_r);
+ c_o = b_o - (b_o - 0.207) * exp( -0.414 * u );
+ d_o = 0.593 + 0.694 * exp( -0.562 * u );
+
+ /* filling factor, with width corrected for thickness */
+ q_inf = exp( -c_o * pow( g, d_o ) );
+
+ return q_inf;
+}
+
+
+/*
+ * delta_q_cover_even() - compute the cover effect on filling factor
+ * for the even-mode
+ */
+double C_MICROSTRIP::delta_q_cover_even( double h2h )
+{
+ double q_c;
+
+ if( h2h <= 39 )
+ {
+ q_c = tanh( 1.626 + 0.107 * h2h - 1.733 / sqrt( h2h ) );
+ }
+ else
+ {
+ q_c = 1.0;
+ }
+
+ return q_c;
+}
+
+
+/*
+ * delta_q_cover_odd() - compute the cover effect on filling factor
+ * for the odd-mode
+ */
+double C_MICROSTRIP::delta_q_cover_odd( double h2h )
+{
+ double q_c;
+
+ if( h2h <= 7 )
+ {
+ q_c = tanh( 9.575 / (7.0 - h2h) - 2.965 + 1.68 * h2h - 0.311 * h2h * h2h );
+ }
+ else
+ {
+ q_c = 1.0;
+ }
+
+ return q_c;
+}
+
+
+/**
+ * er_eff_static() - compute the static effective dielectric constants
+ *
+ * References: Manfred Kirschning and Rolf Jansen, "Accurate
+ * Wide-Range Design Equations for the Frequency-Dependent
+ * Characteristic of Parallel Coupled Microstrip Lines", IEEE
+ * Trans. MTT, vol. 32, no. 1, Jan. 1984
+ */
+void C_MICROSTRIP::er_eff_static()
+{
+ double u_t_e, u_t_o, g, h2, h2h;
+ double a_o, t_h, q, q_c, q_t, q_inf;
+ double er_eff_single;
+
+ /* compute zero-thickness single line parameters */
+ compute_single_line();
+ er_eff_single = aux_ms->er_eff_0;
+
+ h2 = ht;
+ u_t_e = w_t_e / h; /* normalized even_mode line width */
+ u_t_o = w_t_o / h; /* normalized odd_mode line width */
+ g = s / h; /* normalized line spacing */
+ h2h = h2 / h; /* normalized cover height */
+ t_h = t / h; /* normalized strip thickness */
+
+ /* filling factor, computed with thickness corrected width */
+ q_inf = filling_factor_even( u_t_e, g, er );
+ /* cover effect */
+ q_c = delta_q_cover_even( h2h );
+ /* thickness effect */
+ q_t = aux_ms->delta_q_thickness( u_t_e, t_h );
+ /* resultant filling factor */
+ q = (q_inf - q_t) * q_c;
+ /* static even-mode effective dielectric constant */
+ er_eff_e_0 = 0.5 * (er + 1.0) + 0.5 * (er - 1.0) * q;
+
+ /* filling factor, with width corrected for thickness */
+ q_inf = filling_factor_odd( u_t_o, g, er );
+ /* cover effect */
+ q_c = delta_q_cover_odd( h2h );
+ /* thickness effect */
+ q_t = aux_ms->delta_q_thickness( u_t_o, t_h );
+ /* resultant filling factor */
+ q = (q_inf - q_t) * q_c;
+
+ a_o = 0.7287 * ( er_eff_single - 0.5 * (er + 1.0) ) * ( 1.0 - exp( -0.179 * u_t_o ) );
+
+ /* static odd-mode effective dielectric constant */
+ er_eff_o_0 = (0.5 * (er + 1.0) + a_o - er_eff_single) * q + er_eff_single;
+}
+
+
+/**
+ * delta_Z0_even_cover() - compute the even-mode impedance correction
+ * for a homogeneous microstrip due to the cover
+ *
+ * References: S. March, "Microstrip Packaging: Watch the Last Step",
+ * Microwaves, vol. 20, no. 13, pp. 83.94, Dec. 1981.
+ */
+double C_MICROSTRIP::delta_Z0_even_cover( double g, double u, double h2h )
+{
+ double f_e, g_e, delta_Z0_even;
+ double x, y, A, B, C, D, E, F;
+
+ A = -4.351 / pow( 1.0 + h2h, 1.842 );
+ B = 6.639 / pow( 1.0 + h2h, 1.861 );
+ C = -2.291 / pow( 1.0 + h2h, 1.90 );
+ f_e = 1.0 - atanh( A + (B + C * u) * u );
+
+ x = pow( 10.0, 0.103 * g - 0.159 );
+ y = pow( 10.0, 0.0492 * g - 0.073 );
+ D = 0.747 / sin( 0.5 * M_PI * x );
+ E = 0.725 * sin( 0.5 * M_PI * y );
+ F = pow( 10.0, 0.11 - 0.0947 * g );
+ g_e = 270.0 * ( 1.0 - tanh( D + E * sqrt( 1.0 + h2h ) - F / (1.0 + h2h) ) );
+
+ delta_Z0_even = f_e * g_e;
+
+ return delta_Z0_even;
+}
+
+
+/**
+ * delta_Z0_odd_cover() - compute the odd-mode impedance correction
+ * for a homogeneous microstrip due to the cover
+ *
+ * References: S. March, "Microstrip Packaging: Watch the Last Step",
+ * Microwaves, vol. 20, no. 13, pp. 83.94, Dec. 1981.
+ */
+double C_MICROSTRIP::delta_Z0_odd_cover( double g, double u, double h2h )
+{
+ double f_o, g_o, delta_Z0_odd;
+ double G, J, K, L;
+
+ J = tanh( pow( 1.0 + h2h, 1.585 ) / 6.0 );
+ f_o = pow( u, J );
+
+ G = 2.178 - 0.796 * g;
+ if( g > 0.858 )
+ {
+ K = log10( 20.492 * pow( g, 0.174 ) );
+ }
+ else
+ {
+ K = 1.30;
+ }
+ if( g > 0.873 )
+ {
+ L = 2.51 * pow( g, -0.462 );
+ }
+ else
+ {
+ L = 2.674;
+ }
+ g_o = 270.0 * ( 1.0 - tanh( G + K * sqrt( 1.0 + h2h ) - L / (1.0 + h2h) ) );
+
+ delta_Z0_odd = f_o * g_o;
+
+ return delta_Z0_odd;
+}
+
+
+/**
+ * Z0_even_odd() - compute the static even- and odd-mode static
+ * impedances
+ *
+ * References: Manfred Kirschning and Rolf Jansen, "Accurate
+ * Wide-Range Design Equations for the Frequency-Dependent
+ * Characteristic of Parallel Coupled Microstrip Lines", IEEE
+ * Trans. MTT, vol. 32, no. 1, Jan. 1984
+ */
+void C_MICROSTRIP::Z0_even_odd()
+{
+ double er_eff, h2, u_t_e, u_t_o, g, h2h;
+ double Q_1, Q_2, Q_3, Q_4, Q_5, Q_6, Q_7, Q_8, Q_9, Q_10;
+ double delta_Z0_e_0, delta_Z0_o_0, Z0_single, er_eff_single;
+
+ h2 = ht;
+ u_t_e = w_t_e / h; /* normalized even-mode line width */
+ u_t_o = w_t_o / h; /* normalized odd-mode line width */
+ g = s / h; /* normalized line spacing */
+ h2h = h2 / h; /* normalized cover height */
+
+ Z0_single = aux_ms->Z0_0;
+ er_eff_single = aux_ms->er_eff_0;
+
+ /* even-mode */
+ er_eff = er_eff_e_0;
+ Q_1 = 0.8695 * pow( u_t_e, 0.194 );
+ Q_2 = 1.0 + 0.7519 * g + 0.189 * pow( g, 2.31 );
+ Q_3 = 0.1975 +
+ pow( ( 16.6 +
+ pow( (8.4 / g),
+ 6.0 ) ),
+ -0.387 ) + log( pow( g, 10.0 ) / ( 1.0 + pow( g / 3.4, 10.0 ) ) ) / 241.0;
+ Q_4 = 2.0 * Q_1 /
+ ( Q_2 * ( exp( -g ) * pow( u_t_e, Q_3 ) + ( 2.0 - exp( -g ) ) * pow( u_t_e, -Q_3 ) ) );
+ /* static even-mode impedance */
+ Z0_e_0 = Z0_single *
+ sqrt( er_eff_single / er_eff ) / (1.0 - sqrt( er_eff_single ) * Q_4 * Z0_single / ZF0);
+ /* correction for cover */
+ delta_Z0_e_0 = delta_Z0_even_cover( g, u_t_e, h2h ) / sqrt( er_eff );
+
+ Z0_e_0 = Z0_e_0 - delta_Z0_e_0;
+
+ /* odd-mode */
+ er_eff = er_eff_o_0;
+ Q_5 = 1.794 + 1.14 * log( 1.0 + 0.638 / ( g + 0.517 * pow( g, 2.43 ) ) );
+ Q_6 = 0.2305 + log( pow( g, 10.0 ) / ( 1.0 + pow( g / 5.8, 10.0 ) ) ) / 281.3 + log(
+ 1.0 + 0.598 * pow( g, 1.154 ) ) / 5.1;
+ Q_7 = (10.0 + 190.0 * g * g) / (1.0 + 82.3 * g * g * g);
+ Q_8 = exp( -6.5 - 0.95 * log( g ) - pow( g / 0.15, 5.0 ) );
+ Q_9 = log( Q_7 ) * (Q_8 + 1.0 / 16.5);
+ Q_10 = ( Q_2 * Q_4 - Q_5 * exp( log( u_t_o ) * Q_6 * pow( u_t_o, -Q_9 ) ) ) / Q_2;
+
+ /* static odd-mode impedance */
+ Z0_o_0 = Z0_single *
+ sqrt( er_eff_single /
+ er_eff ) / (1.0 - sqrt( er_eff_single ) * Q_10 * Z0_single / ZF0);
+ /* correction for cover */
+ delta_Z0_o_0 = delta_Z0_odd_cover( g, u_t_o, h2h ) / sqrt( er_eff );
+
+ Z0_o_0 = Z0_o_0 - delta_Z0_o_0;
+}
+
+
+/*
+ * er_eff_freq() - compute er_eff as a function of frequency
+ */
+void C_MICROSTRIP::er_eff_freq()
+{
+ double P_1, P_2, P_3, P_4, P_5, P_6, P_7;
+ double P_8, P_9, P_10, P_11, P_12, P_13, P_14, P_15;
+ double F_e, F_o;
+ double er_eff, u, g, f_n;
+
+ u = w / h; /* normalize line width */
+ g = s / h; /* normalize line spacing */
+
+ /* normalized frequency [GHz * mm] */
+ f_n = f * h / 1e06;
+
+ er_eff = er_eff_e_0;
+ P_1 = 0.27488 + ( 0.6315 + 0.525 / pow( 1.0 + 0.0157 * f_n, 20.0 ) ) * u - 0.065683 * exp(
+ -8.7513 * u );
+ P_2 = 0.33622 * ( 1.0 - exp( -0.03442 * er ) );
+ P_3 = 0.0363 * exp( -4.6 * u ) * ( 1.0 - exp( -pow( f_n / 38.7, 4.97 ) ) );
+ P_4 = 1.0 + 2.751 * ( 1.0 - exp( -pow( er / 15.916, 8.0 ) ) );
+ P_5 = 0.334 * exp( -3.3 * pow( er / 15.0, 3.0 ) ) + 0.746;
+ P_6 = P_5 * exp( -pow( f_n / 18.0, 0.368 ) );
+ P_7 = 1.0 +
+ 4.069* P_6* pow( g, 0.479 ) * exp( -1.347 * pow( g, 0.595 ) - 0.17 * pow( g, 2.5 ) );
+
+ F_e = P_1 * P_2 * pow( (P_3 * P_4 + 0.1844 * P_7) * f_n, 1.5763 );
+ /* even-mode effective dielectric constant */
+ er_eff_e = er - (er - er_eff) / (1.0 + F_e);
+
+ er_eff = er_eff_o_0;
+ P_8 = 0.7168 * ( 1.0 + 1.076 / ( 1.0 + 0.0576 * (er - 1.0) ) );
+ P_9 = P_8 - 0.7913 *
+ ( 1.0 - exp( -pow( f_n / 20.0, 1.424 ) ) ) * atan( 2.481 * pow( er / 8.0, 0.946 ) );
+ P_10 = 0.242 * pow( er - 1.0, 0.55 );
+ P_11 = 0.6366 * (exp( -0.3401 * f_n ) - 1.0) * atan( 1.263 * pow( u / 3.0, 1.629 ) );
+ P_12 = P_9 + (1.0 - P_9) / ( 1.0 + 1.183 * pow( u, 1.376 ) );
+ P_13 = 1.695 * P_10 / (0.414 + 1.605 * P_10);
+ P_14 = 0.8928 + 0.1072 * ( 1.0 - exp( -0.42 * pow( f_n / 20.0, 3.215 ) ) );
+ P_15 = fabs( 1.0 - 0.8928 * (1.0 + P_11) * P_12 * exp( -P_13 * pow( g, 1.092 ) ) / P_14 );
+
+ F_o = P_1 * P_2 * pow( (P_3 * P_4 + 0.1844) * f_n * P_15, 1.5763 );
+ /* odd-mode effective dielectric constant */
+ er_eff_o = er - (er - er_eff) / (1.0 + F_o);
+}
+
+
+/*
+ * conductor_losses() - compute microstrips conductor losses per unit
+ * length
+ */
+void C_MICROSTRIP::conductor_losses()
+{
+ double e_r_eff_e_0, e_r_eff_o_0, Z0_h_e, Z0_h_o, delta;
+ double K, R_s, Q_c_e, Q_c_o, alpha_c_e, alpha_c_o;
+
+ e_r_eff_e_0 = er_eff_e_0;
+ e_r_eff_o_0 = er_eff_o_0;
+ Z0_h_e = Z0_e_0 * sqrt( e_r_eff_e_0 ); /* homogeneous stripline impedance */
+ Z0_h_o = Z0_o_0 * sqrt( e_r_eff_o_0 ); /* homogeneous stripline impedance */
+ delta = skindepth;
+
+ if( f > 0.0 )
+ {
+ /* current distribution factor (same for the two modes) */
+ K = exp( -1.2 * pow( (Z0_h_e + Z0_h_o) / (2.0 * ZF0), 0.7 ) );
+ /* skin resistance */
+ R_s = 1.0 / (sigma * delta);
+ /* correction for surface roughness */
+ R_s *= 1.0 + ( (2.0 / M_PI) * atan( 1.40 * pow( (rough / delta), 2.0 ) ) );
+
+ /* even-mode strip inductive quality factor */
+ Q_c_e = (M_PI * Z0_h_e * w * f) / (R_s * C0 * K);
+ /* even-mode losses per unith length */
+ alpha_c_e = ( 20.0 * M_PI / log( 10.0 ) ) * f * sqrt( e_r_eff_e_0 ) / (C0 * Q_c_e);
+
+ /* odd-mode strip inductive quality factor */
+ Q_c_o = (M_PI * Z0_h_o * w * f) / (R_s * C0 * K);
+ /* odd-mode losses per unith length */
+ alpha_c_o = ( 20.0 * M_PI / log( 10.0 ) ) * f * sqrt( e_r_eff_o_0 ) / (C0 * Q_c_o);
+ }
+ else
+ {
+ alpha_c_e = alpha_c_o = 0.0;
+ }
+
+ atten_cond_e = alpha_c_e * l;
+ atten_cond_o = alpha_c_o * l;
+}
+
+
+/*
+ * dielectric_losses() - compute microstrips dielectric losses per
+ * unit length
+ */
+void C_MICROSTRIP::dielectric_losses()
+{
+ double e_r, e_r_eff_e_0, e_r_eff_o_0;
+ double alpha_d_e, alpha_d_o;
+
+ e_r = er;
+ e_r_eff_e_0 = er_eff_e_0;
+ e_r_eff_o_0 = er_eff_o_0;
+
+ alpha_d_e =
+ ( 20.0 * M_PI /
+ log( 10.0 ) ) *
+ (f / C0) * ( e_r / sqrt( e_r_eff_e_0 ) ) * ( (e_r_eff_e_0 - 1.0) / (e_r - 1.0) ) * tand;
+ alpha_d_o =
+ ( 20.0 * M_PI /
+ log( 10.0 ) ) *
+ (f / C0) * ( e_r / sqrt( e_r_eff_o_0 ) ) * ( (e_r_eff_o_0 - 1.0) / (e_r - 1.0) ) * tand;
+
+ atten_dielectric_e = alpha_d_e * l;
+ atten_dielectric_o = alpha_d_o * l;
+}
+
+
+/*
+ * c_microstrip_attenuation() - compute attenuation of coupled
+ * microstrips
+ */
+void C_MICROSTRIP::attenuation()
+{
+ skindepth = skin_depth();
+ conductor_losses();
+ dielectric_losses();
+}
+
+
+/*
+ * line_angle() - calculate strips electrical lengths in radians
+ */
+void C_MICROSTRIP::line_angle()
+{
+ double e_r_eff_e, e_r_eff_o;
+ double v_e, v_o, lambda_g_e, lambda_g_o;
+
+ e_r_eff_e = er_eff_e;
+ e_r_eff_o = er_eff_o;
+
+ /* even-mode velocity */
+ v_e = C0 / sqrt( e_r_eff_e );
+ /* odd-mode velocity */
+ v_o = C0 / sqrt( e_r_eff_o );
+ /* even-mode wavelength */
+ lambda_g_e = v_e / f;
+ /* odd-mode wavelength */
+ lambda_g_o = v_o / f;
+ /* electrical angles */
+ ang_l_e = 2.0 * M_PI * l / lambda_g_e; /* in radians */
+ ang_l_o = 2.0 * M_PI * l / lambda_g_o; /* in radians */
+}
+
+
+void C_MICROSTRIP::syn_err_fun( double* f1,
+ double* f2,
+ double s_h,
+ double w_h,
+ double e_r,
+ double w_h_se,
+ double w_h_so )
+{
+ double g, h;
+
+ g = cosh( 0.5 * M_PI * s_h );
+ h = cosh( M_PI * w_h + 0.5 * M_PI * s_h );
+
+ *f1 = (2.0 / M_PI) * acosh( (2.0 * h - g + 1.0) / (g + 1.0) );
+ *f2 = (2.0 / M_PI) * acosh( (2.0 * h - g - 1.0) / (g - 1.0) );
+ if( e_r <= 6.0 )
+ {
+ *f2 += ( 4.0 / ( M_PI * (1.0 + e_r / 2.0) ) ) * acosh( 1.0 + 2.0 * w_h / s_h );
+ }
+ else
+ {
+ *f2 += (1.0 / M_PI) * acosh( 1.0 + 2.0 * w_h / s_h );
+ }
+ *f1 -= w_h_se;
+ *f2 -= w_h_so;
+}
+
+
+/*
+ * synth_width - calculate widths given Z0 and e_r
+ * from Akhtarzad S. et al., "The design of coupled microstrip lines",
+ * IEEE Trans. MTT-23, June 1975 and
+ * Hinton, J.H., "On design of coupled microstrip lines", IEEE Trans.
+ * MTT-28, March 1980
+ */
+void C_MICROSTRIP::synth_width()
+{
+ double Z0, e_r;
+ double w_h_se, w_h_so, w_h, a, ce, co, s_h;
+ double f1, f2, ft1, ft2, j11, j12, j21, j22, d_s_h, d_w_h, err;
+ double eps = 1e-04;
+
+ f1 = f2 = 0;
+ e_r = er;
+
+ Z0 = Z0e / 2.0;
+ /* Wheeler formula for single microstrip synthesis */
+ a = exp( Z0 * sqrt( e_r + 1.0 ) / 42.4 ) - 1.0;
+ w_h_se = 8.0 * sqrt( a * ( (7.0 + 4.0 / e_r) / 11.0 ) + ( (1.0 + 1.0 / e_r) / 0.81 ) ) / a;
+
+ Z0 = Z0o / 2.0;
+ /* Wheeler formula for single microstrip synthesis */
+ a = exp( Z0 * sqrt( e_r + 1.0 ) / 42.4 ) - 1.0;
+ w_h_so = 8.0 * sqrt( a * ( (7.0 + 4.0 / e_r) / 11.0 ) + ( (1.0 + 1.0 / e_r) / 0.81 ) ) / a;
+
+ ce = cosh( 0.5 * M_PI * w_h_se );
+ co = cosh( 0.5 * M_PI * w_h_so );
+ /* first guess at s/h */
+ s_h = (2.0 / M_PI) * acosh( (ce + co - 2.0) / (co - ce) );
+ /* first guess at w/h */
+ w_h = acosh( (ce * co - 1.0) / (co - ce) ) / M_PI - s_h / 2.0;
+
+ s = s_h * h;
+ w = w_h * h;
+
+ syn_err_fun( &f1, &f2, s_h, w_h, e_r, w_h_se, w_h_so );
+
+ /* rather crude Newton-Rhapson; we need this beacuse the estimate of */
+ /* w_h is often quite far from the true value (see Akhtarzad S. et al.) */
+ do {
+ /* compute Jacobian */
+ syn_err_fun( &ft1, &ft2, s_h + eps, w_h, e_r, w_h_se, w_h_so );
+ j11 = (ft1 - f1) / eps;
+ j21 = (ft2 - f2) / eps;
+ syn_err_fun( &ft1, &ft2, s_h, w_h + eps, e_r, w_h_se, w_h_so );
+ j12 = (ft1 - f1) / eps;
+ j22 = (ft2 - f2) / eps;
+
+ /* compute next step */
+ d_s_h = (-f1 * j22 + f2 * j12) / (j11 * j22 - j21 * j12);
+ d_w_h = (-f2 * j11 + f1 * j21) / (j11 * j22 - j21 * j12);
+
+ //g_print("j11 = %e\tj12 = %e\tj21 = %e\tj22 = %e\n", j11, j12, j21, j22);
+ //g_print("det = %e\n", j11*j22 - j21*j22);
+ //g_print("d_s_h = %e\td_w_h = %e\n", d_s_h, d_w_h);
+
+ s_h += d_s_h;
+ w_h += d_w_h;
+
+ /* chech the error */
+ syn_err_fun( &f1, &f2, s_h, w_h, e_r, w_h_se, w_h_so );
+
+ err = sqrt( f1 * f1 + f2 * f2 );
+ /* converged ? */
+ } while( err > 1e-04 );
+
+
+ s = s_h * h;
+ w = w_h * h;
+}
+
+
+/*
+ * Z0_dispersion() - calculate frequency dependency of characteristic
+ * impedances
+ */
+void C_MICROSTRIP::Z0_dispersion()
+{
+ double Q_0;
+ double Q_11, Q_12, Q_13, Q_14, Q_15, Q_16, Q_17, Q_18, Q_19, Q_20, Q_21;
+ double Q_22, Q_23, Q_24, Q_25, Q_26, Q_27, Q_28, Q_29;
+ double r_e, q_e, p_e, d_e, C_e;
+ double e_r_eff_o_f, e_r_eff_o_0;
+ double e_r_eff_single_f, e_r_eff_single_0, Z0_single_f;
+ double f_n, g, u, e_r;
+ double R_1, R_2, R_7, R_10, R_11, R_12, R_15, R_16, tmpf;
+
+ e_r = er;
+
+ u = w / h; /* normalize line width */
+ g = s / h; /* normalize line spacing */
+
+ /* normalized frequency [GHz * mm] */
+ f_n = f * h / 1e06;
+
+ e_r_eff_single_f = aux_ms->er_eff;
+ e_r_eff_single_0 = aux_ms->er_eff_0;
+ Z0_single_f = aux_ms->Z0;
+
+ e_r_eff_o_f = er_eff_o;
+ e_r_eff_o_0 = er_eff_o_0;
+
+ Q_11 = 0.893 * ( 1.0 - 0.3 / ( 1.0 + 0.7 * (e_r - 1.0) ) );
+ Q_12 = 2.121 * ( pow( f_n / 20.0, 4.91 ) / ( 1.0 + Q_11 * pow( f_n / 20.0, 4.91 ) ) ) * exp(
+ -2.87 * g ) * pow( g, 0.902 );
+ Q_13 = 1.0 + 0.038 * pow( e_r / 8.0, 5.1 );
+ Q_14 = 1.0 + 1.203 * pow( e_r / 15.0, 4.0 ) / ( 1.0 + pow( e_r / 15.0, 4.0 ) );
+ Q_15 = 1.887 *
+ exp( -1.5 *
+ pow( g,
+ 0.84 ) ) *
+ pow( g,
+ Q_14 ) /
+ ( 1.0 + 0.41 *
+ pow( f_n / 15.0, 3.0 ) * pow( u, 2.0 / Q_13 ) / ( 0.125 + pow( u, 1.626 / Q_13 ) ) );
+ Q_16 = ( 1.0 + 9.0 / ( 1.0 + 0.403 * pow( e_r - 1.0, 2 ) ) ) * Q_15;
+ Q_17 = 0.394 *
+ ( 1.0 -
+ exp( -1.47 * pow( u / 7.0, 0.672 ) ) ) * ( 1.0 - exp( -4.25 * pow( f_n / 20.0, 1.87 ) ) );
+ Q_18 = 0.61 * ( 1.0 - exp( -2.13 * pow( u / 8.0, 1.593 ) ) ) / ( 1.0 + 6.544 * pow( g, 4.17 ) );
+ Q_19 = 0.21 * g * g * g * g /
+ ( ( 1.0 + 0.18 * pow( g, 4.9 ) ) * (1.0 + 0.1 * u * u) * ( 1.0 + pow( f_n / 24.0, 3.0 ) ) );
+ Q_20 = ( 0.09 + 1.0 / ( 1.0 + 0.1 * pow( e_r - 1, 2.7 ) ) ) * Q_19;
+ Q_21 =
+ fabs( 1.0 - 42.54 *
+ pow( g, 0.133 ) * exp( -0.812 * g ) * pow( u, 2.5 ) / ( 1.0 + 0.033 * pow( u, 2.5 ) ) );
+
+ r_e = pow( f_n / 28.843, 12 );
+ q_e = 0.016 + pow( 0.0514 * e_r * Q_21, 4.524 );
+ p_e = 4.766 * exp( -3.228 * pow( u, 0.641 ) );
+ d_e = 5.086 * q_e *
+ ( r_e /
+ (0.3838 + 0.386 *
+ q_e) ) *
+ ( exp( -22.2 *
+ pow( u,
+ 1.92 ) ) /
+ (1.0 + 1.2992 * r_e) ) * ( pow( e_r - 1.0, 6.0 ) / ( 1.0 + 10 * pow( e_r - 1.0, 6.0 ) ) );
+ C_e = 1.0 + 1.275 *
+ ( 1.0 -
+ exp( -0.004625 * p_e *
+ pow( e_r,
+ 1.674 ) * pow( f_n / 18.365, 2.745 ) ) ) - Q_12 + Q_16 - Q_17 + Q_18 + Q_20;
+
+
+ R_1 = 0.03891 * pow( e_r, 1.4 );
+ R_2 = 0.267 * pow( u, 7.0 );
+ R_7 = 1.206 - 0.3144 * exp( -R_1 ) * ( 1.0 - exp( -R_2 ) );
+ R_10 = 0.00044 * pow( e_r, 2.136 ) + 0.0184;
+ tmpf = pow( f_n / 19.47, 6.0 );
+ R_11 = tmpf / (1.0 + 0.0962 * tmpf);
+ R_12 = 1.0 / (1.0 + 0.00245 * u * u);
+ R_15 = 0.707* R_10* pow( f_n / 12.3, 1.097 );
+ R_16 = 1.0 + 0.0503 * e_r * e_r * R_11 * ( 1.0 - exp( -pow( u / 15.0, 6.0 ) ) );
+ Q_0 = R_7 * ( 1.0 - 1.1241 * (R_12 / R_16) * exp( -0.026 * pow( f_n, 1.15656 ) - R_15 ) );
+
+ /* even-mode frequency-dependent characteristic impedances */
+ Z0e = Z0_e_0 * pow( 0.9408 * pow( e_r_eff_single_f, C_e ) - 0.9603, Q_0 ) / pow(
+ (0.9408 - d_e) * pow( e_r_eff_single_0, C_e ) - 0.9603, Q_0 );
+
+ Q_29 = 15.16 / ( 1.0 + 0.196 * pow( e_r - 1.0, 2.0 ) );
+ tmpf = pow( e_r - 1.0, 3.0 );
+ Q_28 = 0.149 * tmpf / (94.5 + 0.038 * tmpf);
+ tmpf = pow( e_r - 1.0, 1.5 );
+ Q_27 = 0.4 * pow( g, 0.84 ) * ( 1.0 + 2.5 * tmpf / (5.0 + tmpf) );
+ tmpf = pow( (e_r - 1.0) / 13.0, 12.0 );
+ Q_26 = 30.0 - 22.2 * ( tmpf / (1.0 + 3.0 * tmpf) ) - Q_29;
+ tmpf = (e_r - 1.0) * (e_r - 1.0);
+ Q_25 = ( 0.3 * f_n * f_n / (10.0 + f_n * f_n) ) * ( 1.0 + 2.333 * tmpf / (5.0 + tmpf) );
+ Q_24 =
+ 2.506* Q_28* pow( u,
+ 0.894 ) *
+ pow( (1.0 + 1.3 * u) * f_n / 99.25, 4.29 ) / ( 3.575 + pow( u, 0.894 ) );
+ Q_23 = 1.0 + 0.005 * f_n * Q_27 /
+ ( ( 1.0 + 0.812 * pow( f_n / 15.0, 1.9 ) ) * (1.0 + 0.025 * u * u) );
+ Q_22 = 0.925 * pow( f_n / Q_26, 1.536 ) / ( 1.0 + 0.3 * pow( f_n / 30.0, 1.536 ) );
+
+ /* odd-mode frequency-dependent characteristic impedances */
+ Z0o = Z0_single_f +
+ (Z0_o_0 *
+ pow( e_r_eff_o_f / e_r_eff_o_0,
+ Q_22 ) - Z0_single_f * Q_23) / (1.0 + Q_24 + pow( 0.46 * g, 2.2 ) * Q_25);
+}
+
+
+void C_MICROSTRIP::calc()
+{
+ /* compute thickness corrections */
+ delta_u_thickness();
+ /* get effective dielectric constants */
+ er_eff_static();
+ /* impedances for even- and odd-mode */
+ Z0_even_odd();
+ /* calculate freq dependence of er_eff_e, er_eff_o */
+ er_eff_freq();
+ /* calculate frequency dependence of Z0e, Z0o */
+ Z0_dispersion();
+ /* calculate losses */
+ attenuation();
+ /* calculate electrical lengths */
+ line_angle();
+}
+
+
+/*
+ * get_microstrip_sub
+ * get and assign microstrip substrate parameters
+ * into microstrip structure
+ */
+void C_MICROSTRIP::get_c_microstrip_sub()
+{
+ er = getProperty( EPSILONR_PRM );
+ murC = getProperty( MURC_PRM );
+ h = getProperty( H_PRM );
+ ht = getProperty( H_T_PRM );
+ t = getProperty( T_PRM );
+ sigma = 1.0/getProperty( RHO_PRM );
+ tand = getProperty( TAND_PRM );
+ rough = getProperty( ROUGH_PRM );
+}
+
+
+/*
+ * get_c_microstrip_comp
+ * get and assign microstrip component parameters
+ * into microstrip structure
+ */
+void C_MICROSTRIP::get_c_microstrip_comp()
+{
+ f = getProperty( FREQUENCY_PRM );
+}
+
+
+/*
+ * get_c_microstrip_elec
+ * get and assign microstrip electrical parameters
+ * into microstrip structure
+ */
+void C_MICROSTRIP::get_c_microstrip_elec()
+{
+ Z0e = getProperty( Z0_E_PRM );
+ Z0o = getProperty( Z0_O_PRM );
+ ang_l_e = getProperty( ANG_L_PRM );
+ ang_l_o = getProperty( ANG_L_PRM );
+}
+
+
+/*
+ * get_c_microstrip_phys
+ * get and assign microstrip physical parameters
+ * into microstrip structure
+ */
+void C_MICROSTRIP::get_c_microstrip_phys()
+{
+ w = getProperty( PHYS_WIDTH_PRM );
+ s = getProperty( PHYS_S_PRM );
+ l = getProperty( PHYS_LEN_PRM );
+}
+
+
+void C_MICROSTRIP::show_results()
+{
+ setProperty( Z0_E_PRM, Z0e );
+ setProperty( Z0_O_PRM , Z0o );
+ setProperty( ANG_L_PRM, sqrt( ang_l_e * ang_l_o ) );
+
+ setResult( 0, er_eff_e, "" );
+ setResult( 1, er_eff_o, "" );
+ setResult( 2, atten_cond_e, "dB" );
+ setResult( 3, atten_cond_o, "dB" );
+ setResult( 4, atten_dielectric_e, "dB" );
+ setResult( 5, atten_dielectric_o, "dB" );
+
+ setResult( 6, skindepth / UNIT_MICRON, "µm" );
+}
+
+
+/*
+ * analysis function
+ */
+void C_MICROSTRIP::analyze()
+{
+ /* Get and assign substrate parameters */
+ get_c_microstrip_sub();
+ /* Get and assign component parameters */
+ get_c_microstrip_comp();
+ /* Get and assign physical parameters */
+ get_c_microstrip_phys();
+
+ /* compute coupled microstrip parameters */
+ calc();
+ /* print results in the subwindow */
+ show_results();
+}
+
+
+void C_MICROSTRIP::syn_fun( double* f1,
+ double* f2,
+ double s_h,
+ double w_h,
+ double Z0_e,
+ double Z0_o )
+{
+ s = s_h * h;
+ w = w_h * h;
+
+ /* compute coupled microstrip parameters */
+ calc();
+
+ *f1 = Z0e - Z0_e;
+ *f2 = Z0o - Z0_o;
+}
+
+
+/*
+ * synthesis function
+ */
+void C_MICROSTRIP::synthesize()
+{
+ double Z0_e, Z0_o;
+ double f1, f2, ft1, ft2, j11, j12, j21, j22, d_s_h, d_w_h, err;
+ double eps = 1e-04;
+ double w_h, s_h, le, lo;
+
+ /* Get and assign substrate parameters */
+ get_c_microstrip_sub();
+
+ /* Get and assign component parameters */
+ get_c_microstrip_comp();
+
+ /* Get and assign electrical parameters */
+ get_c_microstrip_elec();
+
+ /* Get and assign physical parameters */
+ /* at present it is required only for getting strips length */
+ get_c_microstrip_phys();
+
+
+ /* required value of Z0_e and Z0_o */
+ Z0_e = Z0e;
+ Z0_o = Z0o;
+
+ /* calculate width and use for initial value in Newton's method */
+ synth_width();
+ w_h = w / h;
+ s_h = s / h;
+ f1 = f2 = 0;
+
+ /* rather crude Newton-Rhapson */
+ do {
+ /* compute Jacobian */
+ syn_fun( &ft1, &ft2, s_h + eps, w_h, Z0_e, Z0_o );
+ j11 = (ft1 - f1) / eps;
+ j21 = (ft2 - f2) / eps;
+ syn_fun( &ft1, &ft2, s_h, w_h + eps, Z0_e, Z0_o );
+ j12 = (ft1 - f1) / eps;
+ j22 = (ft2 - f2) / eps;
+
+ /* compute next step; increments of s_h and w_h */
+ d_s_h = (-f1 * j22 + f2 * j12) / (j11 * j22 - j21 * j12);
+ d_w_h = (-f2 * j11 + f1 * j21) / (j11 * j22 - j21 * j12);
+
+ s_h += d_s_h;
+ w_h += d_w_h;
+
+ /* compute the error with the new values of s_h and w_h */
+ syn_fun( &f1, &f2, s_h, w_h, Z0_e, Z0_o );
+ err = sqrt( f1 * f1 + f2 * f2 );
+
+ /* converged ? */
+ } while( err > 1e-04 );
+
+ /* denormalize computed width and spacing */
+ s = s_h * h;
+ w = w_h * h;
+
+ setProperty( PHYS_WIDTH_PRM, w );
+ setProperty( PHYS_S_PRM, s );
+
+ /* calculate physical length */
+ ang_l_e = getProperty( ANG_L_PRM );
+ ang_l_o = getProperty( ANG_L_PRM );
+ le = C0 / f / sqrt( er_eff_e ) * ang_l_e / 2.0 / M_PI;
+ lo = C0 / f / sqrt( er_eff_o ) * ang_l_o / 2.0 / M_PI;
+ l = sqrt( le * lo );
+ setProperty( PHYS_LEN_PRM, l );
+
+ calc();
+ /* print results in the subwindow */
+ show_results();
+}
diff --git a/pcb_calculator/transline/c_microstrip.h b/pcb_calculator/transline/c_microstrip.h
new file mode 100644
index 0000000000..3843b1873a
--- /dev/null
+++ b/pcb_calculator/transline/c_microstrip.h
@@ -0,0 +1,99 @@
+/*
+ * c_microstrip.h - coupled microstrip class definition
+ *
+ * Copyright (C) 2002 Claudio Girardi
+ * Copyright (C) 2005 Stefan Jahn
+ * Modifications for Kicad: Jean-Pierre Charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef _C_MICROSTRIP_H_
+#define _C_MICROSTRIP_H_
+
+class C_MICROSTRIP : public TRANSLINE
+{
+public: C_MICROSTRIP();
+ ~C_MICROSTRIP();
+
+private:
+ double h; /* height of substrate */
+ double ht; /* height to the top of box */
+ double t; /* thickness of top metal */
+ double rough; /* Roughness of top metal */
+ double w; /* width of lines */
+ double w_t_e; /* even-mode thickness-corrected line width */
+ double w_t_o; /* odd-mode thickness-corrected line width */
+ double l; /* length of lines */
+ double s; /* spacing of lines */
+ double Z0_e_0; /* static even-mode impedance */
+ double Z0_o_0; /* static odd-mode impedance */
+ double Z0e; /* even-mode impedance */
+ double Z0o; /* odd-mode impedance */
+ double c_e; /* even-mode capacitance */
+ double c_o; /* odd-mode capacitance */
+ double ang_l_e; /* even-mode electrical length in angle */
+ double ang_l_o; /* odd-mode electrical length in angle */
+ double er_eff_e; /* even-mode effective dielectric constant */
+ double er_eff_o; /* odd-mode effective dielectric constant */
+ double er_eff_e_0; /* static even-mode effective dielectric constant */
+ double er_eff_o_0; /* static odd-mode effective dielectric constant */
+ double er_eff; /* FIXME: dummy */
+ double w_eff; /* Effective width of line */
+ double atten_dielectric_e; /* even-mode dielectric losses (dB) */
+ double atten_cond_e; /* even-mode conductors losses (dB) */
+ double atten_dielectric_o; /* odd-mode dielectric losses (dB) */
+ double atten_cond_o; /* odd-mode conductors losses (dB) */
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ double delta_u_thickness_single( double, double );
+ void delta_u_thickness();
+ void compute_single_line();
+ double filling_factor_even( double, double, double );
+ double filling_factor_odd( double, double, double );
+ double delta_q_cover_even( double );
+ double delta_q_cover_odd( double );
+ void er_eff_static();
+ double delta_Z0_even_cover( double, double, double );
+ double delta_Z0_odd_cover( double, double, double );
+ void Z0_even_odd();
+ void er_eff_freq();
+ void conductor_losses();
+ void dielectric_losses();
+ void attenuation();
+ void line_angle();
+ void syn_err_fun( double*, double*, double, double, double, double, double );
+ void synth_width();
+ void Z0_dispersion();
+ void calc();
+ void get_c_microstrip_sub();
+ void get_c_microstrip_comp();
+ void get_c_microstrip_elec();
+ void get_c_microstrip_phys();
+ void show_results();
+ void syn_fun( double*, double*, double, double, double, double );
+
+
+private:
+ MICROSTRIP* aux_ms;
+};
+
+#endif /* _C_MICROSTRIP_H_ */
diff --git a/pcb_calculator/transline/coax.cpp b/pcb_calculator/transline/coax.cpp
new file mode 100644
index 0000000000..d10e1dc544
--- /dev/null
+++ b/pcb_calculator/transline/coax.cpp
@@ -0,0 +1,239 @@
+/*
+ * coax.cpp - coaxial class implementation
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2002 Claudio Girardi
+ * Copyright (C) 2005, 2006 Stefan Jahn
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+/*
+ * coax.c - Puts up window for microstrip and
+ * performs the associated calculations
+ */
+
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "coax.h"
+
+COAX::COAX() : TRANSLINE()
+{
+ m_name = "Coax";
+}
+
+
+/*
+ * get_coax_sub() - get and assign coax substrate parameters into coax
+ * structure
+ */
+void COAX::get_coax_sub()
+{
+ er = getProperty( EPSILONR_PRM );
+ mur = getProperty( MUR_PRM );
+ murC = getProperty( MURC_PRM );
+ tand = getProperty( TAND_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+}
+
+
+/*
+ * get_coax_comp() - get and assign coax component parameters into
+ * coax structure
+ */
+void COAX::get_coax_comp()
+{
+ f = getProperty( FREQUENCY_PRM );
+}
+
+
+/*
+ * get_coax_elec() - get and assign coax electrical parameters into
+ * coax structure
+ */
+void COAX::get_coax_elec()
+{
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+/*
+ * get_coax_phys() - get and assign coax physical parameters into coax
+ * structure
+ */
+void COAX::get_coax_phys()
+{
+ din = getProperty( PHYS_DIAM_IN_PRM );
+ dout = getProperty( PHYS_DIAM_OUT_PRM );
+ l = getProperty( PHYS_LEN_PRM );
+}
+
+
+double COAX::alphad_coax()
+{
+ double ad;
+
+ ad = (M_PI / C0) * f * sqrt( er ) * tand;
+ ad = ad * 20.0 / log( 10.0 );
+ return ad;
+}
+
+
+double COAX::alphac_coax()
+{
+ double ac, Rs;
+
+ Rs = sqrt( M_PI * f * murC * MU0 / sigma );
+ ac = sqrt( er ) * ( ( (1 / din) + (1 / dout) ) / log( dout / din ) ) * (Rs / ZF0);
+ ac = ac * 20.0 / log( 10.0 );
+ return ac;
+}
+
+
+/*
+ * analyze() - analysis function
+ */
+void COAX::analyze()
+{
+ double lambda_g;
+
+ /* Get and assign substrate parameters */
+ get_coax_sub();
+
+ /* Get and assign component parameters */
+ get_coax_comp();
+
+ /* Get and assign physical parameters */
+ get_coax_phys();
+
+ if( din != 0.0 )
+ {
+ Z0 = ( ZF0 / 2 / M_PI / sqrt( er ) ) * log( dout / din );
+ }
+
+ lambda_g = ( C0 / (f) ) / sqrt( er * mur );
+ /* calculate electrical angle */
+ ang_l = (2.0 * M_PI * l) / lambda_g; /* in radians */
+
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ show_results();
+}
+
+
+/*
+ * synthesize() - synthesis function
+ */
+void COAX::synthesize()
+{
+ double lambda_g;
+
+ /* Get and assign substrate parameters */
+ get_coax_sub();
+
+ /* Get and assign component parameters */
+ get_coax_comp();
+
+ /* Get and assign electrical parameters */
+ get_coax_elec();
+
+ /* Get and assign physical parameters */
+ get_coax_phys();
+
+ if( isSelected( PHYS_DIAM_IN_PRM ) )
+ {
+ /* solve for din */
+ din = dout / exp( Z0 * sqrt( er ) / ZF0 * 2 * M_PI );
+ setProperty( PHYS_DIAM_IN_PRM, din );
+ }
+ else if( isSelected( PHYS_DIAM_OUT_PRM ) )
+ {
+ /* solve for dout */
+ dout = din * exp( Z0 * sqrt( er ) / ZF0 * 2 * M_PI );
+ setProperty( PHYS_DIAM_OUT_PRM, dout );
+ }
+
+ lambda_g = ( C0 / (f) ) / sqrt( er * mur );
+ /* calculate physical length */
+ l = (lambda_g * ang_l) / (2.0 * M_PI); /* in m */
+ setProperty( PHYS_LEN_PRM, l );
+
+ show_results();
+}
+
+
+/*
+ * show_results() - show results
+ */
+void COAX::show_results()
+{
+ double fc;
+ short m, n;
+ char text[256], txt[256];
+
+ atten_dielectric = alphad_coax() * l;
+ atten_cond = alphac_coax() * l;
+
+ setResult( 0, er, "" );
+ setResult( 1, atten_cond, "dB" );
+ setResult( 2, atten_dielectric, "dB" );
+
+ n = 1;
+ fc = C0 / (M_PI * (dout + din) / (double) n);
+ if( fc > f )
+ strcpy( text, "none" );
+ else
+ {
+ strcpy( text, "H(1,1) " );
+ m = 2;
+ fc = C0 / ( 2 * (dout - din) / (double) (m - 1) );
+ while( (fc <= f) && (m<10) )
+ {
+ sprintf( txt, "H(n,%d) ", m );
+ strcat( text, txt );
+ m++;
+ fc = C0 / ( 2 * (dout - din) / (double) (m - 1) );
+ }
+ }
+ setResult( 3, text );
+
+ m = 1;
+ fc = C0 / (2 * (dout - din) / (double) m);
+ if( fc > f )
+ strcpy( text, "none" );
+ else
+ {
+ strcpy( text, "" );
+ while( (fc <= f) && (m<10) )
+ {
+ sprintf( txt, "E(n,%d) ", m );
+ strcat( text, txt );
+ m++;
+ fc = C0 / (2 * (dout - din) / (double) m);
+ }
+ }
+ setResult( 4, text );
+}
diff --git a/pcb_calculator/transline/coax.h b/pcb_calculator/transline/coax.h
new file mode 100644
index 0000000000..e59e39d89a
--- /dev/null
+++ b/pcb_calculator/transline/coax.h
@@ -0,0 +1,58 @@
+/*
+ * coax.h - coaxial class definition
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2005 Stefan Jahn
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __COAX_H
+#define __COAX_H
+
+class COAX : public TRANSLINE
+{
+public: COAX();
+
+private:
+ double mur; /* magnetic permeability of substrate */
+ double din; /* Inner diameter of cable */
+ double dout; /* Outer diameter of cable */
+ double l; /* Length of cable */
+ double Z0; /* characteristic impedance */
+ double ang_l; /* Electrical length in angle */
+ double atten_dielectric; /* Loss in dielectric (dB) */
+ double atten_cond; /* Loss in conductors (dB) */
+ double fc; /* Cutoff frequency for higher order modes */
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ void get_coax_sub();
+ void get_coax_comp();
+ void get_coax_phys();
+ void get_coax_elec();
+ void fixdin();
+ void fixdout();
+ double alphad_coax();
+ double alphac_coax();
+ void show_results();
+};
+
+#endif /* __COAX_H */
diff --git a/pcb_calculator/transline/coplanar.cpp b/pcb_calculator/transline/coplanar.cpp
new file mode 100644
index 0000000000..2630bb591c
--- /dev/null
+++ b/pcb_calculator/transline/coplanar.cpp
@@ -0,0 +1,277 @@
+/*
+ * coplanar.cpp - coplanar class implementation
+ *
+ * Copyright (C) 2008 Michael Margraf
+ * Copyright (C) 2005, 2006 Stefan Jahn
+ * Modified for Kicad: 2011 jean-pierre.charras
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "coplanar.h"
+
+COPLANAR::COPLANAR() : TRANSLINE()
+{
+ m_name = "CoPlanar";
+ backMetal = false;
+}
+
+
+GROUNDEDCOPLANAR::GROUNDEDCOPLANAR() : COPLANAR()
+{
+ m_name = "GrCoPlanar";
+ backMetal = true;
+}
+
+
+// -------------------------------------------------------------------
+void COPLANAR::getProperties()
+{
+ f = getProperty( FREQUENCY_PRM );
+ w = getProperty( PHYS_WIDTH_PRM );
+ s = getProperty( PHYS_S_PRM );
+ len = getProperty( PHYS_LEN_PRM );
+ h = getProperty( H_PRM );
+ t = getProperty( T_PRM );
+
+ er = getProperty( EPSILONR_PRM );
+ murC = getProperty( MURC_PRM );
+ tand = getProperty( TAND_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+// -------------------------------------------------------------------
+void COPLANAR::calc()
+{
+ skindepth = skin_depth();
+
+ // other local variables (quasi-static constants)
+ double k1, kk1, kpk1, k2, k3, q1, q2, q3 = 0, qz, er0 = 0;
+ double zl_factor;
+
+ // compute the necessary quasi-static approx. (K1, K3, er(0) and Z(0))
+ k1 = w / (w + s + s);
+ kk1 = ellipk( k1 );
+ kpk1 = ellipk( sqrt( 1 - k1 * k1 ) );
+ q1 = kk1 / kpk1;
+
+ // backside is metal
+ if( backMetal )
+ {
+ k3 = tanh( (M_PI / 4) * (w / h) ) / tanh( (M_PI / 4) * (w + s + s) / h );
+ q3 = ellipk( k3 ) / ellipk( sqrt( 1 - k3 * k3 ) );
+ qz = 1 / (q1 + q3);
+ er0 = 1 + q3 * qz * (er - 1);
+ zl_factor = ZF0 / 2 * qz;
+ }
+ // backside is air
+ else
+ {
+ k2 = sinh( (M_PI / 4) * (w / h) ) / sinh( (M_PI / 4) * (w + s + s) / h );
+ q2 = ellipk( k2 ) / ellipk( sqrt( 1 - k2 * k2 ) );
+ er0 = 1 + (er - 1) / 2 * q2 / q1;
+ zl_factor = ZF0 / 4 / q1;
+ }
+
+ // adds effect of strip thickness
+ if( t > 0 )
+ {
+ double d, se, We, ke, qe;
+ d = (t * 1.25 / M_PI) * ( 1 + log( 4 * M_PI * w / t ) );
+ se = s - d;
+ We = w + d;
+
+ // modifies k1 accordingly (k1 = ke)
+ ke = We / (We + se + se); // ke = k1 + (1 - k1 * k1) * d / 2 / s;
+ qe = ellipk( ke ) / ellipk( sqrt( 1 - ke * ke ) );
+
+ // backside is metal
+ if( backMetal )
+ {
+ qz = 1 / (qe + q3);
+ er0 = 1 + q3 * qz * (er - 1);
+ zl_factor = ZF0 / 2 * qz;
+ }
+ // backside is air
+ else
+ {
+ zl_factor = ZF0 / 4 / qe;
+ }
+
+ // modifies er0 as well
+ er0 = er0 - (0.7 * (er0 - 1) * t / s) / ( q1 + (0.7 * t / s) );
+ }
+
+ // pre-compute square roots
+ double sr_er = sqrt( er );
+ double sr_er0 = sqrt( er0 );
+
+ // cut-off frequency of the TE0 mode
+ double fte = (C0 / 4) / ( h * sqrt( er - 1 ) );
+
+ // dispersion factor G
+ double p = log( w / h );
+ double u = 0.54 - (0.64 - 0.015 * p) * p;
+ double v = 0.43 - (0.86 - 0.54 * p) * p;
+ double G = exp( u * log( w / s ) + v );
+
+ // loss constant factors (computed only once for efficency sake)
+ double ac = 0;
+ if( t > 0 )
+ {
+ // equations by GHIONE
+ double n = (1 - k1) * 8 * M_PI / ( t * (1 + k1) );
+ double a = w / 2;
+ double b = a + s;
+ ac = ( M_PI + log( n * a ) ) / a + ( M_PI + log( n * b ) ) / b;
+ }
+ double ac_factor = ac / ( 4 * ZF0 * kk1 * kpk1 * (1 - k1 * k1) );
+ double ad_factor = ( er / (er - 1) ) * tand * M_PI / C0;
+
+
+ // ....................................................
+ double sr_er_f = sr_er0;
+
+ // add the dispersive effects to er0
+ sr_er_f += (sr_er - sr_er0) / ( 1 + G * pow( f / fte, -1.8 ) );
+
+ // for now, the loss are limited to strip losses (no radiation
+ // losses yet) losses in neper/length
+ atten_cond = 20.0 / log( 10.0 ) * len
+ * ac_factor * sr_er0 * sqrt( M_PI * MU0 * f / sigma );
+ atten_dielectric = 20.0 / log( 10.0 ) * len
+ * ad_factor * f * (sr_er_f * sr_er_f - 1) / sr_er_f;
+
+ ang_l = 2.0 * M_PI * len * sr_er_f * f / C0; /* in radians */
+
+ er_eff = sr_er_f * sr_er_f;
+ Z0 = zl_factor / sr_er_f;
+}
+
+
+// -------------------------------------------------------------------
+void COPLANAR::show_results()
+{
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ setResult( 0, er_eff, "" );
+ setResult( 1, atten_cond, "dB" );
+ setResult( 2, atten_dielectric, "dB" );
+
+ setResult( 3, skindepth / UNIT_MICRON, "µm" );
+}
+
+
+// -------------------------------------------------------------------
+void COPLANAR::analyze()
+{
+ getProperties();
+
+ /* compute coplanar parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
+
+
+#define MAX_ERROR 0.000001
+
+// -------------------------------------------------------------------
+void COPLANAR::synthesize()
+{
+ double Z0_dest, Z0_current, Z0_result, increment, slope, error;
+ int iteration;
+
+ getProperties();
+
+ /* required value of Z0 */
+ Z0_dest = Z0;
+
+ /* Newton's method */
+ iteration = 0;
+
+ /* compute coplanar parameters */
+ calc();
+ Z0_current = Z0;
+
+ error = fabs( Z0_dest - Z0_current );
+
+ while( error > MAX_ERROR )
+ {
+ iteration++;
+ if( isSelected( PHYS_WIDTH_PRM ) )
+ {
+ increment = w / 100.0;
+ w += increment;
+ }
+ else
+ {
+ increment = s / 100.0;
+ s += increment;
+ }
+ /* compute coplanar parameters */
+ calc();
+ Z0_result = Z0;
+ /* f(w(n)) = Z0 - Z0(w(n)) */
+ /* f'(w(n)) = -f'(Z0(w(n))) */
+ /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
+ /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
+ slope = (Z0_result - Z0_current) / increment;
+ slope = (Z0_dest - Z0_current) / slope - increment;
+ if( isSelected( PHYS_WIDTH_PRM ) )
+ w += slope;
+ else
+ s += slope;
+ if( w <= 0.0 )
+ w = increment;
+ if( s <= 0.0 )
+ s = increment;
+ /* find new error */
+ /* compute coplanar parameters */
+ calc();
+ Z0_current = Z0;
+ error = fabs( Z0_dest - Z0_current );
+ if( iteration > 100 )
+ break;
+ }
+
+ setProperty( PHYS_WIDTH_PRM, w );
+ setProperty( PHYS_S_PRM, s );
+ /* calculate physical length */
+ ang_l = getProperty( ANG_L_PRM );
+ len = C0 / f / sqrt( er_eff ) * ang_l / 2.0 / M_PI; /* in m */
+ setProperty( PHYS_LEN_PRM, len );
+
+ /* compute coplanar parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
diff --git a/pcb_calculator/transline/coplanar.h b/pcb_calculator/transline/coplanar.h
new file mode 100644
index 0000000000..b3d6a70ee1
--- /dev/null
+++ b/pcb_calculator/transline/coplanar.h
@@ -0,0 +1,63 @@
+/*
+ * coplanar.h - microstrip class definition
+ *
+ * Copyright (C) 2008 Michael Margraf
+ * Copyright (C) 2005 Stefan Jahn
+ * Modified for Kicad: 2011 jean-pierre.charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __COPLANAR_H
+#define __COPLANAR_H
+
+class COPLANAR : public TRANSLINE
+{
+public: COPLANAR();
+
+private:
+ double h; /* height of substrate */
+ double t; /* thickness of top metal */
+ double w; /* width of line */
+ double s; /* width of gap between line and ground */
+ double len; /* length of line */
+ double Z0; /* characteristic impedance */
+ double er_eff; /* effective dielectric constant */
+ double ang_l; /* Electrical length in angle */
+ double atten_dielectric; /* Loss in dielectric (dB) */
+ double atten_cond; /* Loss in conductors (dB) */
+
+public:
+ void analyze();
+ void synthesize();
+
+protected:
+ bool backMetal;
+
+private:
+ void calc();
+ void show_results();
+ void getProperties();
+};
+
+
+class GROUNDEDCOPLANAR : public COPLANAR
+{
+public: GROUNDEDCOPLANAR();
+};
+
+#endif /* __COPLANAR_H */
diff --git a/pcb_calculator/transline/microstrip.cpp b/pcb_calculator/transline/microstrip.cpp
new file mode 100644
index 0000000000..bdd365514a
--- /dev/null
+++ b/pcb_calculator/transline/microstrip.cpp
@@ -0,0 +1,618 @@
+/*
+ * microstrip.cpp - microstrip class implementation
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2002 Claudio Girardi
+ * Copyright (C) 2005, 2006 Stefan Jahn
+ * Modified for Kicad: 2011 jean-pierre.charras
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+/* microstrip.c - Puts up window for microstrip and
+ * performs the associated calculations
+ * Based on the original microstrip.c by Gopal Narayanan
+ */
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "microstrip.h"
+
+MICROSTRIP::MICROSTRIP() : TRANSLINE()
+{
+ m_name = "MicroStrip";
+}
+
+
+/*
+ * Z0_homogeneous() - compute the impedance for a stripline in a
+ * homogeneous medium, without cover effects
+ */
+double MICROSTRIP::Z0_homogeneous( double u )
+{
+ double f, Z0;
+
+ f = 6.0 + (2.0 * M_PI - 6.0) * exp( -pow( 30.666 / u, 0.7528 ) );
+ Z0 = ( ZF0 / (2.0 * M_PI) ) * log( f / u + sqrt( 1.0 + 4.0 / (u * u) ) );
+ return Z0;
+}
+
+
+/*
+ * delta_Z0_cover() - compute the cover effect on impedance for a
+ * stripline in a homogeneous medium
+ */
+double MICROSTRIP::delta_Z0_cover( double u, double h2h )
+{
+ double P, Q;
+ double h2hp1;
+
+ h2hp1 = 1.0 + h2h;
+ P = 270.0 * ( 1.0 - tanh( 1.192 + 0.706 * sqrt( h2hp1 ) - 1.389 / h2hp1 ) );
+ Q = 1.0109 - atanh( (0.012 * u + 0.177 * u * u - 0.027 * u * u * u) / (h2hp1 * h2hp1) );
+ return P * Q;
+}
+
+
+/*
+ * filling_factor() - compute the filling factor for a microstrip
+ * without cover and zero conductor thickness
+ */
+double MICROSTRIP::filling_factor( double u, double e_r )
+{
+ double a, b, q_inf;
+ double u2, u3, u4;
+
+ u2 = u * u;
+ u3 = u2 * u;
+ u4 = u3 * u;
+ a = 1.0 +
+ log( (u4 + u2 / 2704) / (u4 + 0.432) ) / 49.0 + log( 1.0 + u3 / 5929.741 ) / 18.7;
+ b = 0.564 * pow( (e_r - 0.9) / (e_r + 3.0), 0.053 );
+ q_inf = pow( 1.0 + 10.0 / u, -a * b );
+ return q_inf;
+}
+
+
+/*
+ * delta_q_cover() - compute the cover effect on filling factor
+ */
+double MICROSTRIP::delta_q_cover( double h2h )
+{
+ double q_c;
+
+ q_c = tanh( 1.043 + 0.121 * h2h - 1.164 / h2h );
+ return q_c;
+}
+
+
+/*
+ * delta_q_thickness() - compute the thickness effect on filling factor
+ */
+double MICROSTRIP::delta_q_thickness( double u, double t_h )
+{
+ double q_t;
+
+ q_t = (2.0 * log( 2.0 ) / M_PI) * ( t_h / sqrt( u ) );
+ return q_t;
+}
+
+
+/*
+ * e_r_effective() - compute effective dielectric constant from
+ * material e_r and filling factor
+ */
+double MICROSTRIP::e_r_effective( double e_r, double q )
+{
+ double e_r_eff;
+
+ e_r_eff = 0.5 * (e_r + 1.0) + 0.5 * q * (e_r - 1.0);
+ return e_r_eff;
+}
+
+
+/*
+ * delta_u_thickness - compute the thickness effect on normalized width
+ */
+double MICROSTRIP::delta_u_thickness( double u, double t_h, double e_r )
+{
+ double delta_u;
+
+ if( t_h > 0.0 )
+ {
+ /* correction for thickness for a homogeneous microstrip */
+ delta_u = (t_h / M_PI) * log( 1.0 + (4.0 * M_E) * pow( tanh( sqrt(
+ 6.517 * u ) ), 2.0 ) / t_h );
+ /* correction for strip on a substrate with relative permettivity e_r */
+ delta_u = 0.5 * delta_u * ( 1.0 + 1.0 / cosh( sqrt( e_r - 1.0 ) ) );
+ }
+ else
+ {
+ delta_u = 0.0;
+ }
+ return delta_u;
+}
+
+
+/*
+ * microstrip_Z0() - compute microstrip static impedance
+ */
+void MICROSTRIP::microstrip_Z0()
+{
+ double e_r, h2, h2h, u, t_h;
+ double Z0_h_r, Z0;
+ double delta_u_1, delta_u_r, q_inf, q_c, q_t, e_r_eff, e_r_eff_t, q;
+
+ e_r = er;
+ h2 = ht;
+ h2h = h2 / h;
+ u = w / h;
+ t_h = t / h;
+
+ /* compute normalized width correction for e_r = 1.0 */
+ delta_u_1 = delta_u_thickness( u, t_h, 1.0 );
+ /* compute homogeneous stripline impedance */
+ Z0_h_1 = Z0_homogeneous( u + delta_u_1 );
+ /* compute normalized width corection */
+ delta_u_r = delta_u_thickness( u, t_h, e_r );
+ u += delta_u_r;
+ /* compute homogeneous stripline impedance */
+ Z0_h_r = Z0_homogeneous( u );
+
+ /* filling factor, with width corrected for thickness */
+ q_inf = filling_factor( u, e_r );
+ /* cover effect */
+ q_c = delta_q_cover( h2h );
+ /* thickness effect */
+ q_t = delta_q_thickness( u, t_h );
+ /* resultant filling factor */
+ q = (q_inf - q_t) * q_c;
+
+ /* e_r corrected for thickness and non homogeneous material */
+ e_r_eff_t = e_r_effective( e_r, q );
+
+ /* effective dielectric constant */
+ e_r_eff = e_r_eff_t * pow( Z0_h_1 / Z0_h_r, 2.0 );
+
+ /* characteristic impedance, corrected for thickness, cover */
+ /* and non homogeneous material */
+ Z0 = Z0_h_r / sqrt( e_r_eff_t );
+
+ w_eff = u * h;
+ er_eff_0 = e_r_eff;
+ Z0_0 = Z0;
+}
+
+
+/*
+ * e_r_dispersion() - computes the dispersion correction factor for
+ * the effective permeability
+ */
+double MICROSTRIP::e_r_dispersion( double u, double e_r, double f_n )
+{
+ double P_1, P_2, P_3, P_4, P;
+
+ P_1 = 0.27488 + u * ( 0.6315 + 0.525 / pow( 1.0 + 0.0157 * f_n, 20.0 ) ) - 0.065683 * exp(
+ -8.7513 * u );
+ P_2 = 0.33622 * ( 1.0 - exp( -0.03442 * e_r ) );
+ P_3 = 0.0363 * exp( -4.6 * u ) * ( 1.0 - exp( -pow( f_n / 38.7, 4.97 ) ) );
+ P_4 = 1.0 + 2.751 * ( 1.0 - exp( -pow( e_r / 15.916, 8.0 ) ) );
+
+ P = P_1 * P_2 * pow( (P_3 * P_4 + 0.1844) * f_n, 1.5763 );
+
+ return P;
+}
+
+
+/*
+ * Z0_dispersion() - computes the dispersion correction factor for the
+ * characteristic impedance
+ */
+double MICROSTRIP::Z0_dispersion( double u,
+ double e_r,
+ double e_r_eff_0,
+ double e_r_eff_f,
+ double f_n )
+{
+ double R_1, R_2, R_3, R_4, R_5, R_6, R_7, R_8, R_9, R_10, R_11, R_12, R_13, R_14, R_15, R_16,
+ R_17, D, tmpf;
+
+ R_1 = 0.03891 * pow( e_r, 1.4 );
+ R_2 = 0.267 * pow( u, 7.0 );
+ R_3 = 4.766 * exp( -3.228 * pow( u, 0.641 ) );
+ R_4 = 0.016 + pow( 0.0514 * e_r, 4.524 );
+ R_5 = pow( f_n / 28.843, 12.0 );
+ R_6 = 22.2 * pow( u, 1.92 );
+ R_7 = 1.206 - 0.3144 * exp( -R_1 ) * ( 1.0 - exp( -R_2 ) );
+ R_8 = 1.0 + 1.275 *
+ ( 1.0 - exp( -0.004625 * R_3 * pow( e_r, 1.674 ) * pow( f_n / 18.365, 2.745 ) ) );
+ tmpf = pow( e_r - 1.0, 6.0 );
+ R_9 = 5.086 * R_4 *
+ ( R_5 /
+ (0.3838 + 0.386 *
+ R_4) ) * ( exp( -R_6 ) / (1.0 + 1.2992 * R_5) ) * ( tmpf / (1.0 + 10.0 * tmpf) );
+ R_10 = 0.00044 * pow( e_r, 2.136 ) + 0.0184;
+ tmpf = pow( f_n / 19.47, 6.0 );
+ R_11 = tmpf / (1.0 + 0.0962 * tmpf);
+ R_12 = 1.0 / (1.0 + 0.00245 * u * u);
+ R_13 = 0.9408 * pow( e_r_eff_f, R_8 ) - 0.9603;
+ R_14 = (0.9408 - R_9) * pow( e_r_eff_0, R_8 ) - 0.9603;
+ R_15 = 0.707* R_10* pow( f_n / 12.3, 1.097 );
+ R_16 = 1.0 + 0.0503 * e_r * e_r * R_11 * ( 1.0 - exp( -pow( u / 15.0, 6.0 ) ) );
+ R_17 = R_7 * ( 1.0 - 1.1241 * (R_12 / R_16) * exp( -0.026 * pow( f_n, 1.15656 ) - R_15 ) );
+
+ D = pow( R_13 / R_14, R_17 );
+
+ return D;
+}
+
+
+/*
+ * dispersion() - compute frequency dependent parameters of
+ * microstrip
+ */
+void MICROSTRIP::dispersion()
+{
+ double e_r, e_r_eff_0;
+ double u, f_n, P, e_r_eff_f, D, Z0_f;
+
+ e_r = er;
+ e_r_eff_0 = er_eff_0;
+ u = w / h;
+
+ /* normalized frequency [GHz * mm] */
+ f_n = f * h / 1e06;
+
+ P = e_r_dispersion( u, e_r, f_n );
+ /* effective dielectric constant corrected for dispersion */
+ e_r_eff_f = e_r - (e_r - e_r_eff_0) / (1.0 + P);
+
+ D = Z0_dispersion( u, e_r, e_r_eff_0, e_r_eff_f, f_n );
+ Z0_f = Z0_0 * D;
+
+ er_eff = e_r_eff_f;
+ Z0 = Z0_f;
+}
+
+
+/*
+ * conductor_losses() - compute microstrip conductor losses per unit
+ * length
+ */
+double MICROSTRIP::conductor_losses()
+{
+ double e_r_eff_0, delta;
+ double K, R_s, Q_c, alpha_c;
+
+ e_r_eff_0 = er_eff_0;
+ delta = skindepth;
+
+ if( f > 0.0 )
+ {
+ /* current distribution factor */
+ K = exp( -1.2 * pow( Z0_h_1 / ZF0, 0.7 ) );
+ /* skin resistance */
+ R_s = 1.0 / (sigma * delta);
+
+ /* correction for surface roughness */
+ R_s *= 1.0 + ( (2.0 / M_PI) * atan( 1.40 * pow( (rough / delta), 2.0 ) ) );
+ /* strip inductive quality factor */
+ Q_c = (M_PI * Z0_h_1 * w * f) / (R_s * C0 * K);
+ alpha_c = ( 20.0 * M_PI / log( 10.0 ) ) * f * sqrt( e_r_eff_0 ) / (C0 * Q_c);
+ }
+ else
+ {
+ alpha_c = 0.0;
+ }
+
+ return alpha_c;
+}
+
+
+/*
+ * dielectric_losses() - compute microstrip dielectric losses per unit
+ * length
+ */
+double MICROSTRIP::dielectric_losses()
+{
+ double e_r, e_r_eff_0;
+ double alpha_d;
+
+ e_r = er;
+ e_r_eff_0 = er_eff_0;
+
+ alpha_d =
+ ( 20.0 * M_PI /
+ log( 10.0 ) ) *
+ (f / C0) * ( e_r / sqrt( e_r_eff_0 ) ) * ( (e_r_eff_0 - 1.0) / (e_r - 1.0) ) * tand;
+
+ return alpha_d;
+}
+
+
+/*
+ * attenuation() - compute attenuation of microstrip
+ */
+void MICROSTRIP::attenuation()
+{
+ skindepth = skin_depth();
+
+ atten_cond = conductor_losses() * l;
+ atten_dielectric = dielectric_losses() * l;
+}
+
+
+/*
+ * mur_eff_ms() - returns effective magnetic permeability
+ */
+void MICROSTRIP::mur_eff_ms()
+{
+ double mureff;
+
+ mureff = (2.0 * mur) / ( (1.0 + mur) + ( (1.0 - mur) * pow( ( 1.0 + (10.0 * h / w) ), -0.5 ) ) );
+
+ mur_eff = mureff;
+}
+
+
+/*
+ * synth_width - calculate width given Z0 and e_r
+ */
+double MICROSTRIP::synth_width()
+{
+ double e_r, a, b;
+ double w_h, w;
+
+
+ e_r = er;
+
+
+ a =
+ ( (Z0 / ZF0 / 2 /
+ M_PI) * sqrt( (e_r + 1) / 2. ) ) + ( (e_r - 1) / (e_r + 1) * ( 0.23 + (0.11 / e_r) ) );
+ b = ZF0 / 2 * M_PI / ( Z0 * sqrt( e_r ) );
+
+ if( a > 1.52 )
+ {
+ w_h = 8 * exp( a ) / (exp( 2. * a ) - 2);
+ }
+ else
+ {
+ w_h =
+ (2. /
+ M_PI) *
+ ( b - 1. -
+ log( (2 * b) - 1. ) + ( (e_r - 1) / (2 * e_r) ) * (log( b - 1. ) + 0.39 - 0.61 / e_r) );
+ }
+
+ if( h > 0.0 )
+ {
+ w = w_h * h;
+ return w;
+ }
+ else
+ {
+ w = 0;
+ }
+ return w;
+}
+
+
+/*
+ * line_angle() - calculate microstrip length in radians
+ */
+void MICROSTRIP::line_angle()
+{
+ double e_r_eff;
+ double v, lambda_g;
+
+ e_r_eff = er_eff;
+
+ /* velocity */
+ v = C0 / sqrt( e_r_eff * mur_eff );
+ /* wavelength */
+ lambda_g = v / f;
+ /* electrical angles */
+ ang_l = 2.0 * M_PI * l / lambda_g; /* in radians */
+}
+
+
+void MICROSTRIP::calc()
+{
+ /* effective permeability */
+ mur_eff_ms();
+ /* static impedance */
+ microstrip_Z0();
+ /* calculate freq dependence of er and Z0 */
+ dispersion();
+ /* calculate electrical lengths */
+ line_angle();
+ /* calculate losses */
+ attenuation();
+}
+
+
+/*
+ * get_microstrip_sub () - get and assign microstrip substrate
+ * parameters into microstrip structure
+ */
+void MICROSTRIP::get_microstrip_sub()
+{
+ er = getProperty( EPSILONR_PRM );
+ mur = getProperty( MUR_PRM );
+ h = getProperty( H_PRM );
+ ht = getProperty( H_T_PRM );
+ t = getProperty( T_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+ murC = getProperty( MURC_PRM );
+ tand = getProperty( TAND_PRM );
+ rough = getProperty( ROUGH_PRM );
+}
+
+
+/*
+ * get_microstrip_comp() - get and assign microstrip component
+ * parameters into microstrip structure
+ */
+void MICROSTRIP::get_microstrip_comp()
+{
+ f = getProperty( FREQUENCY_PRM );
+}
+
+
+/*
+ * get_microstrip_elec() - get and assign microstrip electrical
+ * parameters into microstrip structure
+ */
+void MICROSTRIP::get_microstrip_elec()
+{
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+/*
+ * get_microstrip_phys() - get and assign microstrip physical
+ * parameters into microstrip structure
+ */
+void MICROSTRIP::get_microstrip_phys()
+{
+ w = getProperty( PHYS_WIDTH_PRM );
+ l = getProperty( PHYS_LEN_PRM );
+}
+
+
+void MICROSTRIP::show_results()
+{
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ setResult( 0, er_eff, "" );
+ setResult( 1, atten_cond, "dB" );
+ setResult( 2, atten_dielectric, "dB" );
+
+ setResult( 3, skindepth/UNIT_MICRON, "µm" );
+}
+
+
+/*
+ * analysis function
+ */
+void MICROSTRIP::analyze()
+{
+ /* Get and assign substrate parameters */
+ get_microstrip_sub();
+
+ /* Get and assign component parameters */
+ get_microstrip_comp();
+
+ /* Get and assign physical parameters */
+ get_microstrip_phys();
+
+ /* compute microstrip parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
+
+
+#define MAX_ERROR 0.000001
+
+/*
+ * synthesis function
+ */
+void MICROSTRIP::synthesize()
+{
+ double Z0_dest, Z0_current, Z0_result, increment, slope, error;
+ int iteration;
+
+ /* Get and assign substrate parameters */
+ get_microstrip_sub();
+
+ /* Get and assign component parameters */
+ get_microstrip_comp();
+
+ /* Get and assign electrical parameters */
+ get_microstrip_elec();
+
+ /* Get and assign physical parameters */
+ /* at present it is required only for getting strips length */
+ get_microstrip_phys();
+
+
+ /* calculate width and use for initial value in Newton's method */
+ w = synth_width();
+
+ /* required value of Z0 */
+ Z0_dest = Z0;
+
+ /* Newton's method */
+ iteration = 0;
+
+ /* compute microstrip parameters */
+ calc();
+ Z0_current = Z0;
+
+ error = fabs( Z0_dest - Z0_current );
+
+ while( error > MAX_ERROR )
+ {
+ iteration++;
+ increment = (w / 100.0);
+ w += increment;
+ /* compute microstrip parameters */
+ calc();
+ Z0_result = Z0;
+ /* f(w(n)) = Z0 - Z0(w(n)) */
+ /* f'(w(n)) = -f'(Z0(w(n))) */
+ /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
+ /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
+ slope = (Z0_result - Z0_current) / increment;
+ /* printf("%g\n",slope); */
+ w += (Z0_dest - Z0_current) / slope - increment;
+ /* printf("ms->w = %g\n", ms->w); */
+ /* find new error */
+ /* compute microstrip parameters */
+ calc();
+ Z0_current = Z0;
+ error = fabs( Z0_dest - Z0_current );
+
+ /* printf("Iteration = %d\n",iteration);
+ * printf("w = %g\t Z0 = %g\n",ms->w, Z0_current); */
+ if( iteration > 100 )
+ break;
+ }
+
+ setProperty( PHYS_WIDTH_PRM, w );
+ /* calculate physical length */
+ ang_l = getProperty( ANG_L_PRM );
+ l = C0 / f / sqrt( er_eff * mur_eff ) * ang_l / 2.0 / M_PI; /* in m */
+ setProperty( PHYS_LEN_PRM, l );
+
+ /* compute microstrip parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
diff --git a/pcb_calculator/transline/microstrip.h b/pcb_calculator/transline/microstrip.h
new file mode 100644
index 0000000000..0438811e2c
--- /dev/null
+++ b/pcb_calculator/transline/microstrip.h
@@ -0,0 +1,91 @@
+/*
+ * microstrip.h - microstrip class definition
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2005 Stefan Jahn
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __MICROSTRIP_H
+#define __MICROSTRIP_H
+
+class MICROSTRIP : public TRANSLINE
+{
+public: MICROSTRIP();
+
+ friend class C_MICROSTRIP;
+
+private:
+ double h; /* height of substrate */
+ double ht; /* height to the top of box */
+ double t; /* thickness of top metal */
+ double rough; /* Roughness of top metal */
+ double mur; /* magnetic permeability of substrate */
+ double w; /* width of line */
+ double l; /* length of line */
+ double Z0_0; /* static characteristic impedance */
+ double Z0; /* characteristic impedance */
+ double ang_l; /* Electrical length in angle */
+ double er_eff_0; /* Static effective dielectric constant */
+ double er_eff; /* Effective dielectric constant */
+ double mur_eff; /* Effective mag. permeability */
+ double w_eff; /* Effective width of line */
+ double atten_dielectric; /* Loss in dielectric (dB) */
+ double atten_cond; /* Loss in conductors (dB) */
+
+ /* private params */
+ double Z0_h_1; /* homogeneous stripline impedance */
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ double er_eff_freq();
+ double alpha_c();
+ double alpha_c_roughness();
+ double alpha_dielectric();
+ double char_impedance_ht();
+ double synth_width();
+ double ereff_dispersion();
+ double Z0_dispersion();
+ double Z0_homogeneous( double );
+ double delta_Z0_cover( double, double );
+ double filling_factor( double, double );
+ double delta_q_cover( double );
+ double delta_q_thickness( double, double );
+ double e_r_effective( double, double );
+ double delta_u_thickness( double, double, double );
+ double e_r_dispersion( double, double, double );
+ double Z0_dispersion( double, double, double, double, double );
+ double conductor_losses();
+ double dielectric_losses();
+ void microstrip_Z0();
+ void dispersion();
+ void attenuation();
+ void mur_eff_ms();
+ void line_angle();
+ void calc();
+ void get_microstrip_sub();
+ void get_microstrip_comp();
+ void get_microstrip_elec();
+ void get_microstrip_phys();
+ void show_results();
+};
+
+#endif /* __MICROSTRIP_H */
diff --git a/pcb_calculator/transline/rectwaveguide.cpp b/pcb_calculator/transline/rectwaveguide.cpp
new file mode 100644
index 0000000000..90c737c9d8
--- /dev/null
+++ b/pcb_calculator/transline/rectwaveguide.cpp
@@ -0,0 +1,400 @@
+/*
+ * rectwaveguide.cpp - rectangular waveguide class implementation
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2005, 2006 Stefan Jahn
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "rectwaveguide.h"
+
+RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE()
+{
+ m_name = "RectWaveGuide";
+}
+
+
+/*
+ * returns square of k
+ */
+double RECTWAVEGUIDE::kval_square()
+{
+ double kval;
+
+ kval = 2.0* M_PI* f* sqrt( mur* er ) / C0;
+
+ return kval * kval;
+}
+
+
+/*
+ * given mode numbers m and n
+ * returns square of cutoff kc value
+ */
+double RECTWAVEGUIDE::kc_square( int m, int n )
+{
+ return pow( (m * M_PI / a), 2.0 ) + pow( (n * M_PI / b), 2.0 );
+}
+
+
+/*
+ * given mode numbers m and n
+ * returns cutoff fc value
+ */
+double RECTWAVEGUIDE::fc( int m, int n )
+{
+ return sqrt( kc_square( m, n ) / mur / er ) * C0 / 2.0 / M_PI;
+}
+
+
+/*
+ * alphac - returns attenuation due to conductor losses for all propagating
+ * modes in the waveguide
+ */
+double RECTWAVEGUIDE::alphac()
+{
+ double Rs, f_c;
+ double ac;
+ short m, n, mmax, nmax;
+
+ Rs = sqrt( M_PI * f * murC * MU0 / sigma );
+ ac = 0.0;
+ mmax = (int) floor( f / fc( 1, 0 ) );
+ nmax = mmax;
+
+ /* below from Ramo, Whinnery & Van Duzer */
+
+ /* TE(m,n) modes */
+ for( n = 0; n<= nmax; n++ )
+ {
+ for( m = 1; m <= mmax; m++ )
+ {
+ f_c = fc( m, n );
+ if( f > f_c )
+ {
+ switch( n )
+ {
+ case 0:
+ ac += ( Rs / ( b * ZF0 * sqrt( 1.0 - pow( (f_c / f), 2.0 ) ) ) ) *
+ ( 1.0 + ( (2 * b / a) * pow( (f_c / f), 2.0 ) ) );
+ break;
+
+ default:
+ ac += ( (2. * Rs) / ( b * ZF0 * sqrt( 1.0 - pow( (f_c / f), 2.0 ) ) ) ) *
+ ( ( ( 1. + (b / a) ) * pow( (f_c / f), 2.0 ) ) +
+ ( ( 1. -
+ pow( (f_c / f),
+ 2.0 ) ) *
+ ( ( (b / a) * ( ( (b / a) * pow( m, 2. ) ) + pow( n, 2. ) ) ) /
+ ( pow( (b * m / a),
+ 2.0 ) + pow( n, 2.0 ) ) ) ) );
+ break;
+ }
+ }
+ }
+ }
+
+ /* TM(m,n) modes */
+ for( n = 1; n<= nmax; n++ )
+ {
+ for( m = 1; m<= mmax; m++ )
+ {
+ f_c = fc( m, n );
+ if( f > f_c )
+ {
+ ac += ( (2. * Rs) / ( b * ZF0 * sqrt( 1.0 - pow( (f_c / f), 2.0 ) ) ) ) *
+ ( ( ( pow( m, 2.0 ) * pow( (b / a), 3.0 ) ) + pow( n, 2. ) ) /
+ ( ( pow( (m * b / a), 2. ) ) + pow( n, 2.0 ) ) );
+ }
+ }
+ }
+
+ ac = ac * 20.0 * log10( exp( 1. ) ); /* convert from Np/m to db/m */
+ return ac;
+}
+
+
+/*
+ * alphac_cutoff - returns attenuation for a cutoff wg
+ */
+double RECTWAVEGUIDE::alphac_cutoff()
+{
+ double acc;
+
+ acc = sqrt( kc_square( 1, 0 ) - kval_square() );
+ acc = 20 * log10( exp( 1.0 ) ) * acc;
+ return acc;
+}
+
+
+/*
+ * returns attenuation due to dielectric losses
+ */
+double RECTWAVEGUIDE::alphad()
+{
+ double k_square, beta;
+ double ad;
+
+ k_square = kval_square();
+ beta = sqrt( k_square - kc_square( 1, 0 ) );
+
+ ad = (k_square * tand) / (2.0 * beta);
+ ad = ad * 20.0 * log10( exp( 1. ) ); /* convert from Np/m to db/m */
+ return ad;
+}
+
+
+/*
+ * get_rectwaveguide_sub
+ * get and assign rectwaveguide substrate parameters
+ * into rectwaveguide structure
+ */
+void RECTWAVEGUIDE::get_rectwaveguide_sub()
+{
+ er = getProperty( EPSILONR_PRM );
+ mur = getProperty( MUR_PRM );
+ murC = getProperty( MURC_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+ tand = getProperty( TAND_PRM );
+ tanm = getProperty( TANM_PRM );
+}
+
+
+/*
+ * get_rectwaveguide_comp
+ * get and assign rectwaveguide component parameters
+ * into rectwaveguide structure
+ */
+void RECTWAVEGUIDE::get_rectwaveguide_comp()
+{
+ f = getProperty( FREQUENCY_PRM );
+}
+
+
+/*
+ * get_rectwaveguide_elec
+ * get and assign rectwaveguide electrical parameters
+ * into rectwaveguide structure
+ */
+void RECTWAVEGUIDE::get_rectwaveguide_elec()
+{
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+/*
+ * get_rectwaveguide_phys
+ * get and assign rectwaveguide physical parameters
+ * into rectwaveguide structure
+ */
+void RECTWAVEGUIDE::get_rectwaveguide_phys()
+{
+ a = getProperty( PHYS_WIDTH_PRM );
+ b = getProperty( PHYS_S_PRM );
+ l = getProperty( PHYS_LEN_PRM );
+}
+
+
+/*
+ * analyze - analysis function
+ */
+void RECTWAVEGUIDE::analyze()
+{
+ double lambda_g;
+ double k_square;
+
+ /* Get and assign substrate parameters */
+ get_rectwaveguide_sub();
+
+ /* Get and assign component parameters */
+ get_rectwaveguide_comp();
+
+ /* Get and assign physical parameters */
+ get_rectwaveguide_phys();
+
+ k_square = kval_square();
+
+ if( kc_square( 1, 0 ) <= k_square )
+ {
+ /* propagating modes */
+
+ // Z0 definition using fictive voltages and currents
+ Z0 = 2.0* ZF0* sqrt( mur / er ) * (b / a) / sqrt( 1.0 - pow( (fc( 1, 0 ) / f), 2.0 ) );
+
+ /* calculate electrical angle */
+ lambda_g = 2.0 * M_PI / sqrt( k_square - kc_square( 1, 0 ) );
+ ang_l = 2.0 * M_PI * l / lambda_g; /* in radians */
+ atten_cond = alphac() * l;
+ atten_dielectric = alphad() * l;
+ er_eff = ( 1.0 - pow( fc( 1, 0 ) / f, 2.0 ) );
+ }
+ else
+ {
+ /* evanascent modes */
+ Z0 = 0;
+ ang_l = 0;
+ er_eff = 0;
+ atten_dielectric = 0.0;
+ atten_cond = alphac_cutoff() * l;
+ }
+
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ show_results();
+}
+
+
+/*
+ * synthesize - synthesis function
+ */
+void RECTWAVEGUIDE::synthesize()
+{
+ double lambda_g, k_square, beta;
+
+ /* Get and assign substrate parameters */
+ get_rectwaveguide_sub();
+
+ /* Get and assign component parameters */
+ get_rectwaveguide_comp();
+
+ /* Get and assign electrical parameters */
+ get_rectwaveguide_elec();
+
+ /* Get and assign physical parameters */
+ get_rectwaveguide_phys();
+
+
+ if( isSelected( PHYS_S_PRM ) )
+ {
+ /* solve for b */
+ b = Z0 * a * sqrt( 1.0 - pow( fc( 1, 0 ) / f, 2.0 ) ) / ( 2.0 * ZF0 * sqrt( mur / er ) );
+ setProperty( PHYS_S_PRM, b );
+ }
+ else if( isSelected( PHYS_WIDTH_PRM ) )
+ {
+ /* solve for a */
+ a = sqrt( pow( 2.0 * ZF0 * b / Z0, 2.0 ) + pow( C0 / (2.0 * f), 2.0 ) );
+ setProperty( PHYS_WIDTH_PRM, a );
+ }
+
+ k_square = kval_square();
+ beta = sqrt( k_square - kc_square( 1, 0 ) );
+ lambda_g = 2.0 * M_PI / beta;
+ l = (ang_l * lambda_g) / (2.0 * M_PI); /* in m */
+
+ setProperty( PHYS_LEN_PRM, l );
+
+ if( kc_square( 1, 0 ) <= k_square )
+ {
+ /*propagating modes */
+ beta = sqrt( k_square - kc_square( 1, 0 ) );
+ lambda_g = 2.0 * M_PI / beta;
+ atten_cond = alphac() * l;
+ atten_dielectric = alphad() * l;
+ er_eff = ( 1.0 - pow( (fc( 1, 0 ) / f), 2.0 ) );
+ }
+ else
+ {
+ /*evanascent modes */
+ Z0 = 0;
+ ang_l = 0;
+ er_eff = 0;
+ atten_dielectric = 0.0;
+ atten_cond = alphac_cutoff() * l;
+ }
+
+ show_results();
+}
+
+
+#define MAXSTRLEN 128
+void RECTWAVEGUIDE::show_results()
+{
+ int m, n, max = 6;
+ char text[MAXSTRLEN], txt[32];
+
+ // Z0EH = Ey / Hx (definition with field quantities)
+ Z0EH = ZF0 * sqrt( kval_square() / ( kval_square() - kc_square( 1, 0 ) ) );
+ setResult( 0, Z0EH, "Ohm" );
+
+ setResult( 1, er_eff, "" );
+ setResult( 2, atten_cond, "dB" );
+ setResult( 3, atten_dielectric, "dB" );
+
+ // show possible TE modes (H modes)
+ if( f < fc( 1, 0 ) )
+ strcpy( text, "none" );
+ else
+ {
+ strcpy( text, "" );
+ for( m = 0; m<= max; m++ )
+ {
+ for( n = 0; n<= max; n++ )
+ {
+ if( (m == 0) && (n == 0) )
+ continue;
+ if( f >= ( fc( m, n ) ) )
+ {
+ sprintf( txt, "H(%u,%u) ", m, n );
+ if( (strlen( text ) + strlen( txt ) + 5) < MAXSTRLEN )
+ strcat( text, txt );
+ else
+ {
+ strcat( text, "..." );
+ m = n = max + 1; // print no more modes
+ }
+ }
+ }
+ }
+ }
+ setResult( 4, text );
+
+ // show possible TM modes (E modes)
+ if( f < fc( 1, 1 ) )
+ strcpy( text, "none" );
+ else
+ {
+ strcpy( text, "" );
+ for( m = 1; m<= max; m++ )
+ {
+ for( n = 1; n<= max; n++ )
+ {
+ if( f >= fc( m, n ) )
+ {
+ sprintf( txt, "E(%u,%u) ", m, n );
+ if( (strlen( text ) + strlen( txt ) + 5) < MAXSTRLEN )
+ strcat( text, txt );
+ else
+ {
+ strcat( text, "..." );
+ m = n = max + 1; // print no more modes
+ }
+ }
+ }
+ }
+ }
+ setResult( 5, text );
+}
diff --git a/pcb_calculator/transline/rectwaveguide.h b/pcb_calculator/transline/rectwaveguide.h
new file mode 100644
index 0000000000..66900141c6
--- /dev/null
+++ b/pcb_calculator/transline/rectwaveguide.h
@@ -0,0 +1,64 @@
+/*
+ * rectwaveguide.h - rectangular waveguide class definition
+ *
+ * Copyright (C) 2001 Gopal Narayanan
+ * Copyright (C) 2005 Stefan Jahn
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __RECTWAVEGUIDE_H
+#define __RECTWAVEGUIDE_H
+
+class RECTWAVEGUIDE : public TRANSLINE
+{
+public: RECTWAVEGUIDE();
+
+private:
+ double mur; /* magnetic permeability of substrate */
+ double tanm; /* Magnetic Loss Tangent */
+ double a; /* width of waveguide */
+ double b; /* height of waveguide */
+ double l; /* length of waveguide */
+ double Z0; /* characteristic impedance */
+ double Z0EH; /* characteristic impedance of field quantities*/
+ double ang_l; /* Electrical length in angle */
+ double er_eff; /* Effective dielectric constant */
+ double mur_eff; /* Effective mag. permeability */
+ double atten_dielectric; /* Loss in dielectric (dB) */
+ double atten_cond; /* Loss in conductors (dB) */
+ double fc10; /* Cutoff frequency for TE10 mode */
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ double kval_square();
+ double kc_square( int, int );
+ double fc( int, int );
+ double alphac();
+ double alphac_cutoff();
+ double alphad();
+ void get_rectwaveguide_sub();
+ void get_rectwaveguide_comp();
+ void get_rectwaveguide_phys();
+ void get_rectwaveguide_elec();
+ void show_results();
+};
+
+#endif /* __RECTWAVEGUIDE_H */
diff --git a/pcb_calculator/transline/stripline.cpp b/pcb_calculator/transline/stripline.cpp
new file mode 100644
index 0000000000..f4a145fc51
--- /dev/null
+++ b/pcb_calculator/transline/stripline.cpp
@@ -0,0 +1,198 @@
+/*
+ * stripline.cpp - stripline class definition
+ *
+ * Copyright (C) 2011 Michael Margraf
+ * Modifications 2011 for Kicad: Jean-Pierre Charras
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "stripline.h"
+
+STRIPLINE::STRIPLINE() : TRANSLINE()
+{
+ m_name = "StripLine";
+}
+
+
+// -------------------------------------------------------------------
+void STRIPLINE::getProperties()
+{
+ f = getProperty( FREQUENCY_PRM );
+ w = getProperty( PHYS_WIDTH_PRM );
+ len = getProperty( PHYS_LEN_PRM );
+ h = getProperty( H_PRM);
+ a = getProperty( STRIPLINE_A_PRM );
+ t = getProperty( T_PRM );
+
+ er = getProperty( EPSILONR_PRM );
+ murC = getProperty( MURC_PRM );
+ tand = getProperty( TAND_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+// -------------------------------------------------------------------
+// calculate characteristic impedance and conductor loss
+double STRIPLINE::lineImpedance( double height, double& ac )
+{
+ double ZL;
+ double hmt = height - t;
+
+ ac = sqrt( f / sigma / 17.2 );
+ if( w / hmt >= 0.35 )
+ {
+ ZL = w +
+ ( 2.0 * height *
+ log( (2.0 * height - t) / hmt ) - t * log( height * height / hmt / hmt - 1.0 ) ) / M_PI;
+ ZL = ZF0 * hmt / sqrt( er ) / 4.0 / ZL;
+
+ ac *= 2.02e-6 * er * ZL / hmt;
+ ac *= 1.0 + 2.0 * w / hmt + (height + t) / hmt / M_PI* log( 2.0 * height / t - 1.0 );
+ }
+ else
+ {
+ double tdw = t / w;
+ if( t / w > 1.0 )
+ tdw = w / t;
+ double de = 1.0 + tdw / M_PI * ( 1.0 + log( 4.0 * M_PI / tdw ) ) + 0.236 * pow( tdw, 1.65 );
+ if( t / w > 1.0 )
+ de *= t / 2.0;
+ else
+ de *= w / 2.0;
+ ZL = ZF0 / 2.0 / M_PI / sqrt( er ) * log( 4.0 * height / M_PI / de );
+
+ ac *= 0.01141 / ZL / de;
+ ac *= de / height + 0.5 + tdw / 2.0 / M_PI + 0.5 / M_PI* log( 4.0 * M_PI / tdw )
+ + 0.1947 * pow( tdw, 0.65 ) - 0.0767 * pow( tdw, 1.65 );
+ }
+
+ return ZL;
+}
+
+
+// -------------------------------------------------------------------
+void STRIPLINE::calc()
+{
+ skindepth = skin_depth();
+
+ er_eff = er; // no dispersion
+
+ double ac1, ac2;
+ Z0 = 2.0 /
+ ( 1.0 / lineImpedance( 2.0 * a + t, ac1 ) + 1.0 / lineImpedance( 2.0 * (h - a) - t, ac2 ) );
+
+ atten_cond = len * 0.5 * (ac1 + ac2);
+ atten_dielectric = 20.0 / log( 10.0 ) * len * (M_PI / C0) * f * sqrt( er ) * tand;
+
+ ang_l = 2.0* M_PI* len* sqrt( er ) * f / C0; // in radians
+}
+
+
+// -------------------------------------------------------------------
+void STRIPLINE::show_results()
+{
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ setResult( 0, er_eff, "" );
+ setResult( 1, atten_cond, "dB" );
+ setResult( 2, atten_dielectric, "dB" );
+
+ setResult( 3, skindepth / UNIT_MICRON, "µm" );
+}
+
+
+// -------------------------------------------------------------------
+void STRIPLINE::analyze()
+{
+ getProperties();
+ calc();
+ show_results();
+}
+
+
+#define MAX_ERROR 0.000001
+
+// -------------------------------------------------------------------
+void STRIPLINE::synthesize()
+{
+ double Z0_dest, Z0_current, Z0_result, increment, slope, error;
+ int iteration;
+
+ getProperties();
+
+ /* required value of Z0 */
+ Z0_dest = Z0;
+
+ /* Newton's method */
+ iteration = 0;
+
+ /* compute parameters */
+ calc();
+ Z0_current = Z0;
+
+ error = fabs( Z0_dest - Z0_current );
+
+ while( error > MAX_ERROR )
+ {
+ iteration++;
+ increment = w / 100.0;
+ w += increment;
+ /* compute parameters */
+ calc();
+ Z0_result = Z0;
+ /* f(w(n)) = Z0 - Z0(w(n)) */
+ /* f'(w(n)) = -f'(Z0(w(n))) */
+ /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
+ /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
+ slope = (Z0_result - Z0_current) / increment;
+ slope = (Z0_dest - Z0_current) / slope - increment;
+ w += slope;
+ if( w <= 0.0 )
+ w = increment;
+ /* find new error */
+ /* compute parameters */
+ calc();
+ Z0_current = Z0;
+ error = fabs( Z0_dest - Z0_current );
+ if( iteration > 100 )
+ break;
+ }
+
+ setProperty( PHYS_WIDTH_PRM, w );
+ /* calculate physical length */
+ ang_l = getProperty( ANG_L_PRM );
+ len = C0 / f / sqrt( er_eff ) * ang_l / 2.0 / M_PI; /* in m */
+ setProperty( PHYS_LEN_PRM, len );
+
+ /* compute parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
diff --git a/pcb_calculator/transline/stripline.h b/pcb_calculator/transline/stripline.h
new file mode 100644
index 0000000000..628e1e2be4
--- /dev/null
+++ b/pcb_calculator/transline/stripline.h
@@ -0,0 +1,54 @@
+/*
+ * stripline.h - stripline class definition
+ *
+ * Copyright (C) 2011 Michael Margraf
+ * Modifications 2011 for Kicad: Jean-Pierre Charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __STRIPLINE_H
+#define __STRIPLINE_H
+
+class STRIPLINE : public TRANSLINE
+{
+public: STRIPLINE();
+
+private:
+ double h; // height of substrate
+ double a; // distance of strip to top metal
+ double t; // thickness of top metal
+ double w; // width of line
+ double len; // length of line
+ double Z0; // characteristic impedance
+ double ang_l; // electrical length in angle
+ double er_eff; // effective dielectric constant
+ double atten_dielectric; // loss in dielectric (dB)
+ double atten_cond; // loss in conductors (dB)
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ double lineImpedance( double, double& );
+ void calc();
+ void show_results();
+ void getProperties();
+};
+
+#endif
diff --git a/pcb_calculator/transline/transline.cpp b/pcb_calculator/transline/transline.cpp
new file mode 100644
index 0000000000..b0fc61ffdc
--- /dev/null
+++ b/pcb_calculator/transline/transline.cpp
@@ -0,0 +1,187 @@
+/*
+ * TRANSLINE.cpp - base for a transmission line implementation
+ *
+ * Copyright (C) 2005 Stefan Jahn
+ * Modified for Kicad: 2011 jean-pierre.charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "transline.h"
+#include "units.h"
+
+// Functions to Read/Write parameters in pcb_calculator main frame:
+// They are wrapper to actual functions, so all transline functions do not
+// depend on Graphic User Interface
+void SetPropertyInDialog( enum PRMS_ID aPrmId, double value );
+
+/* Puts the text into the given result line.
+*/
+void SetResultInDialog( int line, const char* text );
+
+/* print aValue into the given result line.
+*/
+void SetResultInDialog( int aLineNumber, double aValue, const char* aText );
+
+/* Returns a named property value. */
+double GetPropertyInDialog( enum PRMS_ID aPrmId );
+
+// Returns true if the param aPrmId is selected
+// Has meaning only for params that have a radio button
+bool IsSelectedInDialog( enum PRMS_ID aPrmId );
+
+
+/* Constructor creates a transmission line instance. */
+TRANSLINE::TRANSLINE()
+{
+ murC = 1.0;
+ m_name = (const char*) 0;
+}
+
+
+/* Destructor destroys a transmission line instance. */
+TRANSLINE::~TRANSLINE()
+{
+}
+
+
+/* Sets a named property to the given value, access through the
+ * application.
+ */
+void TRANSLINE::setProperty( enum PRMS_ID aPrmId, double value )
+{
+ SetPropertyInDialog( aPrmId, value );
+}
+
+/*
+ *Returns true if the param aPrmId is selected
+ * Has meaning only for params that have a radio button
+ */
+bool TRANSLINE::isSelected( enum PRMS_ID aPrmId )
+{
+ return IsSelectedInDialog( aPrmId );
+}
+
+
+/* Puts the text into the given result line.
+*/
+void TRANSLINE::setResult( int line, const char* text )
+{
+ SetResultInDialog( line, text );
+}
+void TRANSLINE::setResult( int line, double value, const char* text )
+{
+ SetResultInDialog( line, value, text );
+}
+
+
+/* Returns a property value. */
+double TRANSLINE::getProperty( enum PRMS_ID aPrmId )
+{
+ return GetPropertyInDialog( aPrmId );
+}
+
+/*
+ * skin_depth - calculate skin depth
+ */
+#include
+double TRANSLINE::skin_depth()
+{
+ double depth;
+ depth = 1.0 / sqrt( M_PI * f * murC * MU0 * sigma );
+ return depth;
+}
+
+
+/* *****************************************************************
+********** **********
+********** mathematical functions **********
+********** **********
+***************************************************************** */
+
+#define NR_EPSI 2.2204460492503131e-16
+
+/* The function computes the complete elliptic integral of first kind
+ * K() and the second kind E() using the arithmetic-geometric mean
+ * algorithm (AGM) by Abramowitz and Stegun. */
+void TRANSLINE::ellipke( double arg, double& k, double& e )
+{
+ int iMax = 16;
+
+ if( arg == 1.0 )
+ {
+ k = INFINITY; // infinite
+ e = 0;
+ }
+ else if( isinf( arg ) && arg < 0 )
+ {
+ k = 0;
+ e = INFINITY; // infinite
+ }
+ else
+ {
+ double a, b, c, f, s, fk = 1, fe = 1, t, da = arg;
+ int i;
+ if( arg < 0 )
+ {
+ fk = 1 / sqrt( 1 - arg );
+ fe = sqrt( 1 - arg );
+ da = -arg / (1 - arg);
+ }
+ a = 1;
+ b = sqrt( 1 - da );
+ c = sqrt( da );
+ f = 0.5;
+ s = f * c * c;
+ for( i = 0; i < iMax; i++ )
+ {
+ t = (a + b) / 2;
+ c = (a - b) / 2;
+ b = sqrt( a * b );
+ a = t;
+ f *= 2;
+ s += f * c * c;
+ if( c / a < NR_EPSI )
+ break;
+ }
+
+ if( i >= iMax )
+ {
+ k = 0; e = 0;
+ }
+ else
+ {
+ k = M_PI_2 / a;
+ e = M_PI_2 * (1 - s) / a;
+ if( arg < 0 )
+ {
+ k *= fk;
+ e *= fe;
+ }
+ }
+ }
+}
+
+
+/* We need to know only K(k), and if possible KISS. */
+double TRANSLINE::ellipk( double k )
+{
+ double r, lost;
+
+ ellipke( k, r, lost );
+ return r;
+}
diff --git a/pcb_calculator/transline/transline.h b/pcb_calculator/transline/transline.h
new file mode 100644
index 0000000000..2aaa830925
--- /dev/null
+++ b/pcb_calculator/transline/transline.h
@@ -0,0 +1,86 @@
+/*
+ * transline.h - base for a transmission line class definition
+ *
+ * Copyright (C) 2005 Stefan Jahn
+ * Modifications 2011 for Kicad: Jean-Pierre Charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __TRANSLINE_H
+#define __TRANSLINE_H
+
+// IDs for lines parameters used in calculation:
+// (Used to retrieve these parameters from UI.
+// DUMMY_PRM is used to skip a param line in dialogs. It is not really a parameter
+enum PRMS_ID
+{
+ UNKNOWN_ID = 0,
+ EPSILONR_PRM,
+ TAND_PRM,
+ RHO_PRM,
+ H_PRM,
+ TWISTEDPAIR_TWIST_PRM,
+ H_T_PRM,
+ STRIPLINE_A_PRM,
+ T_PRM,
+ ROUGH_PRM,
+ MUR_PRM,
+ TWISTEDPAIR_EPSILONR_ENV_PRM,
+ MURC_PRM,
+ TANM_PRM,
+ FREQUENCY_PRM,
+ Z0_PRM,
+ Z0_E_PRM,
+ Z0_O_PRM,
+ ANG_L_PRM,
+ PHYS_WIDTH_PRM,
+ PHYS_DIAM_IN_PRM,
+ PHYS_S_PRM,
+ PHYS_DIAM_OUT_PRM,
+ PHYS_LEN_PRM,
+ DUMMY_PRM
+};
+
+class TRANSLINE
+{
+public: TRANSLINE();
+ virtual ~TRANSLINE();
+
+ const char *m_name;
+ void setProperty( enum PRMS_ID aPrmId, double aValue);
+ double getProperty( enum PRMS_ID aPrmId );
+ void setResult( int, double, const char* );
+ void setResult( int, const char* );
+ bool isSelected( enum PRMS_ID aPrmId );
+
+ virtual void synthesize() { };
+ virtual void analyze() { };
+
+protected:
+ double f; /* Frequency of operation */
+ double er; /* dielectric constant */
+ double tand; /* Dielectric Loss Tangent */
+ double sigma; /* Conductivity of the metal */
+ double murC; /* magnetic permeability of conductor */
+ double skindepth; /* Skin depth */
+ double skin_depth();
+ void ellipke( double, double&, double& );
+ double ellipk( double );
+};
+
+#endif /* __TRANSLINE_H */
diff --git a/pcb_calculator/transline/twistedpair.cpp b/pcb_calculator/transline/twistedpair.cpp
new file mode 100644
index 0000000000..8893252f52
--- /dev/null
+++ b/pcb_calculator/transline/twistedpair.cpp
@@ -0,0 +1,173 @@
+/*
+ * twistedpair.h - twisted pair class definition
+ *
+ * Copyright (C) 2011 Michael Margraf
+ * Modifications 2011 for Kicad: Jean-Pierre Charras
+ *
+ * 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 2 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include
+#include
+#include
+#include
+
+#include "units.h"
+#include "transline.h"
+#include "twistedpair.h"
+
+TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE()
+{
+ m_name = "TwistedPair";
+}
+
+
+// -------------------------------------------------------------------
+void TWISTEDPAIR::getProperties()
+{
+ f = getProperty( FREQUENCY_PRM );
+ din = getProperty( PHYS_DIAM_IN_PRM );
+ dout = getProperty( PHYS_DIAM_OUT_PRM );
+ len = getProperty( PHYS_LEN_PRM );
+
+ er = getProperty( EPSILONR_PRM );
+ murC = getProperty( MURC_PRM );
+ tand = getProperty( TAND_PRM );
+ sigma = 1.0 / getProperty( RHO_PRM );
+ twists = getProperty( TWISTEDPAIR_TWIST_PRM );
+ er_env = getProperty( TWISTEDPAIR_EPSILONR_ENV_PRM );
+ Z0 = getProperty( Z0_PRM );
+ ang_l = getProperty( ANG_L_PRM );
+}
+
+
+// -------------------------------------------------------------------
+void TWISTEDPAIR::calc()
+{
+ skindepth = skin_depth();
+
+ double tw = atan( twists * M_PI * dout ); // pitch angle
+ er_eff = er_env + (0.25 + 0.0007 * tw * tw) * (er - er_env);
+
+ Z0 = ZF0 / M_PI / sqrt( er_eff ) * acosh( dout / din );
+
+ atten_cond = 10.0 / log( 10.0 ) * len / skindepth / sigma / M_PI / Z0 / (din - skindepth);
+
+ atten_dielectric = 20.0 / log( 10.0 ) * len * M_PI / C0* f* sqrt( er_eff ) * tand;
+
+ ang_l = 2.0* M_PI* len* sqrt( er_eff ) * f / C0; // in radians
+}
+
+
+// -------------------------------------------------------------------
+void TWISTEDPAIR::show_results()
+{
+ setProperty( Z0_PRM, Z0 );
+ setProperty( ANG_L_PRM, ang_l );
+
+ setResult( 0, er_eff, "" );
+ setResult( 1, atten_cond, "dB" );
+ setResult( 2, atten_dielectric, "dB" );
+
+ setResult( 3, skindepth / UNIT_MICRON, "µm" );
+}
+
+
+// -------------------------------------------------------------------
+void TWISTEDPAIR::analyze()
+{
+ getProperties();
+ calc();
+ show_results();
+}
+
+
+#define MAX_ERROR 0.000001
+
+// -------------------------------------------------------------------
+void TWISTEDPAIR::synthesize()
+{
+ double Z0_dest, Z0_current, Z0_result, increment, slope, error;
+ int iteration;
+
+ getProperties();
+
+ /* required value of Z0 */
+ Z0_dest = Z0;
+
+ /* Newton's method */
+ iteration = 0;
+
+ /* compute parameters */
+ calc();
+ Z0_current = Z0;
+
+ error = fabs( Z0_dest - Z0_current );
+
+ while( error > MAX_ERROR )
+ {
+ iteration++;
+ if( isSelected( PHYS_DIAM_IN_PRM ) )
+ {
+ increment = din / 100.0;
+ din += increment;
+ }
+ else
+ {
+ increment = dout / 100.0;
+ dout += increment;
+ }
+ /* compute parameters */
+ calc();
+ Z0_result = Z0;
+ /* f(w(n)) = Z0 - Z0(w(n)) */
+ /* f'(w(n)) = -f'(Z0(w(n))) */
+ /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
+ /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
+ slope = (Z0_result - Z0_current) / increment;
+ slope = (Z0_dest - Z0_current) / slope - increment;
+ if( isSelected( PHYS_DIAM_IN_PRM ) )
+ din += slope;
+ else
+ dout += slope;
+ if( din <= 0.0 )
+ din = increment;
+ if( dout <= 0.0 )
+ dout = increment;
+ /* find new error */
+ /* compute parameters */
+ calc();
+ Z0_current = Z0;
+ error = fabs( Z0_dest - Z0_current );
+ if( iteration > 100 )
+ break;
+ }
+
+ setProperty( PHYS_DIAM_IN_PRM, din );
+ setProperty( PHYS_DIAM_OUT_PRM, dout );
+ /* calculate physical length */
+ ang_l = getProperty( ANG_L_PRM );
+ len = C0 / f / sqrt( er_eff ) * ang_l / 2.0 / M_PI; /* in m */
+ setProperty( PHYS_LEN_PRM, len );
+
+ /* compute parameters */
+ calc();
+
+ /* print results in the subwindow */
+ show_results();
+}
diff --git a/pcb_calculator/transline/twistedpair.h b/pcb_calculator/transline/twistedpair.h
new file mode 100644
index 0000000000..d0e71b3362
--- /dev/null
+++ b/pcb_calculator/transline/twistedpair.h
@@ -0,0 +1,53 @@
+/*
+ * twistedpair.h - twisted pair class definition
+ *
+ * Copyright (C) 2011 Michael Margraf
+ * Modifications 2011 for Kicad: Jean-Pierre Charras
+ *
+ * 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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __TWISTEDPAIR_H
+#define __TWISTEDPAIR_H
+
+class TWISTEDPAIR : public TRANSLINE
+{
+public: TWISTEDPAIR();
+
+private:
+ double din; /* Inner diameter of conductor */
+ double dout; /* Outer diameter of insulator */
+ double twists; /* Twists per length */
+ double er_env; /* dielectric constant of environment*/
+ double len; /* Length of cable */
+ double Z0; /* characteristic impedance */
+ double ang_l; /* Electrical length in angle */
+ double er_eff; /* Effective dielectric constant */
+ double atten_dielectric; /* Loss in dielectric (dB) */
+ double atten_cond; /* Loss in conductors (dB) */
+
+public:
+ void analyze();
+ void synthesize();
+
+private:
+ void calc();
+ void show_results();
+ void getProperties();
+};
+
+#endif
diff --git a/pcb_calculator/transline/units.h b/pcb_calculator/transline/units.h
new file mode 100644
index 0000000000..937b26fdc8
--- /dev/null
+++ b/pcb_calculator/transline/units.h
@@ -0,0 +1,48 @@
+/*
+ * units.h - some conversion definitions
+ *
+ * Copyright (C) 1992-2011 jean-pierre.charras
+ * Copyright (C) 1992-2011 Kicad Developers, see change_log.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 2
+ * 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 package; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __UNITS_H
+#define __UNITS_H
+
+#include
+#include "units_scales.h"
+
+#ifdef __MINGW32__
+#define atanh(x) (0.5 * log((1.0 + (x)) / (1.0 - (x))))
+#define asinh(x) log((x) + sqrt((x) * (x) + 1.0))
+#define acosh(x) log((x) + sqrt((x) * (x) - 1.0))
+#endif
+
+#ifndef M_PI
+#define M_PI 3.1415926535897932384626433832795029 /* pi */
+#endif
+
+#ifndef M_E
+#define M_E 2.7182818284590452353602874713526625 /* e */
+#endif
+
+#define MU0 12.566370614e-7 // magnetic constant
+#define C0 299792458.0 // speed of light in vacuum
+#define ZF0 376.73031346958504364963 // wave resistance in vacuum
+
+#endif /* __UNITS_H */
diff --git a/pcb_calculator/transline_dlg_funct.cpp b/pcb_calculator/transline_dlg_funct.cpp
new file mode 100644
index 0000000000..9d078e1cca
--- /dev/null
+++ b/pcb_calculator/transline_dlg_funct.cpp
@@ -0,0 +1,390 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 1992-2011 Kicad Developers, see change_log.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 2
+ * 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, you may find one here:
+ * 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/config.h"
+#include "wx/filename.h"
+
+#include "pcb_calculator_frame_base.h"
+
+#include "pcb_calculator.h"
+#include "UnitSelector.h"
+
+extern double ReturnDoubleFromString( const wxString& TextValue );
+
+
+/*
+ * these values come from QucsStudio ( by Michael Margraf )
+ */
+
+// Display a selection of usual Er, TanD, Rho values
+// format is
+
+/**
+ * Function OnEpsilonR_Button
+ * Shows a list of current relative dielectric constant(Er)
+ * and set the selected value in main dialog frame
+ */
+void PCB_CALCULATOR_FRAME::OnTranslineEpsilonR_Button( wxCommandEvent& event )
+{
+ wxArrayString list;
+
+ // 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,
+ _("Relative Dielectric Constants"), list).BeforeFirst( ' ' );
+ if( ! value.IsEmpty() )
+ m_Value_EpsilonR->SetValue( value );
+}
+
+/**
+ * Function OnTanD_Button
+ * Shows a list of current dielectric loss factor (tangent delta)
+ * and set the selected value in main dialog frame
+ */
+void PCB_CALCULATOR_FRAME::OnTranslineTanD_Button( wxCommandEvent& event )
+{
+ wxArrayString list;
+
+ // List of current dielectric loss factor (tangent delta)
+ list.Clear();
+ list.Add( wxT( "2e-2 FR4 @ 1GHz" ) );
+ 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,
+ _("Dielectric Loss Factor"), list).BeforeFirst( ' ' );
+ if( ! value.IsEmpty() )
+ m_Value_TanD->SetValue( value );
+}
+
+/**
+ * Function OnTranslineRho_Button
+ * Shows a list of current Specific resistance list (rho)
+ * and set the selected value in main dialog frame
+ */
+void PCB_CALCULATOR_FRAME::OnTranslineRho_Button( wxCommandEvent& event )
+{
+ 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" ) );
+
+ wxString value = wxGetSingleChoice( wxEmptyString,
+ _("Specific Resistance"), list).BeforeFirst( ' ' );
+ if( ! value.IsEmpty() )
+ m_Value_Rho->SetValue( value );
+}
+
+// Minor helper struct to handle dialog items for a given parameter
+struct DLG_PRM_DATA
+{
+ wxStaticText * name;
+ wxTextCtrl * value;
+ UNIT_SELECTOR * unit;
+};
+/**
+ * Function TranslineTypeSelection
+ * Must be called after selection of a new transline.
+ * Update all values, labels and tool tips of parameters needed
+ * by the new transline
+ * Irrelevant parameters texts are blanked.
+ * @param aType = the transline_type_id of the new selected transline
+*/
+void PCB_CALCULATOR_FRAME::TranslineTypeSelection( enum transline_type_id aType )
+{
+ wxString msg;
+ #define DOUBLE_TO_CTLR( dlg_item, value ) { msg.Printf( wxT( "%g" ), value );\
+ dlg_item->SetValue( msg ); }
+ m_currTransLineType = aType;
+
+ if( (m_currTransLineType < start_of_list_type )
+ || ( m_currTransLineType >= end_of_list_type ) )
+ m_currTransLineType = default_type;
+
+ TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
+ m_currTransLine = tr_ident->m_TLine;
+
+ m_radioBtnPrm1->Show( tr_ident->m_HasPrmSelection );
+ m_radioBtnPrm2->Show( tr_ident->m_HasPrmSelection );
+
+ // Setup messages
+ wxStaticText* left_msg_list[] =
+ {
+ m_left_message1, m_left_message2, m_left_message3,
+ m_left_message4, m_left_message5, m_left_message6,
+ m_left_message7, NULL
+ };
+ wxStaticText* msg_list[] =
+ {
+ m_Message1, m_Message2, m_Message3,
+ m_Message4, m_Message5, m_Message6,
+ m_Message7, NULL
+ };
+
+ unsigned ii = 0;
+ for( ; ii < tr_ident->m_Messages.GetCount(); ii++ )
+ {
+ if( left_msg_list[ii] == NULL )
+ break;
+ left_msg_list[ii]->SetLabel( tr_ident->m_Messages[ii] );
+ msg_list[ii]->SetLabel( wxEmptyString );
+ }
+
+ while( left_msg_list[ii] )
+ {
+ left_msg_list[ii]->SetLabel( wxEmptyString );
+ msg_list[ii]->SetLabel( wxEmptyString );
+ ii++;
+ }
+
+ // Init parameters dialog items
+ struct DLG_PRM_DATA substrateprms[] =
+ {
+ { m_EpsilonR_label,m_Value_EpsilonR, NULL },
+ { m_TanD_label,m_Value_TanD, NULL },
+ { m_Rho_label, m_Value_Rho, NULL },
+ { m_substrate_prm4_label,m_Substrate_prm4_Value, m_SubsPrm4_choiceUnit },
+ { m_substrate_prm5_label,m_Substrate_prm5_Value, m_SubsPrm5_choiceUnit },
+ { m_substrate_prm6_label,m_Substrate_prm6_Value, m_SubsPrm6_choiceUnit },
+ { m_substrate_prm7_label,m_Substrate_prm7_Value, m_SubsPrm7_choiceUnit },
+ { m_substrate_prm8_label,m_Substrate_prm8_Value, m_SubsPrm8_choiceUnit },
+ { m_substrate_prm9_label,m_Substrate_prm9_Value, m_SubsPrm9_choiceUnit }
+ };
+ #define substrateprms_cnt (sizeof(substrateprms)/sizeof(substrateprms[0]))
+
+ struct DLG_PRM_DATA physprms[] =
+ {
+ { m_phys_prm1_label,m_Phys_prm1_Value,m_choiceUnit_Param1 },
+ { m_phys_prm2_label,m_Phys_prm2_Value,m_choiceUnit_Param2 },
+ { m_phys_prm3_label,m_Phys_prm3_Value,m_choiceUnit_Param3 }
+ };
+ #define physprms_cnt (sizeof(physprms)/sizeof(physprms[0]))
+
+ struct DLG_PRM_DATA elecprms[] =
+ {
+ { m_elec_prm1_label,m_Elec_prm1_Value, m_choiceUnit_ElecPrm1 },
+ { m_elec_prm2_label,m_Elec_prm2_Value, m_choiceUnit_ElecPrm2 },
+ { m_elec_prm3_label,m_Elec_prm3_Value, m_choiceUnit_ElecPrm3 }
+ };
+ #define elecprms_cnt (sizeof(elecprms)/sizeof(elecprms[0]))
+
+ struct DLG_PRM_DATA frequencyprms[] =
+ {
+ { m_Frequency_label,m_Value_Frequency_Ctrl, m_choiceUnit_Frequency }
+ };
+ #define frequencyprms_cnt (sizeof(frequencyprms)/sizeof(frequencyprms[0]))
+
+ unsigned idxsubs = 0;
+ unsigned idxphys = 0;
+ unsigned idxelec = 0;
+ unsigned idxfreq = 0;
+
+ for( unsigned ii = 0; ii < tr_ident->GetPrmsCount(); ii++ )
+ {
+ TRANSLINE_PRM* prm = tr_ident->GetPrm( ii );
+ struct DLG_PRM_DATA * data = NULL;
+ switch( prm->m_Type )
+ {
+ case PRM_TYPE_SUBS:
+ wxASSERT( idxsubs < substrateprms_cnt );
+ data = &substrateprms[idxsubs];
+ idxsubs++;
+ break;
+
+ case PRM_TYPE_PHYS:
+ wxASSERT( idxphys < physprms_cnt );
+ data = &physprms[idxphys];
+ idxphys++;
+ break;
+
+ case PRM_TYPE_ELEC:
+ wxASSERT( idxelec < elecprms_cnt );
+ data = &elecprms[idxelec];
+ idxelec++;
+ break;
+
+ case PRM_TYPE_FREQUENCY:
+ wxASSERT( idxfreq < frequencyprms_cnt );
+ data = &frequencyprms[idxfreq];
+ idxfreq++;
+ break;
+
+ }
+ wxASSERT ( data );
+ data->name->SetToolTip( prm->m_ToolTip );
+ data->name->SetLabel( prm->m_Label );
+ prm->m_ValueCtrl = data->value;
+ if( prm->m_Id != DUMMY_PRM )
+ {
+ DOUBLE_TO_CTLR( data->value, prm->m_Value );
+ data->value->Enable( true );
+ }
+ else
+ {
+ data->value->SetValue( wxEmptyString );
+ data->value->Enable( false );
+ }
+ if( prm->m_ConvUnit )
+ prm->m_UnitCtrl = data->unit;
+ if( data->unit )
+ {
+ data->unit->Show( prm->m_ConvUnit );
+ data->unit->Enable( prm->m_ConvUnit );
+ data->unit->SetSelection( prm->m_UnitSelection );
+ }
+
+ }
+
+ // Clear all unused params
+ for( ; idxsubs < substrateprms_cnt; idxsubs++ )
+ {
+ substrateprms[idxsubs].name->SetLabel(wxEmptyString);
+ substrateprms[idxsubs].name->SetToolTip(wxEmptyString);
+ substrateprms[idxsubs].value->SetValue(wxEmptyString);
+ substrateprms[idxsubs].value->Enable( false );
+ if( substrateprms[idxsubs].unit)
+ {
+ substrateprms[idxsubs].unit->Show( false );
+ substrateprms[idxsubs].unit->Enable( false );
+ substrateprms[idxsubs].unit->SetSelection( 0 );
+ }
+ }
+
+ for( ; idxphys < physprms_cnt; idxphys++ )
+ {
+ physprms[idxphys].name->SetLabel(wxEmptyString);
+ physprms[idxphys].name->SetToolTip(wxEmptyString);
+ physprms[idxphys].value->SetValue(wxEmptyString);
+ physprms[idxphys].value->Enable( false );
+ if( physprms[idxphys].unit)
+ {
+ physprms[idxphys].unit->Show( false );
+ physprms[idxphys].unit->Enable( false );
+ physprms[idxphys].unit->SetSelection( 0 );
+ }
+ }
+
+ for( ; idxelec < elecprms_cnt; idxelec++)
+ {
+ elecprms[idxelec].name->SetLabel(wxEmptyString);
+ elecprms[idxelec].name->SetToolTip(wxEmptyString);
+ elecprms[idxelec].value->SetValue(wxEmptyString);
+ elecprms[idxelec].value->Enable( false );
+ if( elecprms[idxelec].unit)
+ {
+ elecprms[idxelec].unit->Show( false );
+ elecprms[idxelec].unit->Enable( false );
+ elecprms[idxelec].unit->SetSelection( 0 );
+ }
+ }
+
+ for( ; idxfreq < frequencyprms_cnt; idxfreq++ )
+ {
+ frequencyprms[idxfreq].name->SetLabel(wxEmptyString);
+ frequencyprms[idxfreq].name->SetToolTip(wxEmptyString);
+ frequencyprms[idxfreq].value->SetValue(wxEmptyString);
+ frequencyprms[idxfreq].value->Enable( false );
+ if( frequencyprms[idxfreq].unit )
+ {
+ frequencyprms[idxfreq].unit->Show( false );
+ frequencyprms[idxfreq].unit->Enable( false );
+ frequencyprms[idxfreq].unit->SetSelection( 0 );
+ }
+ }
+}
+
+/**
+ * Function TransfDlgDataToTranslineParams
+ * Read values entered in dialog frame, and transfert these
+ * values in current transline parameters, converted in normalized units
+ */
+void PCB_CALCULATOR_FRAME::TransfDlgDataToTranslineParams()
+{
+ TRANSLINE_IDENT* tr_ident = m_transline_list[m_currTransLineType];
+ for( unsigned ii = 0; ii < tr_ident->GetPrmsCount(); ii++ )
+ {
+ TRANSLINE_PRM* prm = tr_ident->GetPrm( ii );
+ wxTextCtrl * value_ctrl = (wxTextCtrl * ) prm->m_ValueCtrl;
+ wxString value_txt = value_ctrl->GetValue();
+ double value = ReturnDoubleFromString(value_txt);
+ prm->m_Value = value;
+ UNIT_SELECTOR * unit_ctrl = (UNIT_SELECTOR * ) prm->m_UnitCtrl;
+ if( unit_ctrl )
+ {
+ prm->m_UnitSelection = unit_ctrl->GetSelection();
+ value *= unit_ctrl->GetUnitScale();
+ }
+ prm->m_NormalizedValue = value;
+ }
+}
+
+
+/**
+ * Function OnTranslineSelection
+ * Called on new transmission line selection
+*/
+void PCB_CALCULATOR_FRAME::OnTranslineSelection( wxCommandEvent& event )
+{
+ enum transline_type_id id = (enum transline_type_id) event.GetSelection();
+
+ TranslineTypeSelection( id );
+
+ // Texts and units choice widgets can have their size modified:
+ // The new size must be taken in account
+ m_panelTransline->GetSizer()->Layout();
+ m_panelTransline->Refresh();
+}
+
diff --git a/pcb_calculator/transline_ident.cpp b/pcb_calculator/transline_ident.cpp
new file mode 100644
index 0000000000..637b0c4f9b
--- /dev/null
+++ b/pcb_calculator/transline_ident.cpp
@@ -0,0 +1,438 @@
+/**
+ * @file transline_ident.cpp
+ */
+#include
+#include
+
+
+// Bitmaps:
+#include "c_microstrip.xpm"
+#include "microstrip.xpm"
+#include "twistedpair.xpm"
+#include "coax.xpm"
+#include "cpw.xpm"
+#include "cpw_back.xpm"
+#include "stripline.xpm"
+#include "rectwaveguide.xpm"
+
+// transline specific functions:
+#include "transline.h"
+#include "microstrip.h"
+#include "coplanar.h"
+#include "rectwaveguide.h"
+#include "coax.h"
+#include "c_microstrip.h"
+#include "stripline.h"
+#include "twistedpair.h"
+
+#include "transline_ident.h"
+#include "UnitSelector.h"
+
+
+/*
+ * class TRANSLINE_PRM
+ * A class to handle one parameter of transline
+ */
+TRANSLINE_PRM::TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId,
+ const wxString& aLabel,
+ const wxString& aToolTip,
+ double aValue,
+ bool aConvUnit )
+{
+ m_Type = aType;
+ m_Id = aId;
+ m_Label = aLabel;
+ m_ToolTip = aToolTip;
+ m_Value = aValue;
+ m_ConvUnit = aConvUnit;
+ m_ValueCtrl = NULL;
+ m_UnitCtrl = NULL;
+ m_UnitSelection = 0;
+}
+
+
+#define TRANSLINE_PRM_KEY wxT( "translineprm%d" )
+
+void TRANSLINE_PRM::ReadConfig( wxConfig* aConfig )
+{
+ if( m_Id == UNKNOWN_ID || m_Id == DUMMY_PRM )
+ return;
+ wxString key;
+ key.Printf( TRANSLINE_PRM_KEY, (int) m_Id );
+ aConfig->Read( key, &m_Value );
+ key += wxT( "unit" );
+ aConfig->Read( key, &m_UnitSelection );
+}
+
+
+void TRANSLINE_PRM::WriteConfig( wxConfig* aConfig )
+{
+ if( m_Id == UNKNOWN_ID || m_Id == DUMMY_PRM )
+ return;
+ wxString key;
+ key.Printf( TRANSLINE_PRM_KEY, (int) m_Id );
+ aConfig->Write( key, m_Value );
+ key += wxT( "unit" );
+ aConfig->Write( key, m_UnitSelection );
+}
+
+
+double TRANSLINE_PRM::ToUserUnit()
+{
+ if( m_UnitCtrl && m_ConvUnit )
+ return 1.0 / ( (UNIT_SELECTOR*) m_UnitCtrl )->GetUnitScale();
+ else
+ return 1.0;
+}
+
+
+double TRANSLINE_PRM::FromUserUnit()
+{
+ if( m_UnitCtrl )
+ return ( (UNIT_SELECTOR*) m_UnitCtrl )->GetUnitScale();
+ else
+ return 1.0;
+}
+
+
+/*
+ * class TRANSLINE_IDENT
+ * A class to handle a list of parameters of a given transline
+ */
+
+TRANSLINE_IDENT::TRANSLINE_IDENT( enum transline_type_id aType )
+{
+ m_Type = aType; // The type of transline handled
+ m_Icon = NULL; // An xpm icon to display in dialogs
+ m_TLine = NULL; // The TRANSLINE itself
+ m_HasPrmSelection = false; // true if selection of parameters must be enabled in dialog menu
+
+ // Add common prms:
+ // Default values are for FR4
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, EPSILONR_PRM,
+ _( "Er" ), _( "Epsilon R: substrate relative dielectric constant" ),
+ 4.6, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, TAND_PRM,
+ _( "TanD" ), _( "Tangent delta: dielectric loss factor." ), 2e-2,
+ false ) );
+
+ // Default value is for copper
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, RHO_PRM,
+ _( "Rho" ),
+ _(
+ "Electrical resistivity or specific electrical resistance of conductor (Ohm*meter)" ),
+ 1.72e-8, false ) );
+
+ // Default value is in GHz
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_FREQUENCY, FREQUENCY_PRM,
+ _( "Frequency" ), _( "Height of Substrate" ), 1.0, true ) );
+
+ switch( m_Type )
+ {
+ case microstrip_type: // microstrip
+ m_TLine = new MICROSTRIP();
+ m_Icon = new wxBitmap( microstrip_xpm );
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_PRM,
+ _( "H" ), _( "Height of Substrate" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_T_PRM,
+ _( "H_t" ), _( "Height of Box Top" ), 1e20, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, T_PRM,
+ _( "T" ), _( "Strip Thickness" ), 0.035, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, ROUGH_PRM,
+ _( "Rough" ), _( "Conductor Roughness" ), 0.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MUR_PRM,
+ _( "Mur" ),
+ _( "Relative Permeability of Substrate" ), 1, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "W" ), _( "Line Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
+ break;
+
+ case cpw_type: // coplanar waveguide
+ m_TLine = new COPLANAR();
+ m_Icon = new wxBitmap( cpw_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_PRM,
+ _( "H" ), _( "Height of Substrate" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, T_PRM,
+ _( "T" ), _( "Strip Thickness" ), 0.035, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "W" ), _( "Line Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_S_PRM,
+ _( "S" ), _( "Gap Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
+ break;
+
+ case grounded_cpw_type: // grounded coplanar waveguide
+ m_TLine = new GROUNDEDCOPLANAR();
+ m_Icon = new wxBitmap( cpw_back_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_PRM,
+ _( "H" ), _( "Height of Substrate" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, T_PRM,
+ _( "T" ), _( "Strip Thickness" ), 0.035, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "W" ), _( "Line Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_S_PRM,
+ _( "S" ), _( "Gap Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0, true ) );
+ break;
+
+
+ case rectwaveguide_type: // rectangular waveguide
+ m_TLine = new RECTWAVEGUIDE();
+ m_Icon = new wxBitmap( rectwaveguide_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ZF(H10) = Ey / Hx" ) );
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "TE-Modes" ) );
+ m_Messages.Add( _( "TM-Modes" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MUR_PRM,
+ _( "Mur" ), _( "Relative Permeability of Insulator" ), 1, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, TANM_PRM,
+ _( "TanM" ), _( "Magnetic Loss Tangent" ), 0, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_S_PRM,
+ _( "a" ), _( "Width of Waveguide" ), 10.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "b" ), _( "Height of Waveguide" ), 5.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Waveguide Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0, true ) );
+ break;
+
+ case coax_type: // coaxial cable
+ m_TLine = new COAX();
+ m_Icon = new wxBitmap( coax_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "TE-Modes" ) );
+ m_Messages.Add( _( "TM-Modes" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MUR_PRM,
+ _( "Mur" ), _( "Relative Permeability of Insulator" ), 1, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_DIAM_IN_PRM,
+ _( "Din" ), _( "Inner Diameter (conductor)" ), 1.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_DIAM_OUT_PRM,
+ _( "Dout" ), _( "Outer Diameter (insulator)" ), 8.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
+ break;
+
+ case c_microstrip_type: // coupled microstrip
+ m_TLine = new C_MICROSTRIP();
+ m_Icon = new wxBitmap( c_microstrip_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ErEff Even" ) );
+ m_Messages.Add( _( "ErEff Odd" ) );
+ m_Messages.Add( _( "Conductor Losses Even" ) );
+ m_Messages.Add( _( "Conductor Losses Odd" ) );
+ m_Messages.Add( _( "Dielectric Losses Even" ) );
+ m_Messages.Add( _( "Dielectric Losses Odd" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_PRM,
+ _( "H" ), _( "Height of Substrate" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_T_PRM,
+ _( "H_t" ), _( "Height of Box Top" ), 1e20, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, T_PRM,
+ _( "T" ), _( "Strip Thickness" ), 0.035, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, ROUGH_PRM,
+ _( "Rough" ), _( "Conductor Roughness" ), 0.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "W" ), _( "Line Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_S_PRM,
+ _( "S" ), _( "Gap Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_E_PRM,
+ _( "Z0e" ), _( "Even-Mode Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_O_PRM,
+ _( "Z0o" ), _( "Odd-Mode Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
+ break;
+
+ case stripline_type: // stripline
+ m_TLine = new STRIPLINE();
+ m_Icon = new wxBitmap( stripline_xpm );
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, H_PRM,
+ _( "H" ), _( "Height of Substrate" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, STRIPLINE_A_PRM,
+ _( "a" ), _( "distance between strip and top metal" ), 0.2,
+ true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, T_PRM,
+ _( "T" ), _( "Strip Thickness" ), 0.035, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_WIDTH_PRM,
+ _( "W" ), _( "Line Width" ), 0.2, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Line Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0, true ) );
+ break;
+
+ case twistedpair_type: // twisted pair
+ m_TLine = new TWISTEDPAIR();
+ m_Icon = new wxBitmap( twistedpair_xpm );
+ m_HasPrmSelection = true;
+
+ m_Messages.Add( _( "ErEff" ) );
+ m_Messages.Add( _( "Conductor Losses" ) );
+ m_Messages.Add( _( "Dielectric Losses" ) );
+ m_Messages.Add( _( "Skin Depth" ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, TWISTEDPAIR_TWIST_PRM,
+ _( "Twists" ), _( "Number of Twists per Length" ), 0.0, false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, MURC_PRM,
+ _( "MurC" ), _( "Relative Permeability of Conductor" ), 1,
+ false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_SUBS, TWISTEDPAIR_EPSILONR_ENV_PRM,
+ _( "ErEnv" ), _( "Relative Permittivity of Environment" ), 1,
+ false ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_DIAM_IN_PRM,
+ _( "Din" ), _( "Inner Diameter (conductor)" ), 1.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_DIAM_OUT_PRM,
+ _( "Dout" ), _( "Outer Diameter (insulator)" ), 8.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_PHYS, PHYS_LEN_PRM,
+ _( "L" ), _( "Cable Length" ), 50.0, true ) );
+
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, Z0_PRM,
+ _( "Z0" ), _( "Characteristic Impedance" ), 50.0, true ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, DUMMY_PRM ) );
+ AddPrm( new TRANSLINE_PRM( PRM_TYPE_ELEC, ANG_L_PRM,
+ _( "Ang_l" ), _( "Electrical Length" ), 0.0, true ) );
+ break;
+
+ case end_of_list_type: // Not really used
+ break;
+ }
+}
+
+TRANSLINE_IDENT::~TRANSLINE_IDENT()
+{
+ delete m_TLine;
+ delete m_Icon;
+ for( unsigned ii = 0; ii < m_prms_List.size(); ii++ )
+ delete m_prms_List[ii];
+
+ m_prms_List.clear();
+}
+
+
+void TRANSLINE_IDENT::ReadConfig( wxConfig* aConfig )
+{
+ wxString text = wxString::FromUTF8( m_TLine->m_name );
+ aConfig->SetPath( text );
+ for( unsigned ii = 0; ii < m_prms_List.size(); ii++ )
+ m_prms_List[ii]->ReadConfig( aConfig );
+
+ aConfig->SetPath( wxT( ".." ) );
+}
+
+
+void TRANSLINE_IDENT::WriteConfig( wxConfig* aConfig )
+{
+ wxString text = wxString::FromUTF8( m_TLine->m_name );
+ aConfig->SetPath( text );
+ for( unsigned ii = 0; ii < m_prms_List.size(); ii++ )
+ m_prms_List[ii]->WriteConfig( aConfig );
+
+ aConfig->SetPath( wxT( ".." ) );
+}
+
diff --git a/pcb_calculator/transline_ident.h b/pcb_calculator/transline_ident.h
new file mode 100644
index 0000000000..e6a7596923
--- /dev/null
+++ b/pcb_calculator/transline_ident.h
@@ -0,0 +1,107 @@
+/**
+ * @file transline_ident.h
+ */
+
+#ifndef TRANSLINE_IDENT_H
+#define TRANSLINE_IDENT_H
+
+#include
+#include
+#include
+
+#include "transline.h"
+
+// An enum to handle muwave shapes:
+enum transline_type_id {
+ start_of_list_type = 0,
+ default_type = start_of_list_type,
+ microstrip_type = default_type,
+ cpw_type,
+ grounded_cpw_type,
+ rectwaveguide_type,
+ coax_type,
+ c_microstrip_type,
+ stripline_type,
+ twistedpair_type,
+ end_of_list_type
+};
+
+// A Class to handle parameters
+enum PRM_TYPE {
+ PRM_TYPE_SUBS,
+ PRM_TYPE_PHYS,
+ PRM_TYPE_ELEC,
+ PRM_TYPE_FREQUENCY
+};
+
+class TRANSLINE_PRM
+{
+public:
+ PRM_TYPE m_Type; // Type of parameter: substr, physical, elect
+ PRMS_ID m_Id; // Id of parameter ( link to transline functions )
+ wxString m_Label; // name for this parameter in dialog
+ wxString m_ToolTip; // Tool tip for this parameter in dialog
+ double m_Value; // Value for this parameter in dialog
+ double m_NormalizedValue; // actual value for this parameter
+ bool m_ConvUnit; // true if an unit selector must be used
+ void* m_ValueCtrl; // The text ctrl containing the value in dialog
+ void* m_UnitCtrl; // The UNIT_SELECTOR containing the unit in dialog
+ int m_UnitSelection; // last selection for units
+
+public: TRANSLINE_PRM( PRM_TYPE aType, PRMS_ID aId,
+ const wxString& aLabel = wxEmptyString,
+ const wxString& aToolTip = wxEmptyString,
+ double aValue = 0.0,
+ bool aConvUnit = false );
+
+ void ReadConfig( wxConfig* aConfig );
+ void WriteConfig( wxConfig* aConfig );
+ double ToUserUnit();
+ double FromUserUnit();
+};
+
+
+// A class to handle the list of availlable transm. lines
+// with messages, tooptips ...
+class TRANSLINE_IDENT
+{
+public:
+ enum transline_type_id m_Type; // The type of transline handled
+ wxBitmap * m_Icon; // An icon to display in dialogs
+ TRANSLINE* m_TLine; // The TRANSLINE itself
+ wxArrayString m_Messages; // messages for results
+ bool m_HasPrmSelection; // true if selection of parameters must be enabled in dialog menu
+
+private:
+ std::vector m_prms_List;
+
+public: TRANSLINE_IDENT( enum transline_type_id aType );
+ ~TRANSLINE_IDENT();
+
+ // Add a new param in list
+ void AddPrm( TRANSLINE_PRM* aParam )
+ {
+ m_prms_List.push_back( aParam );
+ }
+
+
+ TRANSLINE_PRM* GetPrm( unsigned aIdx )
+ {
+ if( aIdx < m_prms_List.size() )
+ return m_prms_List[aIdx];
+ else
+ return NULL;
+ }
+
+
+ unsigned GetPrmsCount()
+ {
+ return m_prms_List.size();
+ }
+
+
+ void ReadConfig( wxConfig* aConfig );
+ void WriteConfig( wxConfig* aConfig );
+};
+
+#endif // TRANSLINE_IDENT_H
diff --git a/pcb_calculator/units_scales.h b/pcb_calculator/units_scales.h
new file mode 100644
index 0000000000..63e9310cea
--- /dev/null
+++ b/pcb_calculator/units_scales.h
@@ -0,0 +1,27 @@
+/*
+ * @file units_scales.h
+ */
+
+ // Inside calculations, units are always meter, Hz, Ohm and Radian
+// These units are not very easy to handle, so we use conversion constants
+
+#ifndef UNITS_SCALES_H
+#define UNITS_SCALES_H
+
+#define UNIT_MM 1e-3 // mm to meter
+#define UNIT_CM 1e-2 // cm to meter
+#define UNIT_MICRON 1e-6 // µm to meter
+#define UNIT_INCH (1e-2*2.54) // inch to meter
+#define UNIT_MIL (1e-5*2.54) // mil (or thou) to meter
+
+#define UNIT_GHZ 1e9
+#define UNIT_MHZ 1e6
+#define UNIT_KHZ 1e3
+
+#define UNIT_DEGREE (M_PI/180.0) // degree to radian
+#define UNIT_RADIAN 1.0 // Radian to radian
+
+#define UNIT_OHM 1.0 // Ohm to Ohm
+#define UNIT_KOHM 1e3 // KOhm to Ohm
+
+#endif // UNITS_SCALES_H