diff --git a/3d-viewer/3d_viewer/3d_toolbar.cpp b/3d-viewer/3d_viewer/3d_toolbar.cpp index d18c7f3b98..a6b5199bcd 100644 --- a/3d-viewer/3d_viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_viewer/3d_toolbar.cpp @@ -94,5 +94,10 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar() m_mainToolBar->AddScaledSeparator( this ); m_mainToolBar->Add( EDA_3D_ACTIONS::toggleOrtho, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->AddScaledSeparator( this ); + m_mainToolBar->Add( EDA_3D_ACTIONS::showTHT, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->Add( EDA_3D_ACTIONS::showSMD, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->Add( EDA_3D_ACTIONS::showVirtual, ACTION_TOOLBAR::TOGGLE ); + m_mainToolBar->KiRealize(); } diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp index 9edbd2dedd..b179953807 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp @@ -52,10 +52,6 @@ bool PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow() m_checkBoxBoardBody->SetValue( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) ); m_checkBoxAreas->SetValue( m_settings.GetFlag( FL_ZONE ) ); - m_checkBox3DshapesTH->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL ) ); - m_checkBox3DshapesSMD->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT ) ); - m_checkBox3DshapesVirtual->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_VIRTUAL ) ); - m_checkBoxSilkscreen->SetValue( m_settings.GetFlag( FL_SILKSCREEN ) ); m_checkBoxSolderMask->SetValue( m_settings.GetFlag( FL_SOLDERMASK ) ); m_checkBoxSolderpaste->SetValue( m_settings.GetFlag( FL_SOLDERPASTE ) ); @@ -109,11 +105,6 @@ bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow() case 2: m_settings.SetMaterialMode( MATERIAL_MODE::CAD_MODE ); break; } - // Set 3D shapes visibility - m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() ); - m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT, m_checkBox3DshapesSMD->GetValue() ); - m_settings.SetFlag( FL_FP_ATTRIBUTES_VIRTUAL, m_checkBox3DshapesVirtual->GetValue() ); - // Set Layer visibility m_settings.SetFlag( FL_SILKSCREEN, m_checkBoxSilkscreen->GetValue() ); m_settings.SetFlag( FL_SOLDERMASK, m_checkBoxSolderMask->GetValue() ); diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.cpp index 1b8729cd69..6c329a8204 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -17,21 +17,6 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxBoxSizer* bSizeLeft; bSizeLeft = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbModelVisibility; - sbModelVisibility = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("3D Model Visibility") ), wxVERTICAL ); - - m_checkBox3DshapesTH = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D through hole models"), wxDefaultPosition, wxDefaultSize, 0 ); - sbModelVisibility->Add( m_checkBox3DshapesTH, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - - m_checkBox3DshapesSMD = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D SMD models"), wxDefaultPosition, wxDefaultSize, 0 ); - sbModelVisibility->Add( m_checkBox3DshapesSMD, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - - m_checkBox3DshapesVirtual = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D virtual models"), wxDefaultPosition, wxDefaultSize, 0 ); - sbModelVisibility->Add( m_checkBox3DshapesVirtual, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - - - bSizeLeft->Add( sbModelVisibility, 0, wxEXPAND|wxALL, 5 ); - wxStaticBoxSizer* sbBoardLayers; sbBoardLayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Layers") ), wxVERTICAL ); diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.fbp b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.fbp index 28642ef7a7..93566d2992 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.fbp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.fbp @@ -14,7 +14,6 @@ panel_3D_display_options_base 1000 none - 1 panel_3D_display_options_base @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -65,212 +63,6 @@ bSizeLeft wxVERTICAL none - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - 3D Model Visibility - - sbModelVisibility - wxVERTICAL - 1 - none - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show 3D through hole models - - 0 - - - 0 - - 1 - m_checkBox3DshapesTH - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show 3D SMD models - - 0 - - - 0 - - 1 - m_checkBox3DshapesSMD - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show 3D virtual models - - 0 - - - 0 - - 1 - m_checkBox3DshapesVirtual - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 wxEXPAND|wxALL diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.h b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.h index 7eb0245fa0..5520ed159d 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.h +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -36,9 +36,6 @@ class PANEL_3D_DISPLAY_OPTIONS_BASE : public wxPanel private: protected: - wxCheckBox* m_checkBox3DshapesTH; - wxCheckBox* m_checkBox3DshapesSMD; - wxCheckBox* m_checkBox3DshapesVirtual; wxCheckBox* m_checkBoxSilkscreen; wxCheckBox* m_checkBoxSolderMask; wxCheckBox* m_checkBoxSolderpaste; diff --git a/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp index 191339b529..436550306c 100644 --- a/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp @@ -210,20 +210,20 @@ TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ", TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT", AS_ACTIVE, 'T', "", - _( "Toggle Through Hole 3D models" ), _( "Toggle 3D models with 'Through hole' attribute" ), - BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL ); + _( "Toggle Through Hole 3D models" ), _( "Toggle 3D models for 'Through hole' type components" ), + BITMAPS::show_tht, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL ); TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD", AS_ACTIVE, 'S', "", - _( "Toggle SMD 3D models" ), _( "Toggle 3D models with 'Surface mount' attribute" ), - BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL_INSERT ); + _( "Toggle SMD 3D models" ), _( "Toggle 3D models for 'Surface mount' type components" ), + BITMAPS::show_smt, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL_INSERT ); -TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesVirtual", +TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther", AS_ACTIVE, 'V', "", - _( "Toggle Virtual 3D models" ), _( "Toggle 3D models with 'Virtual' attribute" ), - BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_FP_ATTRIBUTES_VIRTUAL ); + _( "Toggle Other 3D models" ), _( "Toggle 3D models for 'Other' type components" ), + BITMAPS::show_other, AF_NONE, (void*) FL_FP_ATTRIBUTES_VIRTUAL ); TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( "3DViewer.Control.showBoundingBoxes", AS_GLOBAL, 0, "", diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 770c846979..3aedfce2dc 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -432,6 +432,9 @@ set( BMAPS_MID show_mod_edge show_ratsnest showtrack + show_other + show_tht + show_smt show_zone show_zone_disable show_zone_outline_only diff --git a/bitmaps_png/png/show_other_24.png b/bitmaps_png/png/show_other_24.png new file mode 100644 index 0000000000..413582b3df Binary files /dev/null and b/bitmaps_png/png/show_other_24.png differ diff --git a/bitmaps_png/png/show_other_dark_24.png b/bitmaps_png/png/show_other_dark_24.png new file mode 100644 index 0000000000..e7add8979a Binary files /dev/null and b/bitmaps_png/png/show_other_dark_24.png differ diff --git a/bitmaps_png/png/show_smt_24.png b/bitmaps_png/png/show_smt_24.png new file mode 100644 index 0000000000..bf7e85de02 Binary files /dev/null and b/bitmaps_png/png/show_smt_24.png differ diff --git a/bitmaps_png/png/show_smt_dark_24.png b/bitmaps_png/png/show_smt_dark_24.png new file mode 100644 index 0000000000..e0957675fc Binary files /dev/null and b/bitmaps_png/png/show_smt_dark_24.png differ diff --git a/bitmaps_png/png/show_tht_24.png b/bitmaps_png/png/show_tht_24.png new file mode 100644 index 0000000000..44ab4db36e Binary files /dev/null and b/bitmaps_png/png/show_tht_24.png differ diff --git a/bitmaps_png/png/show_tht_dark_24.png b/bitmaps_png/png/show_tht_dark_24.png new file mode 100644 index 0000000000..eb0b321cd3 Binary files /dev/null and b/bitmaps_png/png/show_tht_dark_24.png differ diff --git a/bitmaps_png/sources/dark/show_other.svg b/bitmaps_png/sources/dark/show_other.svg new file mode 100644 index 0000000000..decea482ea --- /dev/null +++ b/bitmaps_png/sources/dark/show_other.svg @@ -0,0 +1,97 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + diff --git a/bitmaps_png/sources/dark/show_smt.svg b/bitmaps_png/sources/dark/show_smt.svg new file mode 100644 index 0000000000..122ebf4e55 --- /dev/null +++ b/bitmaps_png/sources/dark/show_smt.svg @@ -0,0 +1,112 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + + + diff --git a/bitmaps_png/sources/dark/show_tht.svg b/bitmaps_png/sources/dark/show_tht.svg new file mode 100644 index 0000000000..a409c91b15 --- /dev/null +++ b/bitmaps_png/sources/dark/show_tht.svg @@ -0,0 +1,139 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + + + + + + + diff --git a/bitmaps_png/sources/light/show_other.svg b/bitmaps_png/sources/light/show_other.svg new file mode 100644 index 0000000000..04e79d8b41 --- /dev/null +++ b/bitmaps_png/sources/light/show_other.svg @@ -0,0 +1,97 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + diff --git a/bitmaps_png/sources/light/show_smt.svg b/bitmaps_png/sources/light/show_smt.svg new file mode 100644 index 0000000000..435386a1f3 --- /dev/null +++ b/bitmaps_png/sources/light/show_smt.svg @@ -0,0 +1,112 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + + + diff --git a/bitmaps_png/sources/light/show_tht.svg b/bitmaps_png/sources/light/show_tht.svg new file mode 100644 index 0000000000..afdf646ffb --- /dev/null +++ b/bitmaps_png/sources/light/show_tht.svg @@ -0,0 +1,133 @@ + + + + + + + + + + image/svg+xml + + show_tht + + + + + + + + + + + + + + + show_tht + + + + + + + + + diff --git a/include/bitmaps/bitmap_info.h b/include/bitmaps/bitmap_info.h index e7ca3bbddb..5fdaf1f8fb 100644 --- a/include/bitmaps/bitmap_info.h +++ b/include/bitmaps/bitmap_info.h @@ -449,6 +449,9 @@ const std::vector g_BitmapInfo = { { BITMAPS::show_mod_edge, wxT( "show_mod_edge_24.png" ), 24, wxT( "light" ) }, { BITMAPS::show_ratsnest, wxT( "show_ratsnest_24.png" ), 24, wxT( "light" ) }, { BITMAPS::showtrack, wxT( "showtrack_24.png" ), 24, wxT( "light" ) }, + { BITMAPS::show_other, wxT( "show_other_24.png" ), 24, wxT( "light" ) }, + { BITMAPS::show_tht, wxT( "show_tht_24.png" ), 24, wxT( "light" ) }, + { BITMAPS::show_smt, wxT( "show_smt_24.png" ), 24, wxT( "light" ) }, { BITMAPS::show_zone, wxT( "show_zone_24.png" ), 24, wxT( "light" ) }, { BITMAPS::show_zone_disable, wxT( "show_zone_disable_24.png" ), 24, wxT( "light" ) }, { BITMAPS::show_zone_outline_only, wxT( "show_zone_outline_only_24.png" ), 24, wxT( "light" ) }, @@ -811,6 +814,9 @@ const std::vector g_BitmapInfo = { { BITMAPS::show_mod_edge, wxT( "show_mod_edge_dark_24.png" ), 24, wxT( "dark" ) }, { BITMAPS::show_ratsnest, wxT( "show_ratsnest_dark_24.png" ), 24, wxT( "dark" ) }, { BITMAPS::showtrack, wxT( "showtrack_dark_24.png" ), 24, wxT( "dark" ) }, + { BITMAPS::show_other, wxT( "show_other_dark_24.png" ), 24, wxT( "dark" ) }, + { BITMAPS::show_tht, wxT( "show_tht_dark_24.png" ), 24, wxT( "dark" ) }, + { BITMAPS::show_smt, wxT( "show_smt_dark_24.png" ), 24, wxT( "dark" ) }, { BITMAPS::show_zone, wxT( "show_zone_dark_24.png" ), 24, wxT( "dark" ) }, { BITMAPS::show_zone_disable, wxT( "show_zone_disable_dark_24.png" ), 24, wxT( "dark" ) }, { BITMAPS::show_zone_outline_only, wxT( "show_zone_outline_only_dark_24.png" ), 24, wxT( "dark" ) }, diff --git a/include/bitmaps/bitmaps_list.h b/include/bitmaps/bitmaps_list.h index 3462f772ca..5c299f9e44 100644 --- a/include/bitmaps/bitmaps_list.h +++ b/include/bitmaps/bitmaps_list.h @@ -488,6 +488,9 @@ enum class BITMAPS : unsigned int show_no_copper_layers, show_no_layers, show_ratsnest, + show_other, + show_tht, + show_smt, show_zone, show_zone_disable, show_zone_outline_only,