diff --git a/GUI/SW1/SRC/BUNDLEBLDR.cpp b/GUI/SW1/SRC/BUNDLEBLDR.cpp index 629937e..1aa35cf 100644 --- a/GUI/SW1/SRC/BUNDLEBLDR.cpp +++ b/GUI/SW1/SRC/BUNDLEBLDR.cpp @@ -52,6 +52,8 @@ #include #include +#define PI 3.14159265358979323846 + using namespace std; //(*InternalHeaders(BUNDLEBLDR) @@ -77,6 +79,10 @@ const long BUNDLEBLDR::ID_STATICTEXT7 = wxNewId(); const long BUNDLEBLDR::ID_TEXTCTRL4 = wxNewId(); const long BUNDLEBLDR::ID_STATICTEXT8 = wxNewId(); const long BUNDLEBLDR::ID_TEXTCTRL5 = wxNewId(); +const long BUNDLEBLDR::ID_STATICTEXT13 = wxNewId(); +const long BUNDLEBLDR::ID_TEXTCTRL9 = wxNewId(); +const long BUNDLEBLDR::ID_STATICTEXT14 = wxNewId(); +const long BUNDLEBLDR::ID_TEXTCTRL10 = wxNewId(); const long BUNDLEBLDR::ID_PANEL5 = wxNewId(); const long BUNDLEBLDR::ID_STATICTEXT11 = wxNewId(); const long BUNDLEBLDR::ID_CHECKBOX4 = wxNewId(); @@ -187,11 +193,23 @@ BUNDLEBLDR::BUNDLEBLDR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const w StaticText7 = new wxStaticText(Panel5, ID_STATICTEXT7, _("Surface Mesh Constant"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT7")); FlexGridSizer5->Add(StaticText7, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl4 = new wxTextCtrl(Panel5, ID_TEXTCTRL4, _("3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL4")); + TextCtrl4->Disable(); FlexGridSizer5->Add(TextCtrl4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); StaticText8 = new wxStaticText(Panel5, ID_STATICTEXT8, _("Boundary Constant"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8")); FlexGridSizer5->Add(StaticText8, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl5 = new wxTextCtrl(Panel5, ID_TEXTCTRL5, _("3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL5")); + TextCtrl5->Disable(); FlexGridSizer5->Add(TextCtrl5, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticText13 = new wxStaticText(Panel5, ID_STATICTEXT13, _("Max Mesh Edge Length"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT13")); + FlexGridSizer5->Add(StaticText13, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl9 = new wxTextCtrl(Panel5, ID_TEXTCTRL9, _("1e-3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL9")); + TextCtrl9->Disable(); + FlexGridSizer5->Add(TextCtrl9, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticText14 = new wxStaticText(Panel5, ID_STATICTEXT14, _("Ground Plane Edge Length"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT14")); + FlexGridSizer5->Add(StaticText14, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl10 = new wxTextCtrl(Panel5, ID_TEXTCTRL10, _("1e-3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL10")); + TextCtrl10->Disable(); + FlexGridSizer5->Add(TextCtrl10, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); Panel5->SetSizer(FlexGridSizer5); FlexGridSizer5->Fit(Panel5); FlexGridSizer5->SetSizeHints(Panel5); @@ -482,15 +500,16 @@ void BUNDLEBLDR::DrawBundleCsection() { bundle_list = bundle_root; - wxString x, y, cable; + wxString x, y, rot, cable; while ( bundle_list->next != NULL ) { cable = bundle_list->CableType; x = bundle_list->x_offset; y = bundle_list->y_offset; + rot = bundle_list->rot_theta; - DrawBundleCable(cable, x, y); + DrawBundleCable(cable, x, y, rot); bundle_list = bundle_list->next; } @@ -538,12 +557,13 @@ void BUNDLEBLDR::FormatPanel(double maxDimension) dc.DrawText(scale, (size_h/2+55), size_v-40); } -void BUNDLEBLDR::DrawBundleCable(wxString cable, wxString x, wxString y) +void BUNDLEBLDR::DrawBundleCable(wxString cable, wxString x, wxString y, wxString rot) { - double xCoord, yCoord, maxDimension; + double xCoord, yCoord, rotation, maxDimension; x.ToDouble(&xCoord); y.ToDouble(&yCoord); + rot.ToDouble(&rotation); yCoord = -1.0 * yCoord; @@ -1063,69 +1083,255 @@ void BUNDLEBLDR::DrawBundleCable(wxString cable, wxString x, wxString y) dc.DrawCircle( wxPoint(size_h/2,size_v/2), overshield_Scaledradius ); } - if (str.compare("Flex_cable") == 0 ){ + if (str.compare("flex_cable") == 0 ){ - float conductors, conductor_width, conductor_height, conductor_separation, dielectric_offset_x, dielectric_offset_y; + float dielectric_width, dielectric_height, conductor_rows; - cableFile >> conductors; std::getline(cableFile, str); //Read to end of line std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_width; + cableFile >> dielectric_width; std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_height; - std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_separation; + cableFile >> dielectric_height; std::getline(cableFile, str); //Read to end of line - cableFile >> dielectric_offset_x; + cableFile >> conductor_rows; std::getline(cableFile, str); //Read to end of line - cableFile >> dielectric_offset_y; + //float scaleFactor = (size_h/dielectric_width) * 0.6; - float conductor_Scaledwidth, - conductor_Scaledheight, - conductor_Scaledseparation, - dielectric_Scaledoffset_x, - //dielectric_Scaledoffset_y, - totalScaledWidth, - totalScaledHeight, - scaledxCoord, - scaledyCoord; + float scaled_dielectric_width, scaled_dielectric_height, scaledxCoord, scaledyCoord; + float dx1,dy1,dx2,dy2,dx3,dy3,dx4,dy4, tempx, tempy, rotation_rad; - float totalWidth = (conductors*conductor_width)+((conductors-1) * conductor_separation)+(dielectric_offset_x * 2); - float totalHeight = (2 * dielectric_offset_y) + conductor_height; + scaled_dielectric_width = (dielectric_width/maxDimension) * scaleFactor; + scaled_dielectric_height = (dielectric_height/maxDimension) * scaleFactor; - conductor_Scaledwidth = (conductor_width/maxDimension)*scaleFactor; - conductor_Scaledheight = (conductor_height/maxDimension)*scaleFactor; - conductor_Scaledseparation = (conductor_separation/maxDimension)*scaleFactor; - dielectric_Scaledoffset_x = (dielectric_offset_x/maxDimension)*scaleFactor; - //dielectric_Scaledoffset_y = (dielectric_offset_y/maxDimension)*scaleFactor; - totalScaledHeight = (totalHeight/maxDimension)*scaleFactor; - totalScaledWidth = (totalWidth/maxDimension)*scaleFactor; - scaledxCoord = (xCoord/maxDimension)*scaleFactor; - scaledyCoord = (yCoord/maxDimension)*scaleFactor; + scaledxCoord = xCoord/maxDimension * scaleFactor; + scaledyCoord = yCoord/maxDimension * scaleFactor; + + rotation_rad = rotation * (PI/180.0); + + float s = sin(rotation_rad); + float c = cos(rotation_rad); + +// wxString point; +// +// point<< tempx <<", "<> offset_x; + std::getline(cableFile, str); //Read to end of line + + cableFile >> offset_y; + std::getline(cableFile, str); //Read to end of line + + cableFile >> width; + std::getline(cableFile, str); //Read to end of line + + cableFile >> height; + std::getline(cableFile, str); //Read to end of line + + cableFile >> separation; + std::getline(cableFile, str); //Read to end of line + + cableFile >> conductors; + std::getline(cableFile, str); //Read to end of line + + + float scaled_conductor_width = width/maxDimension * scaleFactor; + float scaled_conductor_height = height/maxDimension * scaleFactor; + float scaled_conductor_separation = separation/maxDimension * scaleFactor; + float scaled_offset_x = offset_x/maxDimension * scaleFactor; + float scaled_offset_y = offset_y/maxDimension * scaleFactor; + + //calculate conductor origin, top left corner: start at no.1 + float x_origin = 0 - (scaled_conductor_width * conductors/2) - scaled_conductor_separation*(conductors - 1)/2 + scaled_offset_x; + float y_origin = scaled_conductor_height/2 + scaled_offset_y; + + float cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4; + + dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); + dc.SetBrush(wxBrush(*wxWHITE, wxSOLID)); + + for (int j = 0; j> conductors; +// std::getline(cableFile, str); //Read to end of line +// std::getline(cableFile, str); //Read to end of line +// cableFile >> conductor_width; +// std::getline(cableFile, str); //Read to end of line +// cableFile >> conductor_height; +// std::getline(cableFile, str); //Read to end of line +// cableFile >> conductor_separation; +// std::getline(cableFile, str); //Read to end of line +// cableFile >> dielectric_offset_x; +// std::getline(cableFile, str); //Read to end of line +// cableFile >> dielectric_offset_y; +// +// +// float conductor_Scaledwidth, +// conductor_Scaledheight, +// conductor_Scaledseparation, +// dielectric_Scaledoffset_x, +// //dielectric_Scaledoffset_y, +// totalScaledWidth, +// totalScaledHeight, +// scaledxCoord, +// scaledyCoord; +// +// +// float totalWidth = (conductors*conductor_width)+((conductors-1) * conductor_separation)+(dielectric_offset_x * 2); +// float totalHeight = (2 * dielectric_offset_y) + conductor_height; +// +// conductor_Scaledwidth = (conductor_width/maxDimension)*scaleFactor; +// conductor_Scaledheight = (conductor_height/maxDimension)*scaleFactor; +// conductor_Scaledseparation = (conductor_separation/maxDimension)*scaleFactor; +// dielectric_Scaledoffset_x = (dielectric_offset_x/maxDimension)*scaleFactor; +// //dielectric_Scaledoffset_y = (dielectric_offset_y/maxDimension)*scaleFactor; +// totalScaledHeight = (totalHeight/maxDimension)*scaleFactor; +// totalScaledWidth = (totalWidth/maxDimension)*scaleFactor; +// scaledxCoord = (xCoord/maxDimension)*scaleFactor; +// scaledyCoord = (yCoord/maxDimension)*scaleFactor; +// +// size_h = size_h + scaledxCoord; +// size_v = size_v + scaledyCoord; +// +// dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); +// dc.SetBrush(wxBrush(*wxBLACK, wxBDIAGONAL_HATCH)); +// dc.DrawRectangle(wxPoint(size_h/2-totalScaledWidth/2, size_v/2-totalScaledHeight/2), wxSize(totalScaledWidth,totalScaledHeight)); +// +// float x_origin, y_origin; +// x_origin = (size_h/2 - totalScaledWidth/2)+dielectric_Scaledoffset_x; +// y_origin = size_v/2 - conductor_Scaledheight/2; +// +// dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); +// dc.SetBrush(wxBrush(*wxBLACK, wxSOLID)); +// +// for(int i=0;iGetValue(); TextCtrl1->SetBackgroundColour(wxColor(255,255,255)); @@ -1213,6 +1417,14 @@ void BUNDLEBLDR::OnButton1Click(wxCommandEvent& event) return; } + WriteBundleFile(fileName); + + Button1->Disable(); +} + +void BUNDLEBLDR::WriteBundleFile(wxString fileName) +{ + ofstream cableFile; wxString fullFileName = PathToMOD + "\\BUNDLE\\" + fileName + ".bundle_spec"; @@ -1289,13 +1501,19 @@ void BUNDLEBLDR::OnButton1Click(wxCommandEvent& event) cableFile << TextCtrl4->GetValue() <<"\n"; cableFile << "Laplace_surface_mesh_constant\n"; cableFile << TextCtrl5->GetValue() <<"\n"; + cableFile << "max_mesh_edge_length\n"; + cableFile << TextCtrl9->GetValue() <<"\n"; + if (CheckBox1->GetValue()) + { + cableFile << "gp_mesh_edge_length\n"; + cableFile << TextCtrl10->GetValue() <<"\n"; + } CheckBox3 ->SetValue(false); } } cableFile.close(); - Button1->Disable(); } @@ -1306,6 +1524,8 @@ void BUNDLEBLDR::OnButton2Click(wxCommandEvent& event) wxString fileName = TextCtrl1->GetValue(); + WriteBundleFile (TextCtrl1->GetValue()); + std::stringstream stream; stream << "\"..\\BIN\\cable_bundle_model_builder.exe\"" << " " @@ -1318,7 +1538,7 @@ void BUNDLEBLDR::OnButton2Click(wxCommandEvent& event) RUN_STATUS *run_status = new RUN_STATUS(this); run_status->ShowModal(); - Button1->Enable(); + //Button1->Enable(); if (CheckBox2->GetValue()) { @@ -1348,6 +1568,7 @@ void BUNDLEBLDR::OnButton2Click(wxCommandEvent& event) file = wxFindNextFile(); } CheckBox3->Enable(); + } } @@ -1370,6 +1591,8 @@ void BUNDLEBLDR::OnCheckBox1Click(wxCommandEvent& event) dc.SetPen( wxPen( (*wxBLACK) ,5 , wxSOLID) ); dc.DrawLine( 0, size_v/2, size_h,size_v/2 ); + TextCtrl10->Enable(); + } void BUNDLEBLDR::OnCheckBox3Click(wxCommandEvent& event) @@ -1378,7 +1601,10 @@ void BUNDLEBLDR::OnCheckBox3Click(wxCommandEvent& event) { TextCtrl4->Enable(); TextCtrl5->Enable(); + TextCtrl9->Enable(); } + + //WriteBundleFile (TextCtrl1->GetValue()); } void BUNDLEBLDR::OnComboBox1Selected(wxCommandEvent& event) @@ -1386,6 +1612,8 @@ void BUNDLEBLDR::OnComboBox1Selected(wxCommandEvent& event) wxString meshToView; meshToView<GetValue(); draw_mesh(Panel1,meshToView); + + MeshSelected = 1; } void BUNDLEBLDR::OnTextCtrl4Text(wxCommandEvent& event) @@ -1420,6 +1648,7 @@ void BUNDLEBLDR::OnSpinButton1Change(wxSpinEvent& event) FormatPanel(maxDimension); DrawBundleCsection(); + } void BUNDLEBLDR::OnTextCtrl8TextEnter(wxCommandEvent& event) diff --git a/GUI/SW1/SRC/BUNDLEBLDR.h b/GUI/SW1/SRC/BUNDLEBLDR.h index 895d7fa..4c0f630 100644 --- a/GUI/SW1/SRC/BUNDLEBLDR.h +++ b/GUI/SW1/SRC/BUNDLEBLDR.h @@ -112,11 +112,13 @@ class BUNDLEBLDR: public wxDialog void paintNow(); void render(wxDC& dc); void FormatPanel(double); - void DrawBundleCable(wxString, wxString, wxString); + void DrawBundleCable(wxString, wxString, wxString, wxString); void ConstructBundleCsection(wxString, wxString, wxString); void DrawBundleCsection(); + void WriteBundleFile(wxString); + void OnListboxRDown(wxMouseEvent& event); void removeElement(int); void PopulateListControl(void); @@ -145,6 +147,8 @@ class BUNDLEBLDR: public wxDialog wxString MESH_PARAM1; wxString MESH_PARAM2; + int MeshSelected; + //(*Declarations(BUNDLEBLDR) wxStaticText* StaticText10; @@ -153,8 +157,10 @@ class BUNDLEBLDR: public wxDialog wxRadioButton* RadioButton1; wxPanel* Panel5; wxNotebook* Notebook1; + wxStaticText* StaticText13; wxStaticText* StaticText2; wxPanel* Panel4; + wxStaticText* StaticText14; wxRadioButton* RadioButton2; wxButton* Button1; wxStaticText* StaticText6; @@ -181,10 +187,12 @@ class BUNDLEBLDR: public wxDialog wxTextCtrl* TextCtrl7; wxTextCtrl* TextCtrl1; wxStaticText* StaticText12; + wxTextCtrl* TextCtrl9; wxPanel* Panel2; wxTextCtrl* TextCtrl5; wxStaticText* StaticText4; wxTextCtrl* TextCtrl3; + wxTextCtrl* TextCtrl10; wxListBox* ListBox1; //*) @@ -207,6 +215,10 @@ class BUNDLEBLDR: public wxDialog static const long ID_TEXTCTRL4; static const long ID_STATICTEXT8; static const long ID_TEXTCTRL5; + static const long ID_STATICTEXT13; + static const long ID_TEXTCTRL9; + static const long ID_STATICTEXT14; + static const long ID_TEXTCTRL10; static const long ID_PANEL5; static const long ID_STATICTEXT11; static const long ID_CHECKBOX4; diff --git a/GUI/SW1/SRC/BUNDLE_SCHEMATIC.cpp b/GUI/SW1/SRC/BUNDLE_SCHEMATIC.cpp index 500df98..797e212 100644 --- a/GUI/SW1/SRC/BUNDLE_SCHEMATIC.cpp +++ b/GUI/SW1/SRC/BUNDLE_SCHEMATIC.cpp @@ -614,69 +614,155 @@ void draw_bundle(wxPanel *Panel, wxString Path, wxString bundle_to_draw) cableFile.close(); } - if (cable_str.compare("Flex_cable") == 0 ) + if (cable_str.compare("flex_cable") == 0 ) { - float conductors, conductor_width, conductor_height, conductor_separation, dielectric_offset_x, dielectric_offset_y; + float dielectric_width, dielectric_height, conductor_rows; - cableFile >> conductors; - std::getline(cableFile, cable_str); //Read to end of line std::getline(cableFile, cable_str); //Read to end of line - cableFile >> conductor_width; std::getline(cableFile, cable_str); //Read to end of line - cableFile >> conductor_height; + cableFile >> dielectric_width; std::getline(cableFile, cable_str); //Read to end of line - cableFile >> conductor_separation; + cableFile >> dielectric_height; std::getline(cableFile, cable_str); //Read to end of line - cableFile >> dielectric_offset_x; + cableFile >> conductor_rows; std::getline(cableFile, cable_str); //Read to end of line - cableFile >> dielectric_offset_y; + wxString mystring2; + mystring2 << dielectric_width; + dc.DrawText ("Dielectric Width (m)", 10, 40); + dc.DrawText(mystring2, 10, 55); - float conductor_Scaledwidth, - conductor_Scaledheight, - conductor_Scaledseparation, - dielectric_Scaledoffset_x, - dielectric_Scaledoffset_y, - totalScaledWidth, - totalScaledHeight, - scaledxCoord, - scaledyCoord; + wxString mystring3; + mystring3 << dielectric_height; + dc.DrawText ("Dielectric Height (m):", 10, 75); + dc.DrawText(mystring3, 10, 90); - float totalWidth = (conductors*conductor_width)+((conductors-1) * conductor_separation)+(dielectric_offset_x * 2); - float totalHeight = (2 * dielectric_offset_y) + conductor_height; + wxString mystring4; + mystring4 << conductor_rows; + dc.DrawText ("Number of Conductor Rows:", 10, 110); + dc.DrawText(mystring4, 10, 125); - conductor_Scaledwidth = (conductor_width/maxDimension)*scaleFactor; - conductor_Scaledheight = (conductor_height/maxDimension)*scaleFactor; - conductor_Scaledseparation = (conductor_separation/maxDimension)*scaleFactor; - dielectric_Scaledoffset_x = (dielectric_offset_x/maxDimension)*scaleFactor; - dielectric_Scaledoffset_y = (dielectric_offset_y/maxDimension)*scaleFactor; - totalScaledHeight = (totalHeight/maxDimension)*scaleFactor; - totalScaledWidth = (totalWidth/maxDimension)*scaleFactor; - scaledxCoord = (xCoord/maxDimension)*scaleFactor; - scaledyCoord = -1.0*(yCoord/maxDimension)*scaleFactor; + float scaleFactor = (size_h/dielectric_width) * 0.8; - float size_ho = size_h + scaledxCoord; - float size_vo = size_v + scaledyCoord; + float scaled_dielectric_width, scaled_dielectric_height, scaled_offset_x, scaled_offset_y; + + scaled_dielectric_width = dielectric_width * scaleFactor; + scaled_dielectric_height = dielectric_height * scaleFactor; + + //Draw dielectric dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); dc.SetBrush(wxBrush(*wxBLACK, wxBDIAGONAL_HATCH)); - dc.DrawRectangle(wxPoint(size_ho/2-totalScaledWidth/2, size_vo/2-totalScaledHeight/2), wxSize(totalScaledWidth,totalScaledHeight)); + dc.DrawRectangle(wxPoint(size_h/2-scaled_dielectric_width/2, size_v/2-scaled_dielectric_height/2), wxSize(scaled_dielectric_width, scaled_dielectric_height)); - float x_origin, y_origin; - x_origin = (size_ho/2 - totalScaledWidth/2) + dielectric_Scaledoffset_x; - y_origin = (size_vo/2 - conductor_Scaledheight/2) + dielectric_Scaledoffset_y; + float offset_x, offset_y, width, height,separation, conductors; - dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); - dc.SetBrush(wxBrush(*wxBLACK, wxSOLID)); + for (int i = 0; i < conductor_rows;i++){ + cableFile >> offset_x; + std::getline(cableFile, cable_str); //Read to end of line - for(int i=0;i> offset_y; + std::getline(cableFile, cable_str); //Read to end of line - dc.DrawRectangle(wxPoint(x_origin, y_origin), wxSize(conductor_Scaledwidth,conductor_Scaledheight)); + cableFile >> width; + std::getline(cableFile, cable_str); //Read to end of line - x_origin = x_origin + (conductor_Scaledwidth+conductor_Scaledseparation); - } + cableFile >> height; + std::getline(cableFile, cable_str); //Read to end of line - cableFile.close(); + cableFile >> separation; + std::getline(cableFile, cable_str); //Read to end of line + + cableFile >> conductors; + std::getline(cableFile, cable_str); //Read to end of line + + + float scaled_offset_x = offset_x * scaleFactor; + float scaled_offset_y = offset_y * scaleFactor; + float scaled_conductor_width = width * scaleFactor; + float scaled_conductor_height = height * scaleFactor; + float scaled_conductor_separation = separation * scaleFactor; + + + float x_origin = size_h/2 - (scaled_conductor_width * conductors/2) - scaled_conductor_separation*(conductors - 1)/2 - scaled_offset_x; + float y_origin = size_v/2 - (scaled_conductor_height/2) - scaled_offset_y; + + + + dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); + dc.SetBrush(wxBrush(*wxWHITE, wxSOLID)); + + for (int j = 0; j> conductors; +// std::getline(cableFile, cable_str); //Read to end of line +// std::getline(cableFile, cable_str); //Read to end of line +// cableFile >> conductor_width; +// std::getline(cableFile, cable_str); //Read to end of line +// cableFile >> conductor_height; +// std::getline(cableFile, cable_str); //Read to end of line +// cableFile >> conductor_separation; +// std::getline(cableFile, cable_str); //Read to end of line +// cableFile >> dielectric_offset_x; +// std::getline(cableFile, cable_str); //Read to end of line +// cableFile >> dielectric_offset_y; +// +// +// float conductor_Scaledwidth, +// conductor_Scaledheight, +// conductor_Scaledseparation, +// dielectric_Scaledoffset_x, +// dielectric_Scaledoffset_y, +// totalScaledWidth, +// totalScaledHeight, +// scaledxCoord, +// scaledyCoord; +// +// float totalWidth = (conductors*conductor_width)+((conductors-1) * conductor_separation)+(dielectric_offset_x * 2); +// float totalHeight = (2 * dielectric_offset_y) + conductor_height; +// +// conductor_Scaledwidth = (conductor_width/maxDimension)*scaleFactor; +// conductor_Scaledheight = (conductor_height/maxDimension)*scaleFactor; +// conductor_Scaledseparation = (conductor_separation/maxDimension)*scaleFactor; +// dielectric_Scaledoffset_x = (dielectric_offset_x/maxDimension)*scaleFactor; +// dielectric_Scaledoffset_y = (dielectric_offset_y/maxDimension)*scaleFactor; +// totalScaledHeight = (totalHeight/maxDimension)*scaleFactor; +// totalScaledWidth = (totalWidth/maxDimension)*scaleFactor; +// scaledxCoord = (xCoord/maxDimension)*scaleFactor; +// scaledyCoord = -1.0*(yCoord/maxDimension)*scaleFactor; +// +// float size_ho = size_h + scaledxCoord; +// float size_vo = size_v + scaledyCoord; +// +// dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); +// dc.SetBrush(wxBrush(*wxBLACK, wxBDIAGONAL_HATCH)); +// dc.DrawRectangle(wxPoint(size_ho/2-totalScaledWidth/2, size_vo/2-totalScaledHeight/2), wxSize(totalScaledWidth,totalScaledHeight)); +// +// float x_origin, y_origin; +// x_origin = (size_ho/2 - totalScaledWidth/2) + dielectric_Scaledoffset_x; +// y_origin = (size_vo/2 - conductor_Scaledheight/2) + dielectric_Scaledoffset_y; +// +// dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); +// dc.SetBrush(wxBrush(*wxBLACK, wxSOLID)); +// +// for(int i=0;i> conductors; - std::getline(cableFile, str); //Read to end of line std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_width; std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_height; + cableFile >> dielectric_width; std::getline(cableFile, str); //Read to end of line - cableFile >> conductor_separation; + cableFile >> dielectric_height; std::getline(cableFile, str); //Read to end of line - cableFile >> dielectric_offset_x; + cableFile >> conductor_rows; std::getline(cableFile, str); //Read to end of line - cableFile >> dielectric_offset_y; wxString mystring2; - mystring2 << conductors; - dc.DrawText ("Number of Conductors:", 10, 40); + mystring2 << dielectric_width; + dc.DrawText ("Dielectric Width (m)", 10, 40); dc.DrawText(mystring2, 10, 55); wxString mystring3; - mystring3 << conductor_width; - dc.DrawText ("Conductor Width (m):", 10, 75); + mystring3 << dielectric_height; + dc.DrawText ("Dielectric Height (m):", 10, 75); dc.DrawText(mystring3, 10, 90); wxString mystring4; - mystring4 << conductor_height; - dc.DrawText ("Conductor Height (m):", 10, 110); + mystring4 << conductor_rows; + dc.DrawText ("Number of Conductor Rows:", 10, 110); dc.DrawText(mystring4, 10, 125); - wxString mystring5; - mystring5 << conductor_separation; - dc.DrawText ("Conductor Separation (m):", 10, 145); - dc.DrawText(mystring5, 10, 160); + float scaleFactor = (size_h/dielectric_width) * 0.8; - wxString mystring6; - mystring6 << dielectric_offset_x; - dc.DrawText ("Dielectric Offset in x (m):", 10, 180); - dc.DrawText(mystring6, 10, 195); + float scaled_dielectric_width, scaled_dielectric_height, scaled_offset_x, scaled_offset_y; - wxString mystring7; - mystring7 << dielectric_offset_y; - dc.DrawText ("Dielectric Offset in y (m):", 10, 215); - dc.DrawText(mystring7, 10, 230); + scaled_dielectric_width = dielectric_width * scaleFactor; + scaled_dielectric_height = dielectric_height * scaleFactor; - float scaleFactor, conductor_Scaledwidth, conductor_Scaledheight, conductor_Scaledseparation, dielectric_Scaledoffset_x, dielectric_Scaledoffset_y, totalScaledWidth, totalScaledHeight; + //Draw dielectric - scaleFactor = (size_h * 0.25); + dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); + dc.SetBrush(wxBrush(*wxBLACK, wxBDIAGONAL_HATCH)); + dc.DrawRectangle(wxPoint(size_h/2-scaled_dielectric_width/2, size_v/2-scaled_dielectric_height/2), wxSize(scaled_dielectric_width, scaled_dielectric_height)); - float totalWidth = (conductors*conductor_width)+((conductors-1) * conductor_separation)+(dielectric_offset_x * 2); - float totalHeight = (2 * dielectric_offset_y) + conductor_height; + float offset_x, offset_y, width, height,separation, conductors; - conductor_Scaledwidth = (conductor_width/totalWidth)*scaleFactor; - conductor_Scaledheight = (conductor_height/totalWidth)*scaleFactor; - conductor_Scaledseparation = (conductor_separation/totalWidth)*scaleFactor; - dielectric_Scaledoffset_x = (dielectric_offset_x/totalWidth)*scaleFactor; - dielectric_Scaledoffset_y = (dielectric_offset_y/totalWidth)*scaleFactor; - totalScaledHeight = (totalHeight/totalWidth)*scaleFactor; - totalScaledWidth = (totalWidth/totalWidth)*scaleFactor; + for (int i = 0; i < conductor_rows;i++){ + cableFile >> offset_x; + std::getline(cableFile, str); //Read to end of line - dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); - dc.SetBrush(wxBrush(*wxBLACK, wxBDIAGONAL_HATCH)); - dc.DrawRectangle(wxPoint(size_h/2-totalScaledWidth/2, size_v/2-totalScaledHeight/2), wxSize(totalScaledWidth,totalScaledHeight)); + cableFile >> offset_y; + std::getline(cableFile, str); //Read to end of line - float x_origin, y_origin; - x_origin = (size_h/2 - totalScaledWidth/2) + dielectric_Scaledoffset_x; - y_origin = (size_v/2 - conductor_Scaledheight/2) + dielectric_Scaledoffset_y; + cableFile >> width; + std::getline(cableFile, str); //Read to end of line - dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); - dc.SetBrush(wxBrush(*wxBLACK, wxSOLID)); + cableFile >> height; + std::getline(cableFile, str); //Read to end of line - for(int i=0;i> separation; + std::getline(cableFile, str); //Read to end of line - dc.DrawRectangle(wxPoint(x_origin, y_origin), wxSize(conductor_Scaledwidth,conductor_Scaledheight)); + cableFile >> conductors; + std::getline(cableFile, str); //Read to end of line - x_origin = x_origin + (conductor_Scaledwidth+conductor_Scaledseparation); - } + float scaled_offset_x = offset_x * scaleFactor; + float scaled_offset_y = offset_y * scaleFactor; + float scaled_conductor_width = width * scaleFactor; + float scaled_conductor_height = height * scaleFactor; + float scaled_conductor_separation = separation * scaleFactor; + + + float x_origin = size_h/2 - (scaled_conductor_width * conductors/2) - scaled_conductor_separation*(conductors - 1)/2 - scaled_offset_x; + float y_origin = size_v/2 - (scaled_conductor_height/2) - scaled_offset_y; + + + + dc.SetPen( wxPen( wxColor(0,0,0),1 ) ); + dc.SetBrush(wxBrush(*wxWHITE, wxSOLID)); + + for (int j = 0; jConnect(wxEVT_PAINT,(wxObjectEventFunction)&COAXIAL::OnPanel1Paint,0,this); Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&COAXIAL::OnPanel1LeftDClick,0,this); + //Connect(wxEVT_PAINT,(wxObjectEventFunction)&COAXIAL::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&COAXIAL::OnHighlightSchematic, this); @@ -326,6 +327,14 @@ COAXIAL::~COAXIAL() //*) } +/* +void COAXIAL::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} +*/ + + void COAXIAL::SetPathToMOD(wxString Path, wxString Name) { pathToMOD << Path; @@ -881,4 +890,12 @@ void COAXIAL::OnCheckBox2Click(wxCommandEvent& event) } } +/* +void COAXIAL::EditExistingCable() +{ + Close(); +} +*/ + + diff --git a/GUI/SW1/SRC/CYLINDRICAL.cpp b/GUI/SW1/SRC/CYLINDRICAL.cpp index b654d7d..b1c9a81 100644 --- a/GUI/SW1/SRC/CYLINDRICAL.cpp +++ b/GUI/SW1/SRC/CYLINDRICAL.cpp @@ -165,6 +165,7 @@ CYLINDRICAL::CYLINDRICAL(wxWindow* parent,wxWindowID id,const wxPoint& pos,const Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&CYLINDRICAL::OnButton3Click); Panel1->Connect(wxEVT_PAINT,(wxObjectEventFunction)&CYLINDRICAL::OnPanel1Paint,0,this); Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&CYLINDRICAL::OnPanel1LeftDClick,0,this); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&CYLINDRICAL::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&CYLINDRICAL::OnHighlightSchematic, this); @@ -183,6 +184,11 @@ CYLINDRICAL::~CYLINDRICAL() } +void CYLINDRICAL::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + void CYLINDRICAL::SetPathToMOD(wxString Path, wxString Name) { pathToMOD << Path; @@ -191,6 +197,9 @@ void CYLINDRICAL::SetPathToMOD(wxString Path, wxString Name) void CYLINDRICAL::OnButton1Click(wxCommandEvent& event) { + + if (EDIT_EXISTING==true) EditExistingCable(); + int IsError = 0; wxString fileName = TextCtrl1->GetValue(); @@ -344,6 +353,7 @@ void CYLINDRICAL::OnCheckBox1Click(wxCommandEvent& event) FD_ESR8 = winFD_ESR->TextCtrl8->GetValue(); FD_ESR9 = winFD_ESR->TextCtrl9->GetValue(); FD_ESR10= winFD_ESR->TextCtrl10->GetValue(); + } winFD_ESR->Destroy(); } @@ -534,3 +544,10 @@ void CYLINDRICAL::OnPanel1LeftDClick(wxMouseEvent& event) { cylindricalSchematic(); } + +void CYLINDRICAL::EditExistingCable() +{ + Close(); +} + + diff --git a/GUI/SW1/SRC/CYLINDRICAL.h b/GUI/SW1/SRC/CYLINDRICAL.h index 2510c80..b11e0d5 100644 --- a/GUI/SW1/SRC/CYLINDRICAL.h +++ b/GUI/SW1/SRC/CYLINDRICAL.h @@ -80,6 +80,9 @@ class CYLINDRICAL: public wxDialog void WriteCableFile(wxString); + void EditExistingCable(); + bool EDIT_EXISTING; + void cylindricalSchematic(); void OnHighlightSchematic(wxCommandEvent & event); @@ -167,6 +170,7 @@ class CYLINDRICAL: public wxDialog void OnTextCtrl10Text(wxCommandEvent& event); void OnTextCtrl1Text(wxCommandEvent& event); void OnPanel1LeftDClick(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); //*) DECLARE_EVENT_TABLE() diff --git a/GUI/SW1/SRC/DCONN.cpp b/GUI/SW1/SRC/DCONN.cpp index 6498650..fb1234b 100644 --- a/GUI/SW1/SRC/DCONN.cpp +++ b/GUI/SW1/SRC/DCONN.cpp @@ -164,8 +164,15 @@ DCONN::DCONN(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& siz Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DCONN::OnButton1Click); Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DCONN::OnButton2Click); Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DCONN::OnButton3Click); +/* Panel1->Connect(wxEVT_PAINT,(wxObjectEventFunction)&DCONN::OnPanel1Paint,0,this); +*/ Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&DCONN::OnPanel1LeftDClick,0,this); + +/* + Connect(wxEVT_PAINT,(wxObjectEventFunction)&DCONN::OnPaint); +*/ + //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&DCONN::OnHighlightSchematic, this); @@ -181,6 +188,15 @@ DCONN::~DCONN() //*) } + +/* +void DCONN::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + +*/ + void DCONN::SetPathToMOD(wxString Path, wxString Name) { @@ -248,41 +264,32 @@ void DCONN::OnButton2Click(wxCommandEvent& event) if (CheckBox1->GetValue()) { - // Identify all mesh files for viewing - //struct _finddata_t fileinfo; - //long hFile; - //wxString meshFileName = "*.msh.vtk"; - wxString pattern((".msh.vtk")); + + wxString pattern (("*.msh.vtk")) ; + wxString file; - //wxString pattern((meshFileName)); ComboBox1->Clear(); file = wxFindFirstFile(pattern); + while ( !file.empty()) { wxString meshfile = file; - size_t extindex = meshfile.find_first_of ("."); + size_t extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + extindex = meshfile.find_last_of ("."); meshfile = meshfile.substr(0, extindex); + meshfile = meshfile.substr(2,meshfile.length()); + ComboBox1->Append(meshfile); - } -// if (( hFile = _findfirst( pattern, &fileinfo )) != -1 ) -// { -// do -// { -// wxString meshfile = fileinfo.name; -// size_t extindex = meshfile.find_first_of ("."); -// -// meshfile = meshfile.substr(0, extindex); -// -// ComboBox1->Append(meshfile); -// -// } while ( _findnext( hFile, &fileinfo) == 0); -// } -// _findclose( hFile); + file = wxFindNextFile(); + } CheckBox2->Enable(); } @@ -346,8 +353,8 @@ void DCONN::WriteCableFile(wxString fileName) if (CheckBox2->GetValue()) { - cableFile << "Laplace_boundary_constant\n"; - cableFile << MESH_PARAM1 <<"\n"; + //cableFile << "Laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; cableFile << "Laplace_surface_mesh_constant\n"; cableFile << MESH_PARAM2 <<"\n"; @@ -576,13 +583,22 @@ void DCONN::OnCheckBox2Click(wxCommandEvent& event) MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + winMESH_PARAM->TextCtrl4->Disable(); if ( winMESH_PARAM->ShowModal() == wxID_OK ) { - MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); } winMESH_PARAM->Destroy(); } WriteCableFile (TextCtrl1->GetValue()); } + +/* +void DCONN::EditExistingCable() +{ + Close(); +} + +*/ diff --git a/GUI/SW1/SRC/FD_ESR.cpp b/GUI/SW1/SRC/FD_ESR.cpp index 7fc4040..9b4e501 100644 --- a/GUI/SW1/SRC/FD_ESR.cpp +++ b/GUI/SW1/SRC/FD_ESR.cpp @@ -75,17 +75,18 @@ const long FD_ESR::ID_STATICTEXT9 = wxNewId(); const long FD_ESR::ID_TEXTCTRL9 = wxNewId(); const long FD_ESR::ID_STATICTEXT10 = wxNewId(); const long FD_ESR::ID_TEXTCTRL10 = wxNewId(); -const long FD_ESR::ID_STATICTEXT11 = wxNewId(); -const long FD_ESR::ID_TEXTCTRL11 = wxNewId(); -const long FD_ESR::ID_STATICTEXT12 = wxNewId(); -const long FD_ESR::ID_RADIOBUTTON1 = wxNewId(); -const long FD_ESR::ID_RADIOBUTTON2 = wxNewId(); +const long FD_ESR::ID_CHECKBOX1 = wxNewId(); const long FD_ESR::ID_STATICTEXT13 = wxNewId(); const long FD_ESR::ID_TEXTCTRL12 = wxNewId(); const long FD_ESR::ID_STATICTEXT14 = wxNewId(); const long FD_ESR::ID_TEXTCTRL13 = wxNewId(); const long FD_ESR::ID_STATICTEXT15 = wxNewId(); const long FD_ESR::ID_TEXTCTRL14 = wxNewId(); +const long FD_ESR::ID_STATICTEXT12 = wxNewId(); +const long FD_ESR::ID_RADIOBUTTON1 = wxNewId(); +const long FD_ESR::ID_RADIOBUTTON2 = wxNewId(); +const long FD_ESR::ID_STATICTEXT11 = wxNewId(); +const long FD_ESR::ID_TEXTCTRL11 = wxNewId(); const long FD_ESR::ID_BUTTON1 = wxNewId(); const long FD_ESR::ID_BUTTON2 = wxNewId(); //*) @@ -106,6 +107,7 @@ FD_ESR::FD_ESR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& s wxFlexGridSizer* FlexGridSizer7; wxStaticBoxSizer* StaticBoxSizer3; wxGridSizer* GridSizer3; + wxFlexGridSizer* FlexGridSizer8; wxFlexGridSizer* FlexGridSizer6; wxStaticBoxSizer* StaticBoxSizer1; wxFlexGridSizer* FlexGridSizer1; @@ -193,22 +195,11 @@ FD_ESR::FD_ESR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& s FlexGridSizer1->Add(FlexGridSizer5, 1, wxALL|wxEXPAND, 5); StaticBoxSizer3 = new wxStaticBoxSizer(wxVERTICAL, this, _("Filter Fitting Parameters")); FlexGridSizer6 = new wxFlexGridSizer(0, 1, 0, 0); - FlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0); - StaticText11 = new wxStaticText(this, ID_STATICTEXT11, _("Order for Filter Fitting "), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT11")); - FlexGridSizer7->Add(StaticText11, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl11 = new wxTextCtrl(this, ID_TEXTCTRL11, _("-10"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL11")); - TextCtrl11->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - FlexGridSizer7->Add(TextCtrl11, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - FlexGridSizer6->Add(FlexGridSizer7, 1, wxALL|wxEXPAND, 5); - GridSizer2 = new wxGridSizer(0, 3, 0, 0); - StaticText12 = new wxStaticText(this, ID_STATICTEXT12, _("Range Type"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT12")); - GridSizer2->Add(StaticText12, 2, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - RadioButton1 = new wxRadioButton(this, ID_RADIOBUTTON1, _("Lin"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON1")); - RadioButton1->SetValue(true); - GridSizer2->Add(RadioButton1, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); - RadioButton2 = new wxRadioButton(this, ID_RADIOBUTTON2, _("Log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON2")); - GridSizer2->Add(RadioButton2, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); - FlexGridSizer6->Add(GridSizer2, 1, wxALL|wxEXPAND, 5); + FlexGridSizer8 = new wxFlexGridSizer(0, 3, 0, 0); + CheckBox1 = new wxCheckBox(this, ID_CHECKBOX1, _("Use Defaults"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1")); + CheckBox1->SetValue(true); + FlexGridSizer8->Add(CheckBox1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer6->Add(FlexGridSizer8, 1, wxALL|wxEXPAND, 5); GridSizer3 = new wxGridSizer(0, 2, 0, 0); StaticText13 = new wxStaticText(this, ID_STATICTEXT13, _("Frequency min (Hz)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT13")); GridSizer3->Add(StaticText13, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); @@ -226,6 +217,22 @@ FD_ESR::FD_ESR(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& s TextCtrl14->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); GridSizer3->Add(TextCtrl14, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); FlexGridSizer6->Add(GridSizer3, 1, wxALL|wxEXPAND, 5); + GridSizer2 = new wxGridSizer(0, 3, 0, 0); + StaticText12 = new wxStaticText(this, ID_STATICTEXT12, _("Range Type"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT12")); + GridSizer2->Add(StaticText12, 2, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + RadioButton1 = new wxRadioButton(this, ID_RADIOBUTTON1, _("Lin"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON1")); + RadioButton1->SetValue(true); + GridSizer2->Add(RadioButton1, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + RadioButton2 = new wxRadioButton(this, ID_RADIOBUTTON2, _("Log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON2")); + GridSizer2->Add(RadioButton2, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer6->Add(GridSizer2, 1, wxALL|wxEXPAND, 5); + FlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0); + StaticText11 = new wxStaticText(this, ID_STATICTEXT11, _("Order for Filter Fitting "), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT11")); + FlexGridSizer7->Add(StaticText11, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl11 = new wxTextCtrl(this, ID_TEXTCTRL11, _("-10"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL11")); + TextCtrl11->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + FlexGridSizer7->Add(TextCtrl11, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer6->Add(FlexGridSizer7, 1, wxALL|wxEXPAND, 5); StaticBoxSizer3->Add(FlexGridSizer6, 1, wxALL|wxEXPAND, 5); FlexGridSizer1->Add(StaticBoxSizer3, 1, wxALL|wxEXPAND, 5); FlexGridSizer4 = new wxFlexGridSizer(0, 5, 0, 0); diff --git a/GUI/SW1/SRC/FD_ESR.h b/GUI/SW1/SRC/FD_ESR.h index 8a140ef..8255d76 100644 --- a/GUI/SW1/SRC/FD_ESR.h +++ b/GUI/SW1/SRC/FD_ESR.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -81,6 +82,7 @@ class FD_ESR: public wxDialog wxStaticText* StaticText3; wxStaticLine* StaticLine7; wxButton* Button2; + wxCheckBox* CheckBox1; wxStaticLine* StaticLine4; wxStaticLine* StaticLine2; wxTextCtrl* TextCtrl14; @@ -139,17 +141,18 @@ class FD_ESR: public wxDialog static const long ID_TEXTCTRL9; static const long ID_STATICTEXT10; static const long ID_TEXTCTRL10; - static const long ID_STATICTEXT11; - static const long ID_TEXTCTRL11; - static const long ID_STATICTEXT12; - static const long ID_RADIOBUTTON1; - static const long ID_RADIOBUTTON2; + static const long ID_CHECKBOX1; static const long ID_STATICTEXT13; static const long ID_TEXTCTRL12; static const long ID_STATICTEXT14; static const long ID_TEXTCTRL13; static const long ID_STATICTEXT15; static const long ID_TEXTCTRL14; + static const long ID_STATICTEXT12; + static const long ID_RADIOBUTTON1; + static const long ID_RADIOBUTTON2; + static const long ID_STATICTEXT11; + static const long ID_TEXTCTRL11; static const long ID_BUTTON1; static const long ID_BUTTON2; //*) diff --git a/GUI/SW1/SRC/FD_ESR_SW.cpp b/GUI/SW1/SRC/FD_ESR_SW.cpp index e4e0f93..1b11f84 100644 --- a/GUI/SW1/SRC/FD_ESR_SW.cpp +++ b/GUI/SW1/SRC/FD_ESR_SW.cpp @@ -90,17 +90,18 @@ const long FD_ESR_SW::ID_STATICTEXT14 = wxNewId(); const long FD_ESR_SW::ID_TEXTCTRL14 = wxNewId(); const long FD_ESR_SW::ID_STATICTEXT15 = wxNewId(); const long FD_ESR_SW::ID_TEXTCTRL15 = wxNewId(); -const long FD_ESR_SW::ID_STATICTEXT16 = wxNewId(); -const long FD_ESR_SW::ID_TEXTCTRL16 = wxNewId(); -const long FD_ESR_SW::ID_STATICTEXT17 = wxNewId(); -const long FD_ESR_SW::ID_RADIOBUTTON1 = wxNewId(); -const long FD_ESR_SW::ID_RADIOBUTTON2 = wxNewId(); +const long FD_ESR_SW::ID_CHECKBOX1 = wxNewId(); const long FD_ESR_SW::ID_STATICTEXT18 = wxNewId(); const long FD_ESR_SW::ID_TEXTCTRL17 = wxNewId(); const long FD_ESR_SW::ID_STATICTEXT19 = wxNewId(); const long FD_ESR_SW::ID_TEXTCTRL18 = wxNewId(); const long FD_ESR_SW::ID_STATICTEXT20 = wxNewId(); const long FD_ESR_SW::ID_TEXTCTRL19 = wxNewId(); +const long FD_ESR_SW::ID_STATICTEXT17 = wxNewId(); +const long FD_ESR_SW::ID_RADIOBUTTON1 = wxNewId(); +const long FD_ESR_SW::ID_RADIOBUTTON2 = wxNewId(); +const long FD_ESR_SW::ID_STATICTEXT16 = wxNewId(); +const long FD_ESR_SW::ID_TEXTCTRL16 = wxNewId(); const long FD_ESR_SW::ID_BUTTON1 = wxNewId(); const long FD_ESR_SW::ID_BUTTON2 = wxNewId(); //*) @@ -116,6 +117,7 @@ FD_ESR_SW::FD_ESR_SW(wxWindow* parent,wxWindowID id) wxStaticBoxSizer* StaticBoxSizer2; wxFlexGridSizer* FlexGridSizer4; wxStaticBoxSizer* StaticBoxSizer4; + wxFlexGridSizer* FlexGridSizer10; wxFlexGridSizer* FlexGridSizer3; wxFlexGridSizer* FlexGridSizer5; wxFlexGridSizer* FlexGridSizer9; @@ -224,24 +226,14 @@ FD_ESR_SW::FD_ESR_SW(wxWindow* parent,wxWindowID id) TextCtrl15 = new wxTextCtrl(this, ID_TEXTCTRL15, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL15")); FlexGridSizer5->Add(TextCtrl15, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); StaticBoxSizer3->Add(FlexGridSizer5, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - FlexGridSizer1->Add(StaticBoxSizer3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer1->Add(StaticBoxSizer3, 1, wxALL|wxALIGN_TOP|wxALIGN_CENTER_HORIZONTAL, 5); StaticBoxSizer4 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Filter Fitting Parameters")); FlexGridSizer6 = new wxFlexGridSizer(0, 1, 0, 0); - FlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0); - StaticText16 = new wxStaticText(this, ID_STATICTEXT16, _("Order for filter fitting "), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT16")); - FlexGridSizer7->Add(StaticText16, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl16 = new wxTextCtrl(this, ID_TEXTCTRL16, _("-10"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL16")); - TextCtrl16->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - FlexGridSizer7->Add(TextCtrl16, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - FlexGridSizer6->Add(FlexGridSizer7, 1, wxALL|wxEXPAND, 5); - FlexGridSizer8 = new wxFlexGridSizer(0, 3, 0, 0); - StaticText17 = new wxStaticText(this, ID_STATICTEXT17, _("Range Type"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT17")); - FlexGridSizer8->Add(StaticText17, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - RadioButton1 = new wxRadioButton(this, ID_RADIOBUTTON1, _("Lin"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON1")); - FlexGridSizer8->Add(RadioButton1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - RadioButton2 = new wxRadioButton(this, ID_RADIOBUTTON2, _("Log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON2")); - FlexGridSizer8->Add(RadioButton2, 1, wxALL, 5); - FlexGridSizer6->Add(FlexGridSizer8, 1, wxALL|wxEXPAND, 5); + FlexGridSizer10 = new wxFlexGridSizer(0, 3, 0, 0); + CheckBox1 = new wxCheckBox(this, ID_CHECKBOX1, _("Use Default"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1")); + CheckBox1->SetValue(true); + FlexGridSizer10->Add(CheckBox1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer6->Add(FlexGridSizer10, 1, wxALL|wxEXPAND, 5); FlexGridSizer9 = new wxFlexGridSizer(0, 2, 0, 0); StaticText18 = new wxStaticText(this, ID_STATICTEXT18, _("Frequency min (Hz)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT18")); FlexGridSizer9->Add(StaticText18, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); @@ -259,6 +251,21 @@ FD_ESR_SW::FD_ESR_SW(wxWindow* parent,wxWindowID id) TextCtrl19->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); FlexGridSizer9->Add(TextCtrl19, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); FlexGridSizer6->Add(FlexGridSizer9, 1, wxALL|wxEXPAND, 5); + FlexGridSizer8 = new wxFlexGridSizer(0, 3, 0, 0); + StaticText17 = new wxStaticText(this, ID_STATICTEXT17, _("Range Type"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT17")); + FlexGridSizer8->Add(StaticText17, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + RadioButton1 = new wxRadioButton(this, ID_RADIOBUTTON1, _("Lin"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON1")); + FlexGridSizer8->Add(RadioButton1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + RadioButton2 = new wxRadioButton(this, ID_RADIOBUTTON2, _("Log"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON2")); + FlexGridSizer8->Add(RadioButton2, 1, wxALL, 5); + FlexGridSizer6->Add(FlexGridSizer8, 1, wxALL|wxEXPAND, 5); + FlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0); + StaticText16 = new wxStaticText(this, ID_STATICTEXT16, _("Order for filter fitting "), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT16")); + FlexGridSizer7->Add(StaticText16, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl16 = new wxTextCtrl(this, ID_TEXTCTRL16, _("-10"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL16")); + TextCtrl16->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + FlexGridSizer7->Add(TextCtrl16, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer6->Add(FlexGridSizer7, 1, wxALL|wxEXPAND, 5); StaticBoxSizer4->Add(FlexGridSizer6, 1, wxALL|wxEXPAND, 5); FlexGridSizer1->Add(StaticBoxSizer4, 1, wxALL|wxEXPAND, 5); FlexGridSizer2 = new wxFlexGridSizer(0, 2, 0, 0); diff --git a/GUI/SW1/SRC/FD_ESR_SW.h b/GUI/SW1/SRC/FD_ESR_SW.h index fd78f83..685eeee 100644 --- a/GUI/SW1/SRC/FD_ESR_SW.h +++ b/GUI/SW1/SRC/FD_ESR_SW.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,7 @@ class FD_ESR_SW: public wxDialog wxStaticLine* StaticLine7; wxButton* Button2; wxTextCtrl* TextCtrl18; + wxCheckBox* CheckBox1; wxStaticLine* StaticLine4; wxStaticLine* StaticLine2; wxStaticLine* StaticLine12; @@ -161,17 +163,18 @@ class FD_ESR_SW: public wxDialog static const long ID_TEXTCTRL14; static const long ID_STATICTEXT15; static const long ID_TEXTCTRL15; - static const long ID_STATICTEXT16; - static const long ID_TEXTCTRL16; - static const long ID_STATICTEXT17; - static const long ID_RADIOBUTTON1; - static const long ID_RADIOBUTTON2; + static const long ID_CHECKBOX1; static const long ID_STATICTEXT18; static const long ID_TEXTCTRL17; static const long ID_STATICTEXT19; static const long ID_TEXTCTRL18; static const long ID_STATICTEXT20; static const long ID_TEXTCTRL19; + static const long ID_STATICTEXT17; + static const long ID_RADIOBUTTON1; + static const long ID_RADIOBUTTON2; + static const long ID_STATICTEXT16; + static const long ID_TEXTCTRL16; static const long ID_BUTTON1; static const long ID_BUTTON2; //*) diff --git a/GUI/SW1/SRC/FLEXCABLE.cpp b/GUI/SW1/SRC/FLEXCABLE.cpp index cb44e43..f42db69 100644 --- a/GUI/SW1/SRC/FLEXCABLE.cpp +++ b/GUI/SW1/SRC/FLEXCABLE.cpp @@ -55,14 +55,15 @@ const long FLEXCABLE::ID_STATICTEXT2 = wxNewId(); const long FLEXCABLE::ID_TEXTCTRL2 = wxNewId(); const long FLEXCABLE::ID_STATICTEXT3 = wxNewId(); const long FLEXCABLE::ID_TEXTCTRL3 = wxNewId(); +const long FLEXCABLE::ID_STATICTEXT17 = wxNewId(); +const long FLEXCABLE::ID_TEXTCTRL14 = wxNewId(); +const long FLEXCABLE::ID_GRID1 = wxNewId(); const long FLEXCABLE::ID_STATICTEXT4 = wxNewId(); -const long FLEXCABLE::ID_TEXTCTRL4 = wxNewId(); +const long FLEXCABLE::ID_CHECKBOX2 = wxNewId(); const long FLEXCABLE::ID_STATICTEXT5 = wxNewId(); -const long FLEXCABLE::ID_TEXTCTRL5 = wxNewId(); +const long FLEXCABLE::ID_COMBOBOX1 = wxNewId(); const long FLEXCABLE::ID_STATICTEXT6 = wxNewId(); -const long FLEXCABLE::ID_TEXTCTRL6 = wxNewId(); -const long FLEXCABLE::ID_STATICTEXT17 = wxNewId(); -const long FLEXCABLE::ID_TEXTCTRL14 = wxNewId(); +const long FLEXCABLE::ID_CHECKBOX3 = wxNewId(); const long FLEXCABLE::ID_PANEL2 = wxNewId(); const long FLEXCABLE::ID_STATICTEXT12 = wxNewId(); const long FLEXCABLE::ID_TEXTCTRL12 = wxNewId(); @@ -88,6 +89,10 @@ FLEXCABLE::FLEXCABLE(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxS //(*Initialize(FLEXCABLE) wxBoxSizer* BoxSizer4; wxStaticBoxSizer* StaticBoxSizer2; + wxBoxSizer* BoxSizer6; + wxFlexGridSizer* FlexGridSizer4; + wxBoxSizer* BoxSizer5; + wxBoxSizer* BoxSizer7; wxFlexGridSizer* FlexGridSizer3; wxFlexGridSizer* FlexGridSizer5; wxFlexGridSizer* FlexGridSizer2; @@ -110,38 +115,52 @@ FLEXCABLE::FLEXCABLE(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxS BoxSizer3 = new wxBoxSizer(wxVERTICAL); Notebook1 = new wxNotebook(this, ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0, _T("ID_NOTEBOOK1")); Panel2 = new wxPanel(Notebook1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL2")); + BoxSizer5 = new wxBoxSizer(wxVERTICAL); + BoxSizer6 = new wxBoxSizer(wxVERTICAL); FlexGridSizer3 = new wxFlexGridSizer(0, 2, 0, 0); - StaticText16 = new wxStaticText(Panel2, ID_STATICTEXT16, _("Number of Conductors"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT16")); + StaticText16 = new wxStaticText(Panel2, ID_STATICTEXT16, _("Number of Conductor Rows"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT16")); FlexGridSizer3->Add(StaticText16, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl13 = new wxTextCtrl(Panel2, ID_TEXTCTRL13, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL13")); + TextCtrl13 = new wxTextCtrl(Panel2, ID_TEXTCTRL13, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER, wxDefaultValidator, _T("ID_TEXTCTRL13")); FlexGridSizer3->Add(TextCtrl13, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText2 = new wxStaticText(Panel2, ID_STATICTEXT2, _("Conductor Width in x (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2")); + StaticText2 = new wxStaticText(Panel2, ID_STATICTEXT2, _("Dielectric Width x, (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2")); FlexGridSizer3->Add(StaticText2, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl2 = new wxTextCtrl(Panel2, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2")); FlexGridSizer3->Add(TextCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText3 = new wxStaticText(Panel2, ID_STATICTEXT3, _("Conductor Height in y (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3")); + StaticText3 = new wxStaticText(Panel2, ID_STATICTEXT3, _("Dielectric Height, y (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3")); FlexGridSizer3->Add(StaticText3, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl3 = new wxTextCtrl(Panel2, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL3")); FlexGridSizer3->Add(TextCtrl3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText4 = new wxStaticText(Panel2, ID_STATICTEXT4, _("Conductor Separation (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4")); - FlexGridSizer3->Add(StaticText4, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl4 = new wxTextCtrl(Panel2, ID_TEXTCTRL4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL4")); - FlexGridSizer3->Add(TextCtrl4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText5 = new wxStaticText(Panel2, ID_STATICTEXT5, _("Dielectric Offset in x (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5")); - FlexGridSizer3->Add(StaticText5, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl5 = new wxTextCtrl(Panel2, ID_TEXTCTRL5, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL5")); - FlexGridSizer3->Add(TextCtrl5, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText6 = new wxStaticText(Panel2, ID_STATICTEXT6, _("Dielectric Offset in y (m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT6")); - FlexGridSizer3->Add(StaticText6, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - TextCtrl6 = new wxTextCtrl(Panel2, ID_TEXTCTRL6, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL6")); - FlexGridSizer3->Add(TextCtrl6, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); StaticText17 = new wxStaticText(Panel2, ID_STATICTEXT17, _("Conductor Conductivity (S/m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT17")); FlexGridSizer3->Add(StaticText17, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); TextCtrl14 = new wxTextCtrl(Panel2, ID_TEXTCTRL14, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL14")); FlexGridSizer3->Add(TextCtrl14, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - Panel2->SetSizer(FlexGridSizer3); - FlexGridSizer3->Fit(Panel2); - FlexGridSizer3->SetSizeHints(Panel2); + BoxSizer6->Add(FlexGridSizer3, 0, wxALIGN_LEFT, 0); + BoxSizer5->Add(BoxSizer6, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + BoxSizer7 = new wxBoxSizer(wxHORIZONTAL); + Grid1 = new wxGrid(Panel2, ID_GRID1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxVSCROLL|wxHSCROLL|wxFULL_REPAINT_ON_RESIZE, _T("ID_GRID1")); + BoxSizer7->Add(Grid1, 3, wxALL|wxEXPAND, 5); + BoxSizer5->Add(BoxSizer7, 1, wxALL|wxEXPAND, 5); + FlexGridSizer4 = new wxFlexGridSizer(0, 2, 0, 0); + StaticText4 = new wxStaticText(Panel2, ID_STATICTEXT4, _("Use Laplace"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4")); + FlexGridSizer4->Add(StaticText4, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + CheckBox2 = new wxCheckBox(Panel2, ID_CHECKBOX2, _("Yes"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX2")); + CheckBox2->SetValue(true); + CheckBox2->Disable(); + FlexGridSizer4->Add(CheckBox2, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + StaticText5 = new wxStaticText(Panel2, ID_STATICTEXT5, _("View Mesh"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5")); + FlexGridSizer4->Add(StaticText5, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + ComboBox1 = new wxComboBox(Panel2, ID_COMBOBOX1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_COMBOBOX1")); + FlexGridSizer4->Add(ComboBox1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticText6 = new wxStaticText(Panel2, ID_STATICTEXT6, _("Refine Mesh"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT6")); + FlexGridSizer4->Add(StaticText6, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + CheckBox3 = new wxCheckBox(Panel2, ID_CHECKBOX3, _("Yes"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX3")); + CheckBox3->SetValue(false); + CheckBox3->Disable(); + FlexGridSizer4->Add(CheckBox3, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + BoxSizer5->Add(FlexGridSizer4, 1, wxALL|wxEXPAND, 5); + Panel2->SetSizer(BoxSizer5); + BoxSizer5->Fit(Panel2); + BoxSizer5->SetSizeHints(Panel2); Panel3 = new wxPanel(Notebook1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL3")); BoxSizer4 = new wxBoxSizer(wxVERTICAL); FlexGridSizer5 = new wxFlexGridSizer(0, 2, 0, 0); @@ -187,11 +206,10 @@ FLEXCABLE::FLEXCABLE(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxS FlexGridSizer1->SetSizeHints(this); Connect(ID_TEXTCTRL13,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl13Text); + Connect(ID_TEXTCTRL13,wxEVT_COMMAND_TEXT_ENTER,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl13TextEnter); Connect(ID_TEXTCTRL2,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl2Text); Connect(ID_TEXTCTRL3,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl3Text); - Connect(ID_TEXTCTRL4,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl4Text); - Connect(ID_TEXTCTRL5,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl5Text); - Connect(ID_TEXTCTRL6,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl6Text); + Connect(ID_CHECKBOX3,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&FLEXCABLE::OnCheckBox3Click); Connect(ID_TEXTCTRL12,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&FLEXCABLE::OnTextCtrl12Text); Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&FLEXCABLE::OnCheckBox1Click); Connect(ID_NOTEBOOK1,wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,(wxObjectEventFunction)&FLEXCABLE::OnNotebook1PageChanging); @@ -200,16 +218,15 @@ FLEXCABLE::FLEXCABLE(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxS Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&FLEXCABLE::OnButton3Click); Panel1->Connect(wxEVT_PAINT,(wxObjectEventFunction)&FLEXCABLE::OnPanel1Paint,0,this); Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&FLEXCABLE::OnPanel1LeftDClick,0,this); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&FLEXCABLE::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); TextCtrl3->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); - TextCtrl4->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); - TextCtrl5->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); - TextCtrl6->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); TextCtrl12->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); TextCtrl14->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); CheckBox1->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); + Grid1->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&FLEXCABLE::OnHighlightSchematic, this); } @@ -219,12 +236,15 @@ FLEXCABLE::~FLEXCABLE() //*) } -void FLEXCABLE::SetPathToMOD(wxString Path, wxString Name) +void FLEXCABLE::OnPaint(wxPaintEvent& event) { + if (EDIT_EXISTING==true) EditExistingCable(); +} +void FLEXCABLE::SetPathToMOD(wxString Path, wxString Name) +{ pathToMOD << Path; MODname << Name; - } void FLEXCABLE::OnButton1Click(wxCommandEvent& event) @@ -243,9 +263,6 @@ void FLEXCABLE::OnButton1Click(wxCommandEvent& event) check_is_empty(TextCtrl2, &IsError); check_is_empty(TextCtrl3, &IsError); - check_is_empty(TextCtrl4, &IsError); - check_is_empty(TextCtrl5, &IsError); - check_is_empty(TextCtrl6, &IsError); check_is_empty(TextCtrl13, &IsError); check_is_empty(TextCtrl14, &IsError); @@ -321,6 +338,38 @@ void FLEXCABLE::OnButton2Click(wxCommandEvent& event) run_status->ShowModal(); Button1->Enable(); + + if (CheckBox2->GetValue()) + { + + wxString pattern (("*.msh.vtk")) ; + + wxString file; + + ComboBox1->Clear(); + + file = wxFindFirstFile(pattern); + + while ( !file.empty()) + { + wxString meshfile = file; + size_t extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + meshfile = meshfile.substr(2,meshfile.length()); + + ComboBox1->Append(meshfile); + + file = wxFindNextFile(); + } + + CheckBox3->Enable(); + } } void FLEXCABLE::OnButton3Click(wxCommandEvent& event) @@ -344,27 +393,6 @@ void FLEXCABLE::OnTextCtrl3Text(wxCommandEvent& event) check_is_positive(TextCtrl3, &IsError); } -void FLEXCABLE::OnTextCtrl4Text(wxCommandEvent& event) -{ - int IsError = 0; - check_is_numeric(TextCtrl4, &IsError); - check_is_positive(TextCtrl4, &IsError); -} - -void FLEXCABLE::OnTextCtrl5Text(wxCommandEvent& event) -{ - int IsError = 0; - check_is_numeric(TextCtrl5, &IsError); - check_is_positive(TextCtrl5, &IsError); -} - -void FLEXCABLE::OnTextCtrl6Text(wxCommandEvent& event) -{ - int IsError = 0; - check_is_numeric(TextCtrl6, &IsError); - check_is_positive(TextCtrl6, &IsError); -} - void FLEXCABLE::OnTextCtrl12Text(wxCommandEvent& event) { int IsError = 0; @@ -434,20 +462,46 @@ void FLEXCABLE::WriteCableFile (wxString fileName) cableFile.open (fullFileName); + int n_rows, n_conductors, row; + + n_conductors = 0; + + n_rows = wxAtoi(TextCtrl13->GetValue()); + + for (int i = 0; i < n_rows; i++){ + + wxString conductors = Grid1->GetCellValue(i,5); + + n_conductors = n_conductors + wxAtoi(conductors); + + } + + int n_parameters = (n_rows * 6) + 4; + if (cableFile.is_open()) { - // minimum requirements for type Cylindrical cableFile <<"# MOD_cable_lib_dir \n"; cableFile <<"../"<< MODname <<"/CABLE/"<<"\n"; - cableFile <<"Flex_cable\n"; - cableFile << TextCtrl13->GetValue() <<" #number of conductors \n"; - cableFile <<"6 #number of parameters \n"; - cableFile << TextCtrl2->GetValue() <<" # parameter 1: conductor width (x dimension)\n"; - cableFile << TextCtrl3->GetValue() <<" # parameter 2: conductor height (y dimension)\n"; - cableFile << TextCtrl4->GetValue() <<" # parameter 3: conductor separation (x dimension)\n"; - cableFile << TextCtrl5->GetValue() <<" # parameter 4: dielectric offset x\n"; - cableFile << TextCtrl6->GetValue() <<" # parameter 5: dielectric offset y\n"; - cableFile << TextCtrl14->GetValue() <<" # parameter 6: conductivity\n"; + cableFile <<"flex_cable\n"; + cableFile << n_conductors <<" #number of conductors \n"; + cableFile << n_parameters <<" #number of parameters \n"; + + cableFile << TextCtrl2->GetValue() <<" # parameter 1: dielectric width (x dimension)\n"; + cableFile << TextCtrl3->GetValue() <<" # parameter 2: dielectric height (y dimension)\n"; + cableFile << TextCtrl13->GetValue() <<" # parameter 3: number of rows of conductors\n"; + + for (row = 0; row < n_rows;row++){ + + cableFile << Grid1->GetCellValue(row,0) <<" # parameter "<< (row * 6) + 4 <<": row "<GetCellValue(row,1) <<" # parameter "<< (row * 6) + 5 <<": row "<GetCellValue(row,2) <<" # parameter "<< (row * 6) + 6 <<": row "<GetCellValue(row,3) <<" # parameter "<< (row * 6) + 7 <<": row "<GetCellValue(row,4) <<" # parameter "<< (row * 6) + 8 <<": row "<GetCellValue(row,5) <<" # parameter "<< (row * 6) + 9 <<": row "<GetValue() <<" # parameter "<< ((row-1) * 6) + 10<<": conductivity\n"; + cableFile <<"1 # number of frequency dependent parameters\n"; if (CheckBox1->GetValue()){ @@ -468,6 +522,20 @@ void FLEXCABLE::WriteCableFile (wxString fileName) cableFile << "1.0\n"; } + cableFile <<"use_laplace \n"; + + if (CheckBox2->GetValue()) + { + //cableFile << "Laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; + cableFile << "Laplace_surface_mesh_constant\n"; + cableFile << MESH_PARAM2 <<"\n"; + //cableFile << "max_mesh_edge_length\n"; + //cableFile << MESH_PARAM3 <<"\n"; + + CheckBox2 ->SetValue(false); + } + cableFile.close(); } } @@ -491,14 +559,23 @@ void FLEXCABLE::flexcableSchematic() dc.DrawLine( size_h/2, 0, size_h/2, size_v); dc.SetTextForeground(*wxBLUE); - dc.DrawText("General Flexcable", 10, 15); + dc.DrawText("General Multi-layer Flexcable", 10, 15); + + float conductor_width_r1, conductor_height_r1, conductor_width_r2, conductor_height_r2,conductor_width_r3, conductor_height_r3,conductor_separation_r1, conductor_separation_r2,totalHeight, totalWidth; + + conductor_width_r1 = 0.175 * size_h; + conductor_height_r1 = 0.06 * size_v; - float conductor_width, conductor_height, conductor_separation, totalHeight, totalWidth; + conductor_width_r2 = 0.175 * size_h; + conductor_height_r2 = 0.04 * size_v; - conductor_width = 0.175 * size_h; - conductor_height = 0.06 * size_v; - conductor_separation = 0.05 * size_h; - totalHeight = 0.15 * size_v; + conductor_width_r3 = 0.9 * size_h; + conductor_height_r3 = 0.02 * size_v; + + conductor_separation_r1 = 0.05 * size_h; + conductor_separation_r2 = 0.1 * size_h; + + totalHeight = 0.5 * size_v; totalWidth = 0.98 * size_h; dc.SetPen( wxPen( wxColor(192,192,192),1 ) ); @@ -506,13 +583,98 @@ void FLEXCABLE::flexcableSchematic() dc.DrawRectangle(wxPoint(size_h/2-totalWidth/2, size_v/2-totalHeight/2), wxSize(totalWidth,totalHeight)); dc.SetBrush(wxBrush(wxColor(224,224,224), wxSOLID)); - dc.DrawRectangle(wxPoint(size_h/2-conductor_width-conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2-(2* conductor_width)-(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_width +(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.SetPen( wxPen( wxColor(0,0,0),4, wxDOT ) ); - dc.DrawLine( size_h/2 - conductor_separation, size_v/2, size_h/2 + conductor_separation, size_v/2); + //row 1 + dc.DrawRectangle(wxPoint(size_h/2- 2 * conductor_width_r1 - 2 * conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2- conductor_width_r1 - conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2 + conductor_width_r1 + conductor_separation_r1 , size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + + //row 2 + dc.DrawRectangle(wxPoint(size_h/2 - 1.5 * conductor_width_r2 - conductor_separation_r2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r2/2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + + // row n + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r3/2, size_v/2 + totalHeight/4 ), wxSize(conductor_width_r3,conductor_height_r3)); + + dc.SetPen( wxPen( wxColor(0,0,0),2, wxDOT ) ); + dc.DrawLine( size_h/2 - conductor_separation_r1 , size_v/3, size_h/2 + conductor_width_r1 + conductor_separation_r1, size_v/3); + dc.DrawLine( size_h/2 - conductor_width_r2/2 , size_v/2 - conductor_height_r2/2 , size_h/2 - conductor_width_r2/2 - conductor_separation_r2, size_v/2 - conductor_height_r2/2); + + dc.SetPen( wxPen( wxColor(51,51,255),1 , wxDOT_DASH) ); + dc.DrawLine( size_h*0.2, size_v/2-conductor_height_r2/2, size_h*0.7,size_v/2-conductor_height_r2/2 ); + dc.DrawLine( size_h/2-conductor_width_r2/2-conductor_separation_r2/2, size_v/2-conductor_height_r2, size_h/2-conductor_width_r2/2-conductor_separation_r2/2,size_v/2+conductor_height_r2 ); + + wxPoint arrowHead[3]; + + dc.SetPen(wxPen(wxColor(51,51,255), 3)); + dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); + dc.DrawLine( size_h/2-conductor_width_r2/2-conductor_separation_r2/2,size_v/2-conductor_height_r2*2, size_h/2,size_v/2-conductor_height_r2*2 ); + + arrowHead[0] = wxPoint(size_h/2-conductor_width_r2/2-conductor_separation_r2/2,size_v/2-conductor_height_r2*2); + arrowHead[1] = wxPoint(size_h/2-conductor_width_r2/2-conductor_separation_r2/2+5,size_v/2-conductor_height_r2*2-3); + arrowHead[2] = wxPoint(size_h/2-conductor_width_r2/2-conductor_separation_r2/2+5,size_v/2-conductor_height_r2*2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h/2,size_v/2-conductor_height_r2*2); + arrowHead[1] = wxPoint(size_h/2 -5,size_v/2-conductor_height_r2*2-3); + arrowHead[2] = wxPoint(size_h/2 -5,size_v/2-conductor_height_r2*2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h*0.65,size_v/2); + arrowHead[1] = wxPoint(size_h*0.65 - 3,size_v/2 + 5); + arrowHead[2] = wxPoint(size_h*0.65 + 3,size_v/2 + 5); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h*0.65,size_v/2 - conductor_height_r2/2); + arrowHead[1] = wxPoint(size_h*0.65 - 3,size_v/2 - conductor_height_r2/2 - 5); + arrowHead[2] = wxPoint(size_h*0.65 + 3,size_v/2 - conductor_height_r2/2 - 5); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + dc.SetTextForeground(*wxBLUE); + dc.DrawText("offset x", size_h/2 + 3,size_v/2-conductor_height_r2*2 - 10); + dc.DrawText("offset y", size_h*0.65,size_v/2 - conductor_height_r2/2 + 15); + dc.DrawText("h", 45,size_v/2 - conductor_height_r2/2-10); + dc.DrawText("w", 100,size_v/2 + 20); + dc.DrawText("s", 180,size_v/2 + 20); + + + + + dc.DrawLine( size_h/2-conductor_width_r2 * 1.5 - conductor_separation_r2,size_v/2 + conductor_height_r2, size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2,size_v/2 + conductor_height_r2 ); + dc.DrawLine( size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2,size_v/2 + conductor_height_r2, size_h/2-conductor_width_r2 * 0.5,size_v/2 + conductor_height_r2 ); + + arrowHead[0] = wxPoint(size_h/2-conductor_width_r2 * 1.5 - conductor_separation_r2,size_v/2 + conductor_height_r2); + arrowHead[1] = wxPoint(size_h/2-conductor_width_r2 * 1.5 - conductor_separation_r2+5,size_v/2 + conductor_height_r2-3); + arrowHead[2] = wxPoint(size_h/2-conductor_width_r2 * 1.5 - conductor_separation_r2+5,size_v/2 + conductor_height_r2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2,size_v/2 + conductor_height_r2); + arrowHead[1] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2 -5,size_v/2 + conductor_height_r2-3); + arrowHead[2] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2 -5,size_v/2 + conductor_height_r2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2,size_v/2 + conductor_height_r2); + arrowHead[1] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2 +5,size_v/2 + conductor_height_r2-3); + arrowHead[2] = wxPoint(size_h/2-conductor_width_r2 * 0.5 - conductor_separation_r2 +5,size_v/2 + conductor_height_r2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h/2-conductor_width_r2 * 0.5 ,size_v/2 + conductor_height_r2); + arrowHead[1] = wxPoint(size_h/2-conductor_width_r2 * 0.5 -5,size_v/2 + conductor_height_r2-3); + arrowHead[2] = wxPoint(size_h/2-conductor_width_r2 * 0.5 -5,size_v/2 + conductor_height_r2+3); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + + + arrowHead[0] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2,size_v/2); + arrowHead[1] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2 - 3,size_v/2 - 5); + arrowHead[2] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2 + 3,size_v/2 - 5); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + + arrowHead[0] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2,size_v/2 - conductor_height_r2); + arrowHead[1] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2 - 3,size_v/2 - conductor_height_r2 + 5); + arrowHead[2] = wxPoint(size_h/2-5-conductor_width_r2 * 1.5 - conductor_separation_r2 + 3,size_v/2 - conductor_height_r2 + 5); + dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + } void FLEXCABLE::OnHighlightSchematic(wxCommandEvent& event) @@ -525,115 +687,144 @@ void FLEXCABLE::OnHighlightSchematic(wxCommandEvent& event) int size_h, size_v; Panel1->GetSize(&size_h, &size_v ); - float conductor_width, conductor_height, conductor_separation, totalHeight, totalWidth; - - conductor_width = 0.175 * size_h; - conductor_height = 0.06 * size_v; - conductor_separation = 0.05 * size_h; - totalHeight = 0.15 * size_v; - totalWidth = 0.98 * size_h; - - wxClientDC dc(Panel1); + float conductor_width_r1, conductor_height_r1, conductor_width_r2, conductor_height_r2,conductor_width_r3, conductor_height_r3,conductor_separation_r1, conductor_separation_r2,totalHeight, totalWidth; - wxPoint arrowHead[3]; + conductor_width_r1 = 0.175 * size_h; + conductor_height_r1 = 0.06 * size_v; - if ( ID == ID_TEXTCTRL2) - { - dc.SetPen(wxPen(wxColor(51,51,255), 3)); - dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawLine( size_h/2 - conductor_width - conductor_separation,size_v/2, size_h/2 - conductor_separation,size_v/2 ); + conductor_width_r2 = 0.175 * size_h; + conductor_height_r2 = 0.04 * size_v; - arrowHead[0] = wxPoint(size_h/2 - conductor_width - conductor_separation,size_v/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_width - conductor_separation+5,size_v/2-3); - arrowHead[2] = wxPoint(size_h/2 - conductor_width - conductor_separation+5,size_v/2+3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + conductor_width_r3 = 0.9 * size_h; + conductor_height_r3 = 0.02 * size_v; - arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_separation-5,size_v/2-3); - arrowHead[2] = wxPoint(size_h/2 - conductor_separation-5,size_v/2+3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - } + conductor_separation_r1 = 0.05 * size_h; + conductor_separation_r2 = 0.1 * size_h; - if ( ID == ID_TEXTCTRL3) - { - dc.SetPen(wxPen(wxColor(51,51,255), 3)); - dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawLine( size_h/2 - conductor_separation,size_v/2-conductor_height/2, size_h/2 - conductor_separation,size_v/2 + conductor_height/2); + totalHeight = 0.5 * size_v; + totalWidth = 0.98 * size_h; - arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2-conductor_height/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2-conductor_height/2 + 5); - arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2-conductor_height/2 + 5); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + wxClientDC dc(Panel1); - arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 + conductor_height/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 + conductor_height/2 - 5); - arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 + conductor_height/2 - 5); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - } + wxPoint arrowHead[3]; - if ( ID == ID_TEXTCTRL4) + if ( ID == ID_TEXTCTRL14) { - dc.SetPen(wxPen(wxColor(51,51,255), 3)); - dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawLine( size_h/2 - conductor_width - 2 * conductor_separation,size_v/2, size_h/2 - conductor_width - conductor_separation,size_v/2); - - arrowHead[0] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation,size_v/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation + 5,size_v/2 - 3); - arrowHead[2] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation + 5,size_v/2 + 3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - arrowHead[0] = wxPoint(size_h/2 - conductor_width - conductor_separation,size_v/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_width - conductor_separation - 5,size_v/2 - 3); - arrowHead[2] = wxPoint(size_h/2 - conductor_width - conductor_separation - 5,size_v/2 + 3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - } - - if ( ID == ID_TEXTCTRL5) - { dc.SetPen(wxPen(wxColor(51,51,255), 3)); dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawLine( size_h/2 - totalWidth/2, size_v/2, size_h/2 - 2 * conductor_width - 2 * conductor_separation,size_v/2); - arrowHead[0] = wxPoint(size_h/2 - totalWidth/2, size_v/2); - arrowHead[1] = wxPoint(size_h/2 - totalWidth/2 + 5, size_v/2 - 3); - arrowHead[2] = wxPoint(size_h/2 - totalWidth/2 + 5, size_v/2 + 3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + //row 1 + dc.DrawRectangle(wxPoint(size_h/2- 2 * conductor_width_r1 - 2 * conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2- conductor_width_r1 - conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2 + conductor_width_r1 + conductor_separation_r1 , size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); - arrowHead[0] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation,size_v/2); - arrowHead[1] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation - 5,size_v/2 - 3); - arrowHead[2] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation - 5,size_v/2 + 3); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); + //row 2 + dc.DrawRectangle(wxPoint(size_h/2 - 1.5 * conductor_width_r2 - conductor_separation_r2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r2/2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + // row n + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r3/2, size_v/2 + totalHeight/4 ), wxSize(conductor_width_r3,conductor_height_r3)); } - if ( ID == ID_TEXTCTRL6) - { - dc.SetPen(wxPen(wxColor(51,51,255), 3)); - dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawLine( size_h/2 - conductor_separation,size_v/2 - conductor_height/2, size_h/2 - conductor_separation,size_v/2 - totalHeight/2); - - arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 - conductor_height/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 - conductor_height/2 - 5); - arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 - conductor_height/2 - 5); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 - totalHeight/2); - arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 - totalHeight/2 +5); - arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 - totalHeight/2 + 5); - dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); - } - if ( ID == ID_TEXTCTRL14) - { - dc.SetPen(wxPen(wxColor(51,51,255), 3)); - dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); - dc.DrawRectangle(wxPoint(size_h/2-conductor_width-conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2-(2* conductor_width)-(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_width +(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - - } +// if ( ID == ID_TEXTCTRL2) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawLine( size_h/2 - conductor_width - conductor_separation,size_v/2, size_h/2 - conductor_separation,size_v/2 ); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_width - conductor_separation,size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_width - conductor_separation+5,size_v/2-3); +// arrowHead[2] = wxPoint(size_h/2 - conductor_width - conductor_separation+5,size_v/2+3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_separation-5,size_v/2-3); +// arrowHead[2] = wxPoint(size_h/2 - conductor_separation-5,size_v/2+3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// } +// +// if ( ID == ID_TEXTCTRL3) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawLine( size_h/2 - conductor_separation,size_v/2-conductor_height/2, size_h/2 - conductor_separation,size_v/2 + conductor_height/2); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2-conductor_height/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2-conductor_height/2 + 5); +// arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2-conductor_height/2 + 5); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 + conductor_height/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 + conductor_height/2 - 5); +// arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 + conductor_height/2 - 5); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// } +// +// if ( ID == ID_TEXTCTRL4) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawLine( size_h/2 - conductor_width - 2 * conductor_separation,size_v/2, size_h/2 - conductor_width - conductor_separation,size_v/2); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation,size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation + 5,size_v/2 - 3); +// arrowHead[2] = wxPoint(size_h/2 - conductor_width - 2 * conductor_separation + 5,size_v/2 + 3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_width - conductor_separation,size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_width - conductor_separation - 5,size_v/2 - 3); +// arrowHead[2] = wxPoint(size_h/2 - conductor_width - conductor_separation - 5,size_v/2 + 3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// } +// +// if ( ID == ID_TEXTCTRL5) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawLine( size_h/2 - totalWidth/2, size_v/2, size_h/2 - 2 * conductor_width - 2 * conductor_separation,size_v/2); +// +// arrowHead[0] = wxPoint(size_h/2 - totalWidth/2, size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - totalWidth/2 + 5, size_v/2 - 3); +// arrowHead[2] = wxPoint(size_h/2 - totalWidth/2 + 5, size_v/2 + 3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// arrowHead[0] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation,size_v/2); +// arrowHead[1] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation - 5,size_v/2 - 3); +// arrowHead[2] = wxPoint(size_h/2 - 2 * conductor_width - 2 * conductor_separation - 5,size_v/2 + 3); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// } +// +// if ( ID == ID_TEXTCTRL6) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawLine( size_h/2 - conductor_separation,size_v/2 - conductor_height/2, size_h/2 - conductor_separation,size_v/2 - totalHeight/2); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 - conductor_height/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 - conductor_height/2 - 5); +// arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 - conductor_height/2 - 5); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// +// arrowHead[0] = wxPoint(size_h/2 - conductor_separation,size_v/2 - totalHeight/2); +// arrowHead[1] = wxPoint(size_h/2 - conductor_separation - 3,size_v/2 - totalHeight/2 +5); +// arrowHead[2] = wxPoint(size_h/2 - conductor_separation + 3,size_v/2 - totalHeight/2 + 5); +// dc.DrawPolygon(WXSIZEOF(arrowHead), arrowHead); +// } +// if ( ID == ID_TEXTCTRL14) +// { +// dc.SetPen(wxPen(wxColor(51,51,255), 3)); +// dc.SetBrush(wxBrush(wxColor(51,51,255), wxSOLID)); +// dc.DrawRectangle(wxPoint(size_h/2-conductor_width-conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); +// dc.DrawRectangle(wxPoint(size_h/2-(2* conductor_width)-(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); +// dc.DrawRectangle(wxPoint(size_h/2 + conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); +// dc.DrawRectangle(wxPoint(size_h/2 + conductor_width +(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); +// +// } - if ( ID == ID_TEXTCTRL12 || ID == ID_CHECKBOX1) + if ( ID == ID_TEXTCTRL12 || ID == ID_CHECKBOX1 || ID == ID_TEXTCTRL2 || ID == ID_TEXTCTRL3) { dc.SetPen( wxPen( wxColor(51,51,255),1 ) ); dc.SetBrush(wxBrush(wxColor(51,51,255), wxBDIAGONAL_HATCH)); @@ -641,15 +832,37 @@ void FLEXCABLE::OnHighlightSchematic(wxCommandEvent& event) dc.SetPen( wxPen( wxColor(192,192,192),1 ) ); dc.SetBrush(wxBrush(wxColor(224,224,224), wxSOLID)); - dc.DrawRectangle(wxPoint(size_h/2-conductor_width-conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2-(2* conductor_width)-(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_separation, size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); - dc.DrawRectangle(wxPoint(size_h/2 + conductor_width +(2*conductor_separation), size_v/2-conductor_height/2), wxSize(conductor_width,conductor_height)); + + //row 1 + dc.DrawRectangle(wxPoint(size_h/2- 2 * conductor_width_r1 - 2 * conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2- conductor_width_r1 - conductor_separation_r1, size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + dc.DrawRectangle(wxPoint(size_h/2 + conductor_width_r1 + conductor_separation_r1 , size_v/3-conductor_height_r1/2), wxSize(conductor_width_r1,conductor_height_r1)); + + //row 2 + dc.DrawRectangle(wxPoint(size_h/2 - 1.5 * conductor_width_r2 - conductor_separation_r2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r2/2, size_v/2-conductor_height_r2), wxSize(conductor_width_r2,conductor_height_r2)); + + // row n + dc.DrawRectangle(wxPoint(size_h/2 - conductor_width_r3/2, size_v/2 + totalHeight/4 ), wxSize(conductor_width_r3,conductor_height_r3)); dc.SetPen( wxPen( wxColor(0,0,0),4, wxDOT ) ); - dc.DrawLine( size_h/2 - conductor_separation, size_v/2, size_h/2 + conductor_separation, size_v/2); + dc.DrawLine( size_h/2 - conductor_separation_r1 , size_v/3, size_h/2 + conductor_width_r1 + conductor_separation_r1, size_v/3); + dc.DrawLine( size_h/2 - conductor_width_r2/2 , size_v/2 - conductor_height_r2/2 , size_h/2 - conductor_width_r2/2 - conductor_separation_r2, size_v/2 - conductor_height_r2/2); + + //dc.SetPen( wxPen( wxColor(0,0,0),4, wxDOT ) ); + //dc.DrawLine( size_h/2 - conductor_separation, size_v/2, size_h/2 + conductor_separation, size_v/2); } + +// if ( ID == ID_GRID1) +// { +// +// dc.SetPen( wxPen( wxColor(51,51,255),1 , wxDOT_DASH) ); +// dc.DrawLine( size_h*0.25, size_v/2-conductor_height_r2/2, size_h*0.75,size_v/2-conductor_height_r2/2 ); +// //dc.DrawLine( size_h/2, 0, size_h/2, size_v); +// +// +// } } void FLEXCABLE::OnNotebook1PageChanging(wxNotebookEvent& event) @@ -662,4 +875,64 @@ void FLEXCABLE::OnPanel1LeftDClick(wxMouseEvent& event) flexcableSchematic(); } +void FLEXCABLE::EditExistingCable() +{ + Close(); +} +void FLEXCABLE::OnTextCtrl13TextEnter(wxCommandEvent& event) +{ + + int IsError = 0; + check_is_numeric(TextCtrl13, &IsError); + check_is_positive(TextCtrl3, &IsError); + + double value_tb13; + wxString contents_tb13; + + contents_tb13 = TextCtrl13->GetValue(); + + contents_tb13.ToDouble(&value_tb13); + + Grid1 -> CreateGrid (value_tb13, 6); + + Grid1->EnableEditing(true); + Grid1->EnableGridLines(true); + + Grid1 -> SetColLabelValue(0,_("offset x")); + Grid1 -> SetColLabelValue(1,_("offset y")); + Grid1 -> SetColLabelValue(2,_("width")); + Grid1 -> SetColLabelValue(3,_("height")); + Grid1 -> SetColLabelValue(4,_("separation")); + Grid1 -> SetColLabelValue(5,_("conductor n")); + + for (int row_num = 0; row_num < value_tb13; row_num++){ + + wxString row; + row << row_num+1; + + Grid1 -> SetRowLabelValue(row_num,_(row)); + } + +} + +void FLEXCABLE::OnCheckBox3Click(wxCommandEvent& event) +{ + if (CheckBox3->GetValue()) + { + MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); + + winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + //winMESH_PARAM->TextCtrl4->Disable(); + + if ( winMESH_PARAM->ShowModal() == wxID_OK ) + { + MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); + MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); + MESH_PARAM3 = winMESH_PARAM->TextCtrl3->GetValue(); + } + winMESH_PARAM->Destroy(); + } + WriteCableFile (TextCtrl1->GetValue()); +} diff --git a/GUI/SW1/SRC/FLEXCABLE.h b/GUI/SW1/SRC/FLEXCABLE.h index 852a2cb..7c0be62 100644 --- a/GUI/SW1/SRC/FLEXCABLE.h +++ b/GUI/SW1/SRC/FLEXCABLE.h @@ -48,8 +48,10 @@ #include #include #include +#include #include #include +#include //*) // Additional wxWidgets Includes @@ -70,32 +72,6 @@ using namespace std; -class flexcableSchematicPane : public wxPanel -{ - -public: - flexcableSchematicPane(wxFrame* parent); - - void paintEvent(wxPaintEvent & evt); - void paintNow(); - - void render(wxDC& dc); - - // some useful events - /* - void mouseMoved(wxMouseEvent& event); - void mouseDown(wxMouseEvent& event); - void mouseWheelMoved(wxMouseEvent& event); - void mouseReleased(wxMouseEvent& event); - void rightClick(wxMouseEvent& event); - void mouseLeftWindow(wxMouseEvent& event); - void keyPressed(wxKeyEvent& event); - void keyReleased(wxKeyEvent& event); - */ - - DECLARE_EVENT_TABLE() -}; - class FLEXCABLE: public wxDialog { public: @@ -109,13 +85,12 @@ class FLEXCABLE: public wxDialog void WriteCableFile(wxString); - void paintNow(); - void render(wxDC& dc); + void EditExistingCable(); + bool EDIT_EXISTING; + void flexcableSchematic(); void OnHighlightSchematic(wxCommandEvent & event); - flexcableSchematicPane *drawPane; - wxString FD_ESR6; wxString FD_ESR7; wxString FD_ESR8; @@ -124,19 +99,22 @@ class FLEXCABLE: public wxDialog wxString MESH_PARAM1; wxString MESH_PARAM2; + wxString MESH_PARAM3; + wxString MESH_PARAM4; //(*Declarations(FLEXCABLE) - wxTextCtrl* TextCtrl4; wxNotebook* Notebook1; wxStaticText* StaticText13; wxStaticText* StaticText2; wxStaticText* StaticText14; wxButton* Button1; wxStaticText* StaticText6; - wxTextCtrl* TextCtrl6; + wxCheckBox* CheckBox3; + wxCheckBox* CheckBox2; wxPanel* Panel1; wxStaticText* StaticText1; wxStaticText* StaticText3; + wxGrid* Grid1; wxButton* Button2; wxPanel* Panel3; wxCheckBox* CheckBox1; @@ -145,13 +123,13 @@ class FLEXCABLE: public wxDialog wxStaticText* StaticText5; wxTextCtrl* TextCtrl13; wxTextCtrl* TextCtrl2; + wxComboBox* ComboBox1; wxTextCtrl* TextCtrl1; wxStaticText* StaticText15; wxStaticText* StaticText12; wxPanel* Panel2; - wxTextCtrl* TextCtrl5; - wxStaticText* StaticText17; wxStaticText* StaticText4; + wxStaticText* StaticText17; wxTextCtrl* TextCtrl3; wxTextCtrl* TextCtrl12; wxStaticText* StaticText16; @@ -168,14 +146,15 @@ class FLEXCABLE: public wxDialog static const long ID_TEXTCTRL2; static const long ID_STATICTEXT3; static const long ID_TEXTCTRL3; + static const long ID_STATICTEXT17; + static const long ID_TEXTCTRL14; + static const long ID_GRID1; static const long ID_STATICTEXT4; - static const long ID_TEXTCTRL4; + static const long ID_CHECKBOX2; static const long ID_STATICTEXT5; - static const long ID_TEXTCTRL5; + static const long ID_COMBOBOX1; static const long ID_STATICTEXT6; - static const long ID_TEXTCTRL6; - static const long ID_STATICTEXT17; - static const long ID_TEXTCTRL14; + static const long ID_CHECKBOX3; static const long ID_PANEL2; static const long ID_STATICTEXT12; static const long ID_TEXTCTRL12; @@ -215,6 +194,10 @@ class FLEXCABLE: public wxDialog void OnPanel1LeftDClick(wxMouseEvent& event); void OnComboBox1Selected(wxCommandEvent& event); void OnCheckBox3Click(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); + void OnTextCtrl13TextEnter(wxCommandEvent& event); + void OnGrid1CellLeftClick(wxGridEvent& event); + void OnCheckBox3Click1(wxCommandEvent& event); //*) DECLARE_EVENT_TABLE() diff --git a/GUI/SW1/SRC/MESH_LAPLACE.cpp b/GUI/SW1/SRC/MESH_LAPLACE.cpp index 7ce4336..0372e3e 100644 --- a/GUI/SW1/SRC/MESH_LAPLACE.cpp +++ b/GUI/SW1/SRC/MESH_LAPLACE.cpp @@ -104,7 +104,7 @@ void draw_mesh(wxPanel *Panel, wxString mesh_to_draw) if (xmax-xmin > ymax-ymin) scale = size_h/(xmax-xmin); - else scale = 0.75*(size_v/(ymax-ymin)); + else scale = 5.0*(size_v/(ymax-ymin));//0.75*(size_v/(ymax-ymin)); dc.SetPen( wxPen( *wxBLUE)); diff --git a/GUI/SW1/SRC/MESH_PARAM.cpp b/GUI/SW1/SRC/MESH_PARAM.cpp index 4d9ec28..501a109 100644 --- a/GUI/SW1/SRC/MESH_PARAM.cpp +++ b/GUI/SW1/SRC/MESH_PARAM.cpp @@ -11,6 +11,10 @@ const long MESH_PARAM::ID_STATICTEXT1 = wxNewId(); const long MESH_PARAM::ID_TEXTCTRL1 = wxNewId(); const long MESH_PARAM::ID_STATICTEXT2 = wxNewId(); const long MESH_PARAM::ID_TEXTCTRL2 = wxNewId(); +const long MESH_PARAM::ID_STATICTEXT3 = wxNewId(); +const long MESH_PARAM::ID_TEXTCTRL3 = wxNewId(); +const long MESH_PARAM::ID_STATICTEXT4 = wxNewId(); +const long MESH_PARAM::ID_TEXTCTRL4 = wxNewId(); const long MESH_PARAM::ID_BUTTON1 = wxNewId(); const long MESH_PARAM::ID_BUTTON2 = wxNewId(); //*) @@ -35,15 +39,23 @@ MESH_PARAM::MESH_PARAM(wxWindow* parent,wxWindowID id,const wxPoint& pos,const w StaticBoxSizer1 = new wxStaticBoxSizer(wxVERTICAL, this, _("SACAMOS: Laplace Mesh Parameters")); FlexGridSizer2 = new wxFlexGridSizer(0, 2, 0, 0); StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Boundary Constant"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1")); - FlexGridSizer2->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer2->Add(StaticText1, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl1 = new wxTextCtrl(this, ID_TEXTCTRL1, _("3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1")); TextCtrl1->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); FlexGridSizer2->Add(TextCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Surface Mesh Constant"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2")); - FlexGridSizer2->Add(StaticText2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + FlexGridSizer2->Add(StaticText2, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl2 = new wxTextCtrl(this, ID_TEXTCTRL2, _("3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2")); FlexGridSizer2->Add(TextCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticBoxSizer1->Add(FlexGridSizer2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("Max Mesh Edge Length"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3")); + FlexGridSizer2->Add(StaticText3, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl3 = new wxTextCtrl(this, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL3")); + FlexGridSizer2->Add(TextCtrl3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Ground Plane Mesh Edge Length"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4")); + FlexGridSizer2->Add(StaticText4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + TextCtrl4 = new wxTextCtrl(this, ID_TEXTCTRL4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL4")); + FlexGridSizer2->Add(TextCtrl4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + StaticBoxSizer1->Add(FlexGridSizer2, 3, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); BoxSizer1 = new wxBoxSizer(wxHORIZONTAL); Button1 = new wxButton(this, ID_BUTTON1, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1")); BoxSizer1->Add(Button1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); diff --git a/GUI/SW1/SRC/MESH_PARAM.h b/GUI/SW1/SRC/MESH_PARAM.h index 0df05b0..f6b322f 100644 --- a/GUI/SW1/SRC/MESH_PARAM.h +++ b/GUI/SW1/SRC/MESH_PARAM.h @@ -20,12 +20,16 @@ class MESH_PARAM: public wxDialog virtual ~MESH_PARAM(); //(*Declarations(MESH_PARAM) + wxTextCtrl* TextCtrl4; wxStaticText* StaticText2; wxButton* Button1; wxStaticText* StaticText1; + wxStaticText* StaticText3; wxButton* Button2; wxTextCtrl* TextCtrl2; wxTextCtrl* TextCtrl1; + wxStaticText* StaticText4; + wxTextCtrl* TextCtrl3; //*) protected: @@ -35,6 +39,10 @@ class MESH_PARAM: public wxDialog static const long ID_TEXTCTRL1; static const long ID_STATICTEXT2; static const long ID_TEXTCTRL2; + static const long ID_STATICTEXT3; + static const long ID_TEXTCTRL3; + static const long ID_STATICTEXT4; + static const long ID_TEXTCTRL4; static const long ID_BUTTON1; static const long ID_BUTTON2; //*) diff --git a/GUI/SW1/SRC/SPACEWIRE.cpp b/GUI/SW1/SRC/SPACEWIRE.cpp index a92d0a5..e8f5501 100644 --- a/GUI/SW1/SRC/SPACEWIRE.cpp +++ b/GUI/SW1/SRC/SPACEWIRE.cpp @@ -358,6 +358,7 @@ SPACEWIRE::SPACEWIRE(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxS Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&SPACEWIRE::OnButton1Click); Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&SPACEWIRE::OnButton2Click); Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&SPACEWIRE::OnButton3Click); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&SPACEWIRE::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&SPACEWIRE::OnHighlightSchematic, this); @@ -385,6 +386,11 @@ SPACEWIRE::~SPACEWIRE() //*) } +void SPACEWIRE::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + void SPACEWIRE::SetPathToMOD(wxString Path, wxString Name) { pathToMOD << Path; @@ -479,6 +485,8 @@ void SPACEWIRE::OnCheckBox1Click(wxCommandEvent& event) FD_ESR14 = winFD_ESR->TextCtrl14->GetValue(); FD_ESR15 = winFD_ESR->TextCtrl15->GetValue(); + FD_Default = winFD_ESR->CheckBox1->GetValue(); + FD_ORDER = winFD_ESR->TextCtrl16->GetValue(); FD_lin = winFD_ESR->RadioButton1->GetValue(); FD_Fmin = winFD_ESR->TextCtrl17->GetValue(); @@ -520,41 +528,34 @@ void SPACEWIRE::OnButton2Click(wxCommandEvent& event) Button1->Enable(); - if (CheckBox2->GetValue()){ - // Identify all mesh files for viewing - //struct _finddata_t fileinfo; - //long hFile; - //wxString meshFileName = "*.msh.vtk"; - wxString pattern = "*.msh.vtk"; - //wxString pattern((meshFileName)); + if (CheckBox2->GetValue()) + { + + wxString pattern (("*.msh.vtk")) ; + wxString file; + ComboBox1->Clear(); file = wxFindFirstFile(pattern); + while ( !file.empty()) { wxString meshfile = file; - size_t extindex = meshfile.find_first_of ("."); + size_t extindex = meshfile.find_last_of ("."); meshfile = meshfile.substr(0, extindex); + extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + meshfile = meshfile.substr(2,meshfile.length()); + ComboBox1->Append(meshfile); - } -// if (( hFile = _findfirst( pattern, &fileinfo )) != -1 ) -// { -// do -// { -// wxString meshfile = fileinfo.name; -// size_t extindex = meshfile.find_first_of ("."); -// -// meshfile = meshfile.substr(0, extindex); -// -// ComboBox1->Append(meshfile); -// -// } while ( _findnext( hFile, &fileinfo) == 0); -// } -// _findclose( hFile); + file = wxFindNextFile(); + } CheckBox3->Enable(); } @@ -954,18 +955,18 @@ void SPACEWIRE::WriteCableFile (wxString fileName) cableFile << TextCtrl25->GetValue() <<" \t# list of denominator coefficients b0 b1 b2... \n"; } - if (CheckBox1->GetValue()){ + if (!FD_Default){ cableFile << FD_ORDER <<"\t # order for filter fitting\n"; if (FD_lin) { - cableFile << "lin # frequency range type for filter fitting type (lin or dB)"; + cableFile << "lin # frequency range type for filter fitting type (lin or dB)\n"; } else { - cableFile << "log # frequency range type for filter fitting type (lin or dB)"; + cableFile << "log # frequency range type for filter fitting type (lin or dB)\n"; } - cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_ORDER <<"\t # fmin fmax number_of_frequencies for filter fitting"; + cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_Num <<"\t # fmin fmax number_of_frequencies for filter fitting\n"; } if (CheckBox2->GetValue()){ @@ -977,8 +978,8 @@ void SPACEWIRE::WriteCableFile (wxString fileName) if (CheckBox3->GetValue()) { - cableFile << "Laplace_boundary_constant\n"; - cableFile << MESH_PARAM1 <<"\n"; + //cableFile << "Laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; cableFile << "Laplace_surface_mesh_constant\n"; cableFile << MESH_PARAM2 <<"\n"; @@ -1629,10 +1630,12 @@ void SPACEWIRE::OnCheckBox3Click(wxCommandEvent& event) MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + winMESH_PARAM->TextCtrl4->Disable(); if ( winMESH_PARAM->ShowModal() == wxID_OK ) { - MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); + //MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); } winMESH_PARAM->Destroy(); @@ -1643,3 +1646,8 @@ void SPACEWIRE::OnCheckBox3Click(wxCommandEvent& event) void SPACEWIRE::OnTextCtrl28Text(wxCommandEvent& event) { } + +void SPACEWIRE::EditExistingCable() +{ + Close(); +} diff --git a/GUI/SW1/SRC/SPACEWIRE.h b/GUI/SW1/SRC/SPACEWIRE.h index 41b0859..d36d190 100644 --- a/GUI/SW1/SRC/SPACEWIRE.h +++ b/GUI/SW1/SRC/SPACEWIRE.h @@ -84,6 +84,9 @@ class SPACEWIRE: public wxDialog void WriteCableFile(wxString); + void EditExistingCable(); + bool EDIT_EXISTING; + void spacewireSchematic(); void OnHighlightSchematic(wxCommandEvent & event); @@ -102,6 +105,7 @@ class SPACEWIRE: public wxDialog wxString FD_ESR13; wxString FD_ESR14; wxString FD_ESR15; + bool FD_Default; wxString FD_ORDER; bool FD_log; @@ -299,6 +303,7 @@ class SPACEWIRE: public wxDialog void OnComboBox1Selected(wxCommandEvent& event); void OnCheckBox3Click(wxCommandEvent& event); void OnTextCtrl28Text(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); //*) DECLARE_EVENT_TABLE() diff --git a/GUI/SW1/SRC/SW1_GUI b/GUI/SW1/SRC/SW1_GUI new file mode 100644 index 0000000..6ed9d9e Binary files /dev/null and b/GUI/SW1/SRC/SW1_GUI differ diff --git a/GUI/SW1/SRC/SW1_GUI.depend b/GUI/SW1/SRC/SW1_GUI.depend index dae885d..2c326ad 100644 --- a/GUI/SW1/SRC/SW1_GUI.depend +++ b/GUI/SW1/SRC/SW1_GUI.depend @@ -1678,7 +1678,7 @@ 1412638442 c:\wxwidgets-3.0.2\include\wx\dcclient.h "wx/dc.h" -1529401255 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\bundlebldr.cpp +1530173890 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\bundlebldr.cpp "BUNDLEBLDR.h" "PLACE_CABLE.h" "MESH_LAPLACE.h" @@ -1693,7 +1693,7 @@ -1529401255 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\bundlebldr.h +1530112526 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\bundlebldr.h @@ -2292,7 +2292,7 @@ -1502693576 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\mesh_param.h +1530173790 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\mesh_param.h @@ -3504,7 +3504,7 @@ 1502693576 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\mesh_laplace.cpp "MESH_LAPLACE.h" -1502693576 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\mesh_param.cpp +1530173859 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\mesh_param.cpp "MESH_PARAM.h" @@ -3725,7 +3725,7 @@ -1514834002 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\utp.h +1530174670 c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\utp.h @@ -3800,9 +3800,2313 @@ 1502693568 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\utilities.cpp "UTILITIES.h" -1514834022 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\utp.cpp +1530174324 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\utp.cpp "UTP.h" +1529401881 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\coaxial.cpp + "COAXIAL.h" + + + + + +1529401956 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\dconn.cpp + "DCONN.h" + + + + +1529401903 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\tp.cpp + "TP.h" + + + + +1529401932 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\twinax.cpp + "TWINAX.h" + + + + +1530175102 source:c:\users\eezsg\desktop\sacamos_june_2018\local_sw1\cylindrical.cpp + "CYLINDRICAL.h" + + + + +1512938044 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\about.cpp + "ABOUT.h" + + + + + + + + +1502693582 c:\users\steve\desktop\sacamos_june_2018\local_sw1\about.h + + + + + +1530399382 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\bundle_schematic.cpp + "BUNDLE_SCHEMATIC.h" + +1502693582 c:\users\steve\desktop\sacamos_june_2018\local_sw1\bundle_schematic.h + + + + + + + + +1530400880 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\bundlebldr.cpp + "BUNDLEBLDR.h" + "PLACE_CABLE.h" + "MESH_LAPLACE.h" + + + + + + + + + + + +1530112528 c:\users\steve\desktop\sacamos_june_2018\local_sw1\bundlebldr.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + +1502693578 c:\users\steve\desktop\sacamos_june_2018\local_sw1\fileselectorctrl.h + "wx/treectrl.h" + "wx/dialog.h" + "wx/dirdlg.h" + "wx/choice.h" + +1502693568 c:\users\steve\desktop\sacamos_june_2018\local_sw1\utilities.h + + + + + +1502693576 c:\users\steve\desktop\sacamos_june_2018\local_sw1\mesh_laplace.h + + + + + + + + + + + +1530173792 c:\users\steve\desktop\sacamos_june_2018\local_sw1\mesh_param.h + + + + + + "UTILITIES.h" + +1502693574 c:\users\steve\desktop\sacamos_june_2018\local_sw1\run_status.h + + + + + + + + +1502693576 c:\users\steve\desktop\sacamos_june_2018\local_sw1\place_cable.h + + + + + + +1530399130 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\cable_schematic.cpp + "CABLE_SCHEMATIC.h" + +1502693580 c:\users\steve\desktop\sacamos_june_2018\local_sw1\cable_schematic.h + + + + + + + +1530175204 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\coaxial.cpp + "COAXIAL.h" + + + + + +1514832982 c:\users\steve\desktop\sacamos_june_2018\local_sw1\coaxial.h + + + + + + + + + + + + "UTILITIES.h" + "FD_ESR.h" + "FD_ZT.h" + "RUN_STATUS.h" + + + + +1509497630 c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_esr.h + + + + + + + + "UTILITIES.h" + +1502693578 c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_zt.h + + + + + + + +1530175204 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\cylindrical.cpp + "CYLINDRICAL.h" + + + + +1514832882 c:\users\steve\desktop\sacamos_june_2018\local_sw1\cylindrical.h + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1529401958 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\dconn.cpp + "DCONN.h" + + + + +1514918482 c:\users\steve\desktop\sacamos_june_2018\local_sw1\dconn.h + + + + + + + + + + + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "UTILITIES.h" + + + + +1508706938 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\export_spice.cpp + "EXPORT_SPICE.h" + + + +1508706152 c:\users\steve\desktop\sacamos_june_2018\local_sw1\export_spice.h + + + + + + + + + +1509497630 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_esr.cpp + "FD_ESR.h" + + + + +1509484978 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_esr_sw.cpp + "FD_ESR_SW.h" + "UTILITIES.h" + + + + +1509483256 c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_esr_sw.h + + + + + + + + +1502693578 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\fd_zt.cpp + "FD_ZT.h" + + + +1502693578 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\fileselectorctrl.cpp + "wx/wxprec.h" + "wx/generic/dirctrlg.h" + "FileSelectorCtrl.h" + "wx/hash.h" + "wx/intl.h" + "wx/log.h" + "wx/utils.h" + "wx/button.h" + "wx/icon.h" + "wx/settings.h" + "wx/msgdlg.h" + "wx/choice.h" + "wx/textctrl.h" + "wx/layout.h" + "wx/sizer.h" + "wx/textdlg.h" + "wx/gdicmn.h" + "wx/image.h" + "wx/module.h" + "wx/filename.h" + "wx/filefn.h" + "wx/imaglist.h" + "wx/tokenzr.h" + "wx/dir.h" + "wx/artprov.h" + "wx/mimetype.h" + "wx/statline.h" + "wx/osx/private.h" + + "wx/msw/winundef.h" + "wx/volume.h" + + "dos.h" + +1502693576 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\mesh_laplace.cpp + "MESH_LAPLACE.h" + +1530173860 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\mesh_param.cpp + "MESH_PARAM.h" + + + + +1514917242 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\overshield.cpp + "OVERSHIELD.h" + + + + +1514918530 c:\users\steve\desktop\sacamos_june_2018\local_sw1\overshield.h + + + + + + + + + "MESH_LAPLACE.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1502693576 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\place_cable.cpp + "PLACE_CABLE.h" + + + +1502693574 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\resource.rc + "wx/msw/wx.rc" + +1502693574 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\run_status.cpp + "RUN_STATUS.h" + + + +1514834464 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\spacewire.cpp + "SPACEWIRE.h" + + + + +1514834450 c:\users\steve\desktop\sacamos_june_2018\local_sw1\spacewire.h + + + + + + + + + + + + "FD_ESR_SW.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1509492344 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\spicemodel.cpp + "SPICEMODEL.h" + + + + + + + + + + + +1509486246 c:\users\steve\desktop\sacamos_june_2018\local_sw1\spicemodel.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "BUNDLE_SCHEMATIC.h" + "RUN_STATUS.h" + "UTILITIES.h" + +1502693570 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\sw1_guiapp.cpp + "SW1_GUIApp.h" + "SW1_GUIMain.h" + + +1502693570 c:\users\steve\desktop\sacamos_june_2018\local_sw1\sw1_guiapp.h + + +1514922396 c:\users\steve\desktop\sacamos_june_2018\local_sw1\sw1_guimain.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "ABOUT.h" + "CYLINDRICAL.h" + "COAXIAL.h" + "TWINAX.h" + "UTP.h" + "TP.h" + "SPACEWIRE.h" + "OVERSHIELD.h" + "FLEXCABLE.h" + "DCONN.h" + "BUNDLEBLDR.h" + "SPICEMODEL.h" + "CABLE_SCHEMATIC.h" + "BUNDLE_SCHEMATIC.h" + "EXPORT_SPICE.h" + "UTILITIES.h" + + + + +1530176768 c:\users\steve\desktop\sacamos_june_2018\local_sw1\twinax.h + + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1530174672 c:\users\steve\desktop\sacamos_june_2018\local_sw1\utp.h + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + + +1530175406 c:\users\steve\desktop\sacamos_june_2018\local_sw1\tp.h + + + + + + + + + + + + + "FD_ESR.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530454624 c:\users\steve\desktop\sacamos_june_2018\local_sw1\flexcable.h + + + + + + + + + + + + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "FD_ESR.h" + + + + +1514923368 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\sw1_guimain.cpp + "SW1_GUIMain.h" + + + + + + + +1530175476 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\tp.cpp + "TP.h" + + + + +1530176822 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\twinax.cpp + "TWINAX.h" + + + + +1502693568 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\utilities.cpp + "UTILITIES.h" + +1530174326 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\utp.cpp + "UTP.h" + + + + +1530458170 source:c:\users\steve\desktop\sacamos_june_2018\local_sw1\flexcable.cpp + "FLEXCABLE.h" + + + + +1412638442 c:\wxwidgets-3.0.2\include\wx\grid.h + "wx/generic/grid.h" + "wx/generic/grideditors.h" + "wx/generic/gridctrl.h" + +1412638442 c:\wxwidgets-3.0.2\include\wx\generic\grid.h + "wx/defs.h" + "wx/hashmap.h" + "wx/scrolwin.h" + +1412638442 c:\wxwidgets-3.0.2\include\wx\generic\grideditors.h + "wx/defs.h" + "wx/scopedptr.h" + +1412638442 c:\wxwidgets-3.0.2\include\wx\generic\gridctrl.h + "wx/grid.h" + "wx/datetime.h" + +1512938044 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\about.cpp + "ABOUT.h" + + + + + + + + +1502693582 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\about.h + + + + + +1530399384 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\bundle_schematic.cpp + "BUNDLE_SCHEMATIC.h" + +1502693582 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\bundle_schematic.h + + + + + + + + +1530399132 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\cable_schematic.cpp + "CABLE_SCHEMATIC.h" + +1502693580 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\cable_schematic.h + + + + + + + +1530175204 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\coaxial.cpp + "COAXIAL.h" + + + + + +1514832982 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\coaxial.h + + + + + + + + + + + + "UTILITIES.h" + "FD_ESR.h" + "FD_ZT.h" + "RUN_STATUS.h" + + + + +1502693568 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\utilities.h + + + + + +1509497630 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_esr.h + + + + + + + + "UTILITIES.h" + +1502693578 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_zt.h + + + + + + + +1502693574 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\run_status.h + + + + + + + + +1530175204 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\cylindrical.cpp + "CYLINDRICAL.h" + + + + +1514832882 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\cylindrical.h + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1529401958 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\dconn.cpp + "DCONN.h" + + + + +1514918482 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\dconn.h + + + + + + + + + + + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "UTILITIES.h" + + + + +1502693576 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\mesh_laplace.h + + + + + + + + + + + +1530173792 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\mesh_param.h + + + + + + "UTILITIES.h" + +1508706938 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\export_spice.cpp + "EXPORT_SPICE.h" + + + +1508706152 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\export_spice.h + + + + + + + + + +1509497630 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_esr.cpp + "FD_ESR.h" + + + + +1509484978 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_esr_sw.cpp + "FD_ESR_SW.h" + "UTILITIES.h" + + + + +1509483256 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_esr_sw.h + + + + + + + + +1502693578 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fd_zt.cpp + "FD_ZT.h" + + + +1502693578 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fileselectorctrl.cpp + "wx/wxprec.h" + "wx/generic/dirctrlg.h" + "FileSelectorCtrl.h" + "wx/hash.h" + "wx/intl.h" + "wx/log.h" + "wx/utils.h" + "wx/button.h" + "wx/icon.h" + "wx/settings.h" + "wx/msgdlg.h" + "wx/choice.h" + "wx/textctrl.h" + "wx/layout.h" + "wx/sizer.h" + "wx/textdlg.h" + "wx/gdicmn.h" + "wx/image.h" + "wx/module.h" + "wx/filename.h" + "wx/filefn.h" + "wx/imaglist.h" + "wx/tokenzr.h" + "wx/dir.h" + "wx/artprov.h" + "wx/mimetype.h" + "wx/statline.h" + "wx/osx/private.h" + + "wx/msw/winundef.h" + "wx/volume.h" + + "dos.h" + +1502693578 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\fileselectorctrl.h + "wx/treectrl.h" + "wx/dialog.h" + "wx/dirdlg.h" + "wx/choice.h" + +1530459328 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\flexcable.cpp + "FLEXCABLE.h" + + + + +1530454626 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\flexcable.h + + + + + + + + + + + + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "FD_ESR.h" + + + + +1502693576 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\mesh_laplace.cpp + "MESH_LAPLACE.h" + +1530173860 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\mesh_param.cpp + "MESH_PARAM.h" + + + + +1514917242 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\overshield.cpp + "OVERSHIELD.h" + + + + +1514918530 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\overshield.h + + + + + + + + + "MESH_LAPLACE.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1502693576 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\place_cable.cpp + "PLACE_CABLE.h" + + + +1502693576 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\place_cable.h + + + + + + +1502693574 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\resource.rc + "wx/msw/wx.rc" + +1502693574 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\run_status.cpp + "RUN_STATUS.h" + + + +1514834464 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\spacewire.cpp + "SPACEWIRE.h" + + + + +1514834450 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\spacewire.h + + + + + + + + + + + + "FD_ESR_SW.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1509492344 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\spicemodel.cpp + "SPICEMODEL.h" + + + + + + + + + + + +1509486246 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\spicemodel.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "BUNDLE_SCHEMATIC.h" + "RUN_STATUS.h" + "UTILITIES.h" + +1502693570 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\sw1_guiapp.cpp + "SW1_GUIApp.h" + "SW1_GUIMain.h" + + +1502693570 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\sw1_guiapp.h + + +1514922396 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\sw1_guimain.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "ABOUT.h" + "CYLINDRICAL.h" + "COAXIAL.h" + "TWINAX.h" + "UTP.h" + "TP.h" + "SPACEWIRE.h" + "OVERSHIELD.h" + "FLEXCABLE.h" + "DCONN.h" + "BUNDLEBLDR.h" + "SPICEMODEL.h" + "CABLE_SCHEMATIC.h" + "BUNDLE_SCHEMATIC.h" + "EXPORT_SPICE.h" + "UTILITIES.h" + + + + +1530176768 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\twinax.h + + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1530174672 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\utp.h + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + + +1530175406 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\tp.h + + + + + + + + + + + + + "FD_ESR.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530607380 c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\bundlebldr.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + +1514923368 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\sw1_guimain.cpp + "SW1_GUIMain.h" + + + + + + + +1530175476 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\tp.cpp + "TP.h" + + + + +1530176822 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\twinax.cpp + "TWINAX.h" + + + + +1502693568 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\utilities.cpp + "UTILITIES.h" + +1530174326 source:c:\users\eezsg\desktop\sacamos_july_2018\local_sw1\utp.cpp + "UTP.h" + + + + +1512938044 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\about.cpp + "ABOUT.h" + + + + + + + + +1502693582 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\about.h + + + + + +1530399384 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\bundle_schematic.cpp + "BUNDLE_SCHEMATIC.h" + +1502693582 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\bundle_schematic.h + + + + + + + + +1530399132 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\cable_schematic.cpp + "CABLE_SCHEMATIC.h" + +1502693580 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\cable_schematic.h + + + + + + + +1530175204 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\coaxial.cpp + "COAXIAL.h" + + + + + +1514832982 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\coaxial.h + + + + + + + + + + + + "UTILITIES.h" + "FD_ESR.h" + "FD_ZT.h" + "RUN_STATUS.h" + + + + +1502693568 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\utilities.h + + + + + +1530719642 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_esr.h + + + + + + + + + "UTILITIES.h" + +1502693578 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_zt.h + + + + + + + +1502693574 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\run_status.h + + + + + + + + +1530723820 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\cylindrical.cpp + "CYLINDRICAL.h" + + + + +1530723820 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\cylindrical.h + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530716863 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\dconn.cpp + "DCONN.h" + + + + +1514918482 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\dconn.h + + + + + + + + + + + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "UTILITIES.h" + + + + +1502693576 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\mesh_laplace.h + + + + + + + + + + + +1530714874 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\mesh_param.h + + + + + + "UTILITIES.h" + +1508706938 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\export_spice.cpp + "EXPORT_SPICE.h" + + + +1508706152 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\export_spice.h + + + + + + + + + +1530719661 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_esr.cpp + "FD_ESR.h" + + + + +1530724390 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_esr_sw.cpp + "FD_ESR_SW.h" + "UTILITIES.h" + + + + +1530724365 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_esr_sw.h + + + + + + + + + +1502693578 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fd_zt.cpp + "FD_ZT.h" + + + +1502693578 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fileselectorctrl.cpp + "wx/wxprec.h" + "wx/generic/dirctrlg.h" + "FileSelectorCtrl.h" + "wx/hash.h" + "wx/intl.h" + "wx/log.h" + "wx/utils.h" + "wx/button.h" + "wx/icon.h" + "wx/settings.h" + "wx/msgdlg.h" + "wx/choice.h" + "wx/textctrl.h" + "wx/layout.h" + "wx/sizer.h" + "wx/textdlg.h" + "wx/gdicmn.h" + "wx/image.h" + "wx/module.h" + "wx/filename.h" + "wx/filefn.h" + "wx/imaglist.h" + "wx/tokenzr.h" + "wx/dir.h" + "wx/artprov.h" + "wx/mimetype.h" + "wx/statline.h" + "wx/osx/private.h" + + "wx/msw/winundef.h" + "wx/volume.h" + + "dos.h" + +1502693578 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\fileselectorctrl.h + "wx/treectrl.h" + "wx/dialog.h" + "wx/dirdlg.h" + "wx/choice.h" + +1530735919 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\flexcable.cpp + "FLEXCABLE.h" + + + + +1530714757 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\flexcable.h + + + + + + + + + + + + + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "FD_ESR.h" + + + + +1530740315 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\mesh_laplace.cpp + "MESH_LAPLACE.h" + +1530714885 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\mesh_param.cpp + "MESH_PARAM.h" + + + + +1514917242 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\overshield.cpp + "OVERSHIELD.h" + + + + +1514918530 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\overshield.h + + + + + + + + + "MESH_LAPLACE.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1502693576 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\place_cable.cpp + "PLACE_CABLE.h" + + + +1502693576 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\place_cable.h + + + + + + +1502693574 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\resource.rc + "wx/msw/wx.rc" + +1502693574 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\run_status.cpp + "RUN_STATUS.h" + + + +1530724586 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\spacewire.cpp + "SPACEWIRE.h" + + + + +1530724618 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\spacewire.h + + + + + + + + + + + + "FD_ESR_SW.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1509492344 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\spicemodel.cpp + "SPICEMODEL.h" + + + + + + + + + + + +1509486246 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\spicemodel.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "BUNDLE_SCHEMATIC.h" + "RUN_STATUS.h" + "UTILITIES.h" + +1502693570 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\sw1_guiapp.cpp + "SW1_GUIApp.h" + "SW1_GUIMain.h" + + +1502693570 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\sw1_guiapp.h + + +1514922396 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\sw1_guimain.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "ABOUT.h" + "CYLINDRICAL.h" + "COAXIAL.h" + "TWINAX.h" + "UTP.h" + "TP.h" + "SPACEWIRE.h" + "OVERSHIELD.h" + "FLEXCABLE.h" + "DCONN.h" + "BUNDLEBLDR.h" + "SPICEMODEL.h" + "CABLE_SCHEMATIC.h" + "BUNDLE_SCHEMATIC.h" + "EXPORT_SPICE.h" + "UTILITIES.h" + + + + +1530719968 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\twinax.h + + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1530722667 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\utp.h + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + + +1530722645 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\tp.h + + + + + + + + + + + + + "FD_ESR.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530739987 c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\bundlebldr.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + +1514923368 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\sw1_guimain.cpp + "SW1_GUIMain.h" + + + + + + + +1530724215 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\tp.cpp + "TP.h" + + + + +1530721191 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\twinax.cpp + "TWINAX.h" + + + + +1502693568 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\utilities.cpp + "UTILITIES.h" + +1530723999 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\utp.cpp + "UTP.h" + + + + +1530740293 source:c:\users\steve\desktop\new folder (2)\sacamos_july_2018\local_sw1\bundlebldr.cpp + "BUNDLEBLDR.h" + "PLACE_CABLE.h" + "MESH_LAPLACE.h" + + + + + + + + + + + +1512938044 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\about.cpp + "ABOUT.h" + + + + + + + + +1502693582 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\about.h + + + + + +1530399384 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\bundle_schematic.cpp + "BUNDLE_SCHEMATIC.h" + +1502693582 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\bundle_schematic.h + + + + + + + + +1530740294 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\bundlebldr.cpp + "BUNDLEBLDR.h" + "PLACE_CABLE.h" + "MESH_LAPLACE.h" + + + + + + + + + + + +1530739988 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\bundlebldr.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + +1502693578 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fileselectorctrl.h + "wx/treectrl.h" + "wx/dialog.h" + "wx/dirdlg.h" + "wx/choice.h" + +1502693568 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\utilities.h + + + + + +1502693576 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\mesh_laplace.h + + + + + + + + + + + +1530714876 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\mesh_param.h + + + + + + "UTILITIES.h" + +1502693574 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\run_status.h + + + + + + + + +1502693576 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\place_cable.h + + + + + + +1530399132 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\cable_schematic.cpp + "CABLE_SCHEMATIC.h" + +1502693580 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\cable_schematic.h + + + + + + + +1530175204 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\coaxial.cpp + "COAXIAL.h" + + + + + +1514832982 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\coaxial.h + + + + + + + + + + + + "UTILITIES.h" + "FD_ESR.h" + "FD_ZT.h" + "RUN_STATUS.h" + + + + +1530719644 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_esr.h + + + + + + + + + "UTILITIES.h" + +1502693578 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_zt.h + + + + + + + +1530723822 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\cylindrical.cpp + "CYLINDRICAL.h" + + + + +1530723822 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\cylindrical.h + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530716864 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\dconn.cpp + "DCONN.h" + + + + +1514918482 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\dconn.h + + + + + + + + + + + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "UTILITIES.h" + + + + +1508706938 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\export_spice.cpp + "EXPORT_SPICE.h" + + + +1508706152 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\export_spice.h + + + + + + + + + +1530719662 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_esr.cpp + "FD_ESR.h" + + + + +1530724392 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_esr_sw.cpp + "FD_ESR_SW.h" + "UTILITIES.h" + + + + +1530724366 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_esr_sw.h + + + + + + + + + +1502693578 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fd_zt.cpp + "FD_ZT.h" + + + +1502693578 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\fileselectorctrl.cpp + "wx/wxprec.h" + "wx/generic/dirctrlg.h" + "FileSelectorCtrl.h" + "wx/hash.h" + "wx/intl.h" + "wx/log.h" + "wx/utils.h" + "wx/button.h" + "wx/icon.h" + "wx/settings.h" + "wx/msgdlg.h" + "wx/choice.h" + "wx/textctrl.h" + "wx/layout.h" + "wx/sizer.h" + "wx/textdlg.h" + "wx/gdicmn.h" + "wx/image.h" + "wx/module.h" + "wx/filename.h" + "wx/filefn.h" + "wx/imaglist.h" + "wx/tokenzr.h" + "wx/dir.h" + "wx/artprov.h" + "wx/mimetype.h" + "wx/statline.h" + "wx/osx/private.h" + + "wx/msw/winundef.h" + "wx/volume.h" + + "dos.h" + +1530740316 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\mesh_laplace.cpp + "MESH_LAPLACE.h" + +1530714886 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\mesh_param.cpp + "MESH_PARAM.h" + + + + +1514917242 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\overshield.cpp + "OVERSHIELD.h" + + + + +1514918530 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\overshield.h + + + + + + + + + "MESH_LAPLACE.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1502693576 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\place_cable.cpp + "PLACE_CABLE.h" + + + +1502693574 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\resource.rc + "wx/msw/wx.rc" + +1502693574 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\run_status.cpp + "RUN_STATUS.h" + + + +1530724588 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\spacewire.cpp + "SPACEWIRE.h" + + + + +1530724620 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\spacewire.h + + + + + + + + + + + + "FD_ESR_SW.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1509492344 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\spicemodel.cpp + "SPICEMODEL.h" + + + + + + + + + + + +1509486246 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\spicemodel.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "BUNDLE_SCHEMATIC.h" + "RUN_STATUS.h" + "UTILITIES.h" + +1502693570 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\sw1_guiapp.cpp + "SW1_GUIApp.h" + "SW1_GUIMain.h" + + +1502693570 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\sw1_guiapp.h + + +1514922396 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\sw1_guimain.h + + + + + + + + + + + + + + + "FileSelectorCtrl.h" + "ABOUT.h" + "CYLINDRICAL.h" + "COAXIAL.h" + "TWINAX.h" + "UTP.h" + "TP.h" + "SPACEWIRE.h" + "OVERSHIELD.h" + "FLEXCABLE.h" + "DCONN.h" + "BUNDLEBLDR.h" + "SPICEMODEL.h" + "CABLE_SCHEMATIC.h" + "BUNDLE_SCHEMATIC.h" + "EXPORT_SPICE.h" + "UTILITIES.h" + + + + +1530719970 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\twinax.h + + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + +1530722668 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\utp.h + + + + + + + + + + + + "FD_ESR.h" + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + + + + + +1530722646 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\tp.h + + + + + + + + + + + + + "FD_ESR.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "UTILITIES.h" + "RUN_STATUS.h" + + + + +1530714758 c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\flexcable.h + + + + + + + + + + + + + "UTILITIES.h" + "MESH_LAPLACE.h" + "MESH_PARAM.h" + "RUN_STATUS.h" + "FD_ESR.h" + + + + +1514923368 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\sw1_guimain.cpp + "SW1_GUIMain.h" + + + + + + + +1530724216 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\tp.cpp + "TP.h" + + + + +1530721192 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\twinax.cpp + "TWINAX.h" + + + + +1502693568 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\utilities.cpp + "UTILITIES.h" + +1530724000 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\utp.cpp + "UTP.h" + + + + +1530797567 source:c:\users\eezsg\desktop\sacamos_july_2018\02\local_sw1\flexcable.cpp + "FLEXCABLE.h" + + + + diff --git a/GUI/SW1/SRC/SW1_GUI.layout b/GUI/SW1/SRC/SW1_GUI.layout index 6d9550a..3ed6e4d 100644 --- a/GUI/SW1/SRC/SW1_GUI.layout +++ b/GUI/SW1/SRC/SW1_GUI.layout @@ -2,259 +2,109 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/GUI/SW1/SRC/TP.cpp b/GUI/SW1/SRC/TP.cpp index 0b3da5b..b252d43 100644 --- a/GUI/SW1/SRC/TP.cpp +++ b/GUI/SW1/SRC/TP.cpp @@ -215,7 +215,7 @@ TP::TP(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size) FlexGridSizer8->Add(StaticText25, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl17 = new wxTextCtrl(Panel3, ID_TEXTCTRL17, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL17")); FlexGridSizer8->Add(TextCtrl17, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - StaticText26 = new wxStaticText(Panel3, ID_STATICTEXT26, _("H (henries/m)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT26")); + StaticText26 = new wxStaticText(Panel3, ID_STATICTEXT26, _("H (henries)"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT26")); FlexGridSizer8->Add(StaticText26, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); TextCtrl18 = new wxTextCtrl(Panel3, ID_TEXTCTRL18, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL18")); FlexGridSizer8->Add(TextCtrl18, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); @@ -326,6 +326,7 @@ TP::TP(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size) Panel4->Connect(wxEVT_PAINT,(wxObjectEventFunction)&TP::OnPanel4Paint,0,this); Panel4->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&TP::OnPanel4LeftDClick,0,this); Panel4->Connect(wxEVT_MOUSEWHEEL,(wxObjectEventFunction)&TP::OnPanel4MouseWheel,0,this); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&TP::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&TP::OnHighlightSchematic, this); @@ -347,6 +348,12 @@ TP::~TP() //*) } +void TP::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + + void TP::SetPathToMOD(wxString Path, wxString Name) { @@ -423,6 +430,7 @@ void TP::OnCheckBox1Click(wxCommandEvent& event) FD_ESR *winFD_ESR = new FD_ESR(this); + //winFD_ESR->formtype = 1; if ( winFD_ESR->ShowModal() == wxID_OK ) { @@ -438,6 +446,8 @@ void TP::OnCheckBox1Click(wxCommandEvent& event) FD_ESR9 = winFD_ESR->TextCtrl9->GetValue(); FD_ESR10= winFD_ESR->TextCtrl10->GetValue(); + FD_Default = winFD_ESR->CheckBox1->GetValue(); + FD_ORDER = winFD_ESR->TextCtrl11->GetValue(); FD_lin = winFD_ESR->RadioButton1->GetValue(); FD_Fmin = winFD_ESR->TextCtrl12->GetValue(); @@ -463,7 +473,7 @@ void TP::OnButton2Click(wxCommandEvent& event) system(stream.str().c_str()); - ifstream runStatus; + //ifstream runStatus; // Display Run Status RUN_STATUS *run_status = new RUN_STATUS(this); @@ -473,42 +483,34 @@ void TP::OnButton2Click(wxCommandEvent& event) if (CheckBox2->GetValue()) { - // Identify all mesh files for viewing - //struct _finddata_t fileinfo; - //long hFile; - //wxString meshFileName = "*.msh.vtk"; - wxString pattern = "*.msh.vtk"; - //wxString pattern((meshFileName)); + wxString pattern (("*.msh.vtk")) ; + wxString file; ComboBox1->Clear(); file = wxFindFirstFile(pattern); + + + while ( !file.empty()) { wxString meshfile = file; - size_t extindex = meshfile.find_first_of ("."); + size_t extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + extindex = meshfile.find_last_of ("."); meshfile = meshfile.substr(0, extindex); + meshfile = meshfile.substr(2,meshfile.length()); + ComboBox1->Append(meshfile); - } -// if (( hFile = _findfirst( pattern, &fileinfo )) != -1 ) -// { -// do -// { -// wxString meshfile = fileinfo.name; -// size_t extindex = meshfile.find_first_of ("."); -// -// meshfile = meshfile.substr(0, extindex); -// -// ComboBox1->Append(meshfile); -// -// } while ( _findnext( hFile, &fileinfo) == 0); -// } -// _findclose( hFile); + file = wxFindNextFile(); + } CheckBox3->Enable(); } @@ -517,6 +519,7 @@ void TP::OnButton2Click(wxCommandEvent& event) void TP::OnButton3Click(wxCommandEvent& event) { //clean up directory + wxMessageBox("Please fix highlighted errors" , _("HELP3")); clean_temp_files(); Close(); } @@ -776,18 +779,18 @@ void TP::WriteCableFile (wxString fileName) } } - if (CheckBox1->GetValue()){ + if (!FD_Default){ cableFile << FD_ORDER <<"\t # order for filter fitting\n"; if (FD_lin) { - cableFile << "lin # frequency range type for filter fitting type (lin or dB)"; + cableFile << "lin # frequency range type for filter fitting type (lin or dB)\n"; } else { - cableFile << "log # frequency range type for filter fitting type (lin or dB)"; + cableFile << "log # frequency range type for filter fitting type (lin or dB)\n"; } - cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_ORDER <<"\t # fmin fmax number_of_frequencies for filter fitting"; + cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_Num <<"\t # fmin fmax number_of_frequencies for filter fitting\n"; } if (CheckBox2->GetValue()){ @@ -799,10 +802,12 @@ void TP::WriteCableFile (wxString fileName) if (CheckBox3->GetValue()) { - cableFile << "Laplace_boundary_constant\n"; - cableFile << MESH_PARAM1 <<"\n"; + //cableFile << "Laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; cableFile << "Laplace_surface_mesh_constant\n"; cableFile << MESH_PARAM2 <<"\n"; + //cableFile << "max_mesh_edge_length\n"; + //cableFile << MESH_PARAM3 <<"\n"; CheckBox3 ->SetValue(false); } @@ -1136,11 +1141,14 @@ void TP::OnCheckBox3Click(wxCommandEvent& event) MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + winMESH_PARAM->TextCtrl4->Disable(); if ( winMESH_PARAM->ShowModal() == wxID_OK ) { - MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); + //MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); + //MESH_PARAM3 = winMESH_PARAM->TextCtrl3->GetValue(); } winMESH_PARAM->Destroy(); } @@ -1189,3 +1197,8 @@ void TP::OnCheckBox4Click(wxCommandEvent& event) } + +void TP::EditExistingCable() +{ + Close(); +} diff --git a/GUI/SW1/SRC/TP.h b/GUI/SW1/SRC/TP.h index 70bf529..5ca6fd6 100644 --- a/GUI/SW1/SRC/TP.h +++ b/GUI/SW1/SRC/TP.h @@ -85,6 +85,9 @@ class TP: public wxDialog void WriteCableFile(wxString); + void EditExistingCable(); + bool EDIT_EXISTING; + void tpSchematic(); void OnHighlightSchematic(wxCommandEvent & event); @@ -98,6 +101,7 @@ class TP: public wxDialog wxString FD_ESR8; wxString FD_ESR9; wxString FD_ESR10; + bool FD_Default; wxString FD_ORDER; bool FD_log; @@ -108,6 +112,8 @@ class TP: public wxDialog wxString MESH_PARAM1; wxString MESH_PARAM2; + wxString MESH_PARAM3; + wxString MESH_PARAM4; //(*Declarations(TP) @@ -271,6 +277,7 @@ class TP: public wxDialog void OnTextCtrl17Text(wxCommandEvent& event); void OnTextCtrl18Text(wxCommandEvent& event); void OnCheckBox4Click(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); //*) DECLARE_EVENT_TABLE() diff --git a/GUI/SW1/SRC/TWINAX.cpp b/GUI/SW1/SRC/TWINAX.cpp index a82a10e..c76949b 100644 --- a/GUI/SW1/SRC/TWINAX.cpp +++ b/GUI/SW1/SRC/TWINAX.cpp @@ -334,6 +334,7 @@ TWINAX::TWINAX(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& s Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&TWINAX::OnButton2Click); Panel1->Connect(wxEVT_PAINT,(wxObjectEventFunction)&TWINAX::OnPanel1Paint,0,this); Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&TWINAX::OnPanel1LeftDClick,0,this); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&TWINAX::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&TWINAX::OnHighlightSchematic, this); @@ -355,6 +356,11 @@ TWINAX::~TWINAX() //*) } +void TWINAX::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + void TWINAX::SetPathToMOD(wxString Path, wxString Name) { @@ -442,45 +448,36 @@ void TWINAX::OnButton3Click(wxCommandEvent& event) RUN_STATUS *run_status = new RUN_STATUS(this); run_status->ShowModal(); - Button1->Enable(); + //Button1->Enable(); - if (CheckBox2->GetValue()){ - // Identify all mesh files for viewing - //struct _finddata_t fileinfo; - //long hFile; - //wxString meshFileName = "*.msh.vtk"; - wxString pattern = "*.msh.vtk"; + if (CheckBox2->GetValue()) + { + + wxString pattern (("*.msh.vtk")) ; - //wxString pattern((meshFileName)); wxString file; ComboBox1->Clear(); file = wxFindFirstFile(pattern); + while ( !file.empty()) { wxString meshfile = file; - size_t extindex = meshfile.find_first_of ("."); + size_t extindex = meshfile.find_last_of ("."); meshfile = meshfile.substr(0, extindex); + extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + meshfile = meshfile.substr(2,meshfile.length()); + ComboBox1->Append(meshfile); - } -// if (( hFile = _findfirst( pattern, &fileinfo )) != -1 ) -// { -// do -// { -// wxString meshfile = fileinfo.name; -// size_t extindex = meshfile.find_first_of ("."); -// -// meshfile = meshfile.substr(0, extindex); -// -// ComboBox1->Append(meshfile); -// -// } while ( _findnext( hFile, &fileinfo) == 0); -// } -// _findclose( hFile); + file = wxFindNextFile(); + } CheckBox3->Enable(); } @@ -511,6 +508,8 @@ void TWINAX::OnCheckBox1Click(wxCommandEvent& event) FD_ESR9 = winFD_ESR->TextCtrl9->GetValue(); FD_ESR10= winFD_ESR->TextCtrl10->GetValue(); + + FD_Default = winFD_ESR->CheckBox1->GetValue(); FD_ORDER = winFD_ESR->TextCtrl11->GetValue(); FD_lin = winFD_ESR->RadioButton1->GetValue(); FD_Fmin = winFD_ESR->TextCtrl12->GetValue(); @@ -769,7 +768,7 @@ void TWINAX::WriteCableFile (wxString fileName) cableFile << "1 # list of denominator coefficients b0 b1 b2... \n"; } - if (CheckBox1->GetValue()){ + if (!FD_Default){ cableFile << FD_ORDER <<"\t # order for filter fitting\n"; if (FD_lin) @@ -780,7 +779,7 @@ void TWINAX::WriteCableFile (wxString fileName) { cableFile << "log # frequency range type for filter fitting type (lin or dB)\n"; } - cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_ORDER <<"\t # fmin fmax number_of_frequencies for filter fitting"; + cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_Num <<"\t # fmin fmax number_of_frequencies for filter fitting\n"; } if (CheckBox2->GetValue()){ @@ -792,10 +791,12 @@ void TWINAX::WriteCableFile (wxString fileName) if (CheckBox3->GetValue()) { - cableFile << "Laplace_boundary_constant\n"; - cableFile << MESH_PARAM1 <<"\n"; + //cableFile << "Laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; cableFile << "Laplace_surface_mesh_constant\n"; cableFile << MESH_PARAM2 <<"\n"; + //cableFile << "max_mesh_edge_length\n"; + //cableFile << MESH_PARAM3 <<"\n"; CheckBox3 ->SetValue(false); } @@ -1135,11 +1136,14 @@ void TWINAX::OnCheckBox3Click(wxCommandEvent& event) MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + winMESH_PARAM->TextCtrl4->Disable(); if ( winMESH_PARAM->ShowModal() == wxID_OK ) { - MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); + //MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); + //MESH_PARAM3 = winMESH_PARAM->TextCtrl3->GetValue(); } winMESH_PARAM->Destroy(); } @@ -1171,3 +1175,10 @@ void TWINAX::OnCheckBox4Click(wxCommandEvent& event) } } + +void TWINAX::EditExistingCable() +{ + Close(); +} + + diff --git a/GUI/SW1/SRC/TWINAX.h b/GUI/SW1/SRC/TWINAX.h index fb2f4c2..b682a4d 100644 --- a/GUI/SW1/SRC/TWINAX.h +++ b/GUI/SW1/SRC/TWINAX.h @@ -85,6 +85,9 @@ class TWINAX: public wxDialog void WriteCableFile(wxString); + void EditExistingCable(); + bool EDIT_EXISTING; + void twinaxSchematic(); void OnHighlightSchematic(wxCommandEvent & event); @@ -98,6 +101,7 @@ class TWINAX: public wxDialog wxString FD_ESR8; wxString FD_ESR9; wxString FD_ESR10; + bool FD_Default; wxString FD_ORDER; bool FD_log; @@ -108,6 +112,8 @@ class TWINAX: public wxDialog wxString MESH_PARAM1; wxString MESH_PARAM2; + wxString MESH_PARAM3; + wxString MESH_PARAM4; //(*Declarations(TWINAX) wxStaticText* StaticText10; @@ -271,6 +277,7 @@ class TWINAX: public wxDialog void OnTextCtrl17Text(wxCommandEvent& event); void OnTextCtrl18Text(wxCommandEvent& event); void OnCheckBox4Click(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); //*) DECLARE_EVENT_TABLE() diff --git a/GUI/SW1/SRC/UTP.cpp b/GUI/SW1/SRC/UTP.cpp index 0a52c23..79a5a23 100644 --- a/GUI/SW1/SRC/UTP.cpp +++ b/GUI/SW1/SRC/UTP.cpp @@ -207,6 +207,7 @@ UTP::UTP(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size) Panel1->Connect(wxEVT_PAINT,(wxObjectEventFunction)&UTP::OnPanel1Paint,0,this); Panel1->Connect(wxEVT_LEFT_DCLICK,(wxObjectEventFunction)&UTP::OnPanel1LeftDClick,0,this); Panel1->Connect(wxEVT_MOUSEWHEEL,(wxObjectEventFunction)&UTP::OnPanel1MouseWheel,0,this); + Connect(wxEVT_PAINT,(wxObjectEventFunction)&UTP::OnPaint); //*) TextCtrl2->Bind(wxEVT_SET_FOCUS,(wxObjectEventFunction)&UTP::OnHighlightSchematic, this); @@ -228,6 +229,11 @@ UTP::~UTP() //*) } +void UTP::OnPaint(wxPaintEvent& event) +{ + if (EDIT_EXISTING==true) EditExistingCable(); +} + void UTP::SetPathToMOD(wxString Path, wxString Name) { pathToMOD << Path; @@ -293,6 +299,8 @@ void UTP::OnCheckBox1Click(wxCommandEvent& event) FD_ESR *winFD_ESR = new FD_ESR(this); + //winFD_ESR->formtype = 1; + if ( winFD_ESR->ShowModal() == wxID_OK ) { // FD_ESR1 = winFD_ESR->TextCtrl1->GetValue(); @@ -307,6 +315,8 @@ void UTP::OnCheckBox1Click(wxCommandEvent& event) FD_ESR9 = winFD_ESR->TextCtrl9->GetValue(); FD_ESR10= winFD_ESR->TextCtrl10->GetValue(); + FD_Default = winFD_ESR->CheckBox1->GetValue(); + FD_ORDER = winFD_ESR->TextCtrl11->GetValue(); FD_lin = winFD_ESR->RadioButton1->GetValue(); FD_Fmin = winFD_ESR->TextCtrl12->GetValue(); @@ -345,41 +355,32 @@ void UTP::OnButton2Click(wxCommandEvent& event) if (CheckBox2->GetValue()) { - // Identify all mesh files for viewing - //struct _finddata_t fileinfo; - //long hFile; - //wxString meshFileName = "*.msh.vtk"; - wxString pattern = "*.msh.vtk"; - //wxString pattern((meshFileName)); + + wxString pattern (("*.msh.vtk")) ; + wxString file; ComboBox1->Clear(); file = wxFindFirstFile(pattern); + while ( !file.empty()) { wxString meshfile = file; - size_t extindex = meshfile.find_first_of ("."); + size_t extindex = meshfile.find_last_of ("."); + + meshfile = meshfile.substr(0, extindex); + + extindex = meshfile.find_last_of ("."); meshfile = meshfile.substr(0, extindex); + meshfile = meshfile.substr(2,meshfile.length()); + ComboBox1->Append(meshfile); - } -// if (( hFile = _findfirst( pattern, &fileinfo )) != -1 ) -// { -// do -// { -// wxString meshfile = fileinfo.name; -// size_t extindex = meshfile.find_first_of ("."); -// -// meshfile = meshfile.substr(0, extindex); -// -// ComboBox1->Append(meshfile); -// -// } while ( _findnext( hFile, &fileinfo) == 0); -// } -// _findclose( hFile); + file = wxFindNextFile(); + } CheckBox3->Enable(); } @@ -524,18 +525,18 @@ void UTP::WriteCableFile (wxString fileName) } } - if (CheckBox1->GetValue()){ + if (!FD_Default){ cableFile << FD_ORDER <<"\t # order for filter fitting\n"; if (FD_lin) { - cableFile << "lin # frequency range type for filter fitting type (lin or dB)"; + cableFile << "lin # frequency range type for filter fitting type (lin or dB)\n"; } else { - cableFile << "log # frequency range type for filter fitting type (lin or dB)"; + cableFile << "log # frequency range type for filter fitting type (lin or dB)\n"; } - cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_ORDER <<"\t # fmin fmax number_of_frequencies for filter fitting"; + cableFile << FD_Fmin <<" "<< FD_Fmax <<" "<< FD_Num <<"\t # fmin fmax number_of_frequencies for filter fitting\n"; } if (CheckBox2->GetValue()) @@ -550,10 +551,12 @@ void UTP::WriteCableFile (wxString fileName) if (CheckBox3->GetValue()) { - cableFile << "Laplace_boundary_constant\n"; - cableFile << MESH_PARAM1 <<"\n"; - cableFile << "Laplace_surface_mesh_constant\n"; + //cableFile << "laplace_boundary_constant\n"; + //cableFile << MESH_PARAM1 <<"\n"; + cableFile << "laplace_surface_mesh_constant\n"; cableFile << MESH_PARAM2 <<"\n"; + //cableFile << "max_mesh_edge_length\n"; + //cableFile << MESH_PARAM3 <<"\n"; CheckBox3 ->SetValue(false); } @@ -721,10 +724,15 @@ void UTP::OnCheckBox3Click(wxCommandEvent& event) { MESH_PARAM *winMESH_PARAM = new MESH_PARAM(this); + winMESH_PARAM->TextCtrl1->Disable(); + winMESH_PARAM->TextCtrl3->Disable(); + winMESH_PARAM->TextCtrl4->Disable(); + if ( winMESH_PARAM->ShowModal() == wxID_OK ) { - MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); + //MESH_PARAM1 = winMESH_PARAM->TextCtrl1->GetValue(); MESH_PARAM2 = winMESH_PARAM->TextCtrl2->GetValue(); + //MESH_PARAM3 = winMESH_PARAM->TextCtrl3->GetValue(); } winMESH_PARAM->Destroy(); } @@ -746,3 +754,9 @@ void UTP::OnComboBox1Selected(wxCommandEvent& event) meshToView<GetValue(); draw_mesh(Panel1,meshToView); } + +void UTP::EditExistingCable() +{ + Close(); +} + diff --git a/GUI/SW1/SRC/UTP.h b/GUI/SW1/SRC/UTP.h index e5844c6..a0283d6 100644 --- a/GUI/SW1/SRC/UTP.h +++ b/GUI/SW1/SRC/UTP.h @@ -86,6 +86,9 @@ class UTP: public wxDialog void WriteCableFile(wxString); + void EditExistingCable(); + bool EDIT_EXISTING; + void utpSchematic(); void OnHighlightSchematic(wxCommandEvent & event); @@ -99,6 +102,7 @@ class UTP: public wxDialog wxString FD_ESR8; wxString FD_ESR9; wxString FD_ESR10; + bool FD_Default; wxString FD_ORDER; bool FD_log; @@ -109,6 +113,7 @@ class UTP: public wxDialog wxString MESH_PARAM1; wxString MESH_PARAM2; + wxString MESH_PARAM3; //(*Declarations(UTP) wxTextCtrl* TextCtrl4; @@ -199,6 +204,7 @@ class UTP: public wxDialog void OnCheckBox3Click(wxCommandEvent& event); void OnPanel1MouseWheel(wxMouseEvent& event); void OnComboBox1Selected(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); //*) DECLARE_EVENT_TABLE() -- libgit2 0.21.2