diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index 15ffe9b5fa..aafa4f3caf 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -64,7 +64,10 @@ void BOARD_ADAPTER::destroyLayers() } delete m_F_Cu_PlatedPads_poly; + m_F_Cu_PlatedPads_poly = nullptr; + delete m_B_Cu_PlatedPads_poly; + m_B_Cu_PlatedPads_poly = nullptr; if( !m_layers_inner_holes_poly.empty() ) { @@ -91,7 +94,10 @@ void BOARD_ADAPTER::destroyLayers() } delete m_platedpads_container2D_F_Cu; + m_platedpads_container2D_F_Cu = nullptr; + delete m_platedpads_container2D_B_Cu; + m_platedpads_container2D_B_Cu = nullptr; if( !m_layers_holes2D.empty() ) { @@ -203,11 +209,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) } } - m_F_Cu_PlatedPads_poly = new SHAPE_POLY_SET; - m_B_Cu_PlatedPads_poly = new SHAPE_POLY_SET; + if( GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) + { + m_F_Cu_PlatedPads_poly = new SHAPE_POLY_SET; + m_B_Cu_PlatedPads_poly = new SHAPE_POLY_SET; - m_platedpads_container2D_F_Cu = new CBVHCONTAINER2D; - m_platedpads_container2D_B_Cu = new CBVHCONTAINER2D; + m_platedpads_container2D_F_Cu = new CBVHCONTAINER2D; + m_platedpads_container2D_B_Cu = new CBVHCONTAINER2D; + + } if( aStatusReporter ) aStatusReporter->Report( _( "Create tracks and vias" ) ); @@ -508,6 +518,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) } } + const bool renderPlatedPadsAsPlated = GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ); + // Add modules PADs objects to containers for( PCB_LAYER_ID curr_layer_id : layer_id ) { @@ -525,7 +537,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) curr_layer_id, 0, true, - true, + renderPlatedPadsAsPlated, false ); // Micro-wave modules may have items on copper layers @@ -536,24 +548,27 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) } } - // ADD PLATED PADS - for( MODULE* module : m_board->Modules() ) + if( renderPlatedPadsAsPlated ) { - AddPadsShapesWithClearanceToContainer( module, - m_platedpads_container2D_F_Cu, - F_Cu, - 0, - true, - false, - true ); + // ADD PLATED PADS + for( MODULE* module : m_board->Modules() ) + { + AddPadsShapesWithClearanceToContainer( module, + m_platedpads_container2D_F_Cu, + F_Cu, + 0, + true, + false, + true ); - AddPadsShapesWithClearanceToContainer( module, - m_platedpads_container2D_B_Cu, - B_Cu, - 0, - true, - false, - true ); + AddPadsShapesWithClearanceToContainer( module, + m_platedpads_container2D_B_Cu, + B_Cu, + 0, + true, + false, + true ); + } } // Add modules PADs poly contourns (vertical outlines) @@ -573,26 +588,30 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) // has same shape as its hole module->TransformPadsShapesWithClearanceToPolygon( curr_layer_id, *layerPoly, 0, ARC_HIGH_DEF, true, - true, false ); + renderPlatedPadsAsPlated, + false ); transformGraphicModuleEdgeToPolygonSet( module, curr_layer_id, *layerPoly ); } } - // ADD PLATED PADS contourns - for( auto module : m_board->Modules() ) + if( renderPlatedPadsAsPlated ) { - module->TransformPadsShapesWithClearanceToPolygon( F_Cu, *m_F_Cu_PlatedPads_poly, - 0, ARC_HIGH_DEF, true, - false, true ); + // ADD PLATED PADS contourns + for( auto module : m_board->Modules() ) + { + module->TransformPadsShapesWithClearanceToPolygon( F_Cu, *m_F_Cu_PlatedPads_poly, + 0, ARC_HIGH_DEF, true, + false, true ); - //transformGraphicModuleEdgeToPolygonSet( module, F_Cu, *m_F_Cu_PlatedPads_poly ); + //transformGraphicModuleEdgeToPolygonSet( module, F_Cu, *m_F_Cu_PlatedPads_poly ); - module->TransformPadsShapesWithClearanceToPolygon( B_Cu, *m_B_Cu_PlatedPads_poly, - 0, ARC_HIGH_DEF, true, - false, true ); + module->TransformPadsShapesWithClearanceToPolygon( B_Cu, *m_B_Cu_PlatedPads_poly, + 0, ARC_HIGH_DEF, true, + false, true ); - //transformGraphicModuleEdgeToPolygonSet( module, B_Cu, *m_B_Cu_PlatedPads_poly ); + //transformGraphicModuleEdgeToPolygonSet( module, B_Cu, *m_B_Cu_PlatedPads_poly ); + } } } @@ -761,50 +780,60 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) if( GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) && ( m_render_engine == RENDER_ENGINE::OPENGL_LEGACY ) ) { - if( m_F_Cu_PlatedPads_poly && ( m_layers_poly.find( F_Cu ) != m_layers_poly.end() ) ) + if( GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) { - SHAPE_POLY_SET *layerPoly_F_Cu = m_layers_poly[F_Cu]; - layerPoly_F_Cu->BooleanSubtract( *m_F_Cu_PlatedPads_poly, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST ); + if( m_F_Cu_PlatedPads_poly && ( m_layers_poly.find( F_Cu ) != m_layers_poly.end() ) ) + { + SHAPE_POLY_SET *layerPoly_F_Cu = m_layers_poly[F_Cu]; + layerPoly_F_Cu->BooleanSubtract( *m_F_Cu_PlatedPads_poly, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST ); - m_F_Cu_PlatedPads_poly->Simplify( SHAPE_POLY_SET::PM_FAST ); - } - - if( m_B_Cu_PlatedPads_poly && ( m_layers_poly.find( B_Cu ) != m_layers_poly.end() ) ) - { - SHAPE_POLY_SET *layerPoly_B_Cu = m_layers_poly[B_Cu]; - layerPoly_B_Cu->BooleanSubtract( *m_B_Cu_PlatedPads_poly, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST ); - - m_B_Cu_PlatedPads_poly->Simplify( SHAPE_POLY_SET::PM_FAST ); + m_F_Cu_PlatedPads_poly->Simplify( SHAPE_POLY_SET::PM_FAST ); + } + + if( m_B_Cu_PlatedPads_poly && ( m_layers_poly.find( B_Cu ) != m_layers_poly.end() ) ) + { + SHAPE_POLY_SET *layerPoly_B_Cu = m_layers_poly[B_Cu]; + layerPoly_B_Cu->BooleanSubtract( *m_B_Cu_PlatedPads_poly, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST ); + + m_B_Cu_PlatedPads_poly->Simplify( SHAPE_POLY_SET::PM_FAST ); + } } + std::vector< PCB_LAYER_ID > &selected_layer_id = layer_id; std::vector< PCB_LAYER_ID > layer_id_without_F_and_B; - layer_id_without_F_and_B.clear(); - layer_id_without_F_and_B.reserve( layer_id.size() ); - for( size_t i = 0; i < layer_id.size(); ++i ) + if( GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) { - if( ( layer_id[i] != F_Cu ) && - ( layer_id[i] != B_Cu ) ) - layer_id_without_F_and_B.push_back( layer_id[i] ); + layer_id_without_F_and_B.clear(); + layer_id_without_F_and_B.reserve( layer_id.size() ); + + for( size_t i = 0; i < layer_id.size(); ++i ) + { + if( ( layer_id[i] != F_Cu ) && + ( layer_id[i] != B_Cu ) ) + layer_id_without_F_and_B.push_back( layer_id[i] ); + } + + selected_layer_id = layer_id_without_F_and_B; } - if( layer_id_without_F_and_B.size() > 0 ) + if( selected_layer_id.size() > 0 ) { std::atomic nextItem( 0 ); std::atomic threadsFinished( 0 ); size_t parallelThreadCount = std::min( std::max( std::thread::hardware_concurrency(), 2 ), - layer_id_without_F_and_B.size() ); + selected_layer_id.size() ); for( size_t ii = 0; ii < parallelThreadCount; ++ii ) { - std::thread t = std::thread( [&nextItem, &threadsFinished, &layer_id_without_F_and_B, this]() + std::thread t = std::thread( [&nextItem, &threadsFinished, &selected_layer_id, this]() { for( size_t i = nextItem.fetch_add( 1 ); - i < layer_id_without_F_and_B.size(); + i < selected_layer_id.size(); i = nextItem.fetch_add( 1 ) ) { - auto layerPoly = m_layers_poly.find( layer_id_without_F_and_B[i] ); + auto layerPoly = m_layers_poly.find( selected_layer_id[i] ); if( layerPoly != m_layers_poly.end() ) // This will make a union of all added contours diff --git a/3d-viewer/3d_enums.h b/3d-viewer/3d_enums.h index 3ebae418b8..4287821848 100644 --- a/3d-viewer/3d_enums.h +++ b/3d-viewer/3d_enums.h @@ -51,6 +51,7 @@ enum DISPLAY3D_FLG FL_USE_REALISTIC_MODE, FL_SUBTRACT_MASK_FROM_SILK, FL_CLIP_SILK_ON_VIA_ANNULUS, + FL_RENDER_PLATED_PADS_AS_PLATED, // OpenGL options FL_RENDER_OPENGL_SHOW_MODEL_BBOX, diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp index 291f9cc4ec..ddd7bc2510 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp @@ -622,10 +622,13 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER* aStatusReporter, REPORTER* aWarnin }// for each layer on - m_ogl_disp_lists_platedPads_F_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Front(), - m_boardAdapter.GetPolyPlatedPads_Front(), F_Cu ); - m_ogl_disp_lists_platedPads_B_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Back(), - m_boardAdapter.GetPolyPlatedPads_Back(), B_Cu ); + if( m_boardAdapter.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) + { + m_ogl_disp_lists_platedPads_F_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Front(), + m_boardAdapter.GetPolyPlatedPads_Front(), F_Cu ); + m_ogl_disp_lists_platedPads_B_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Back(), + m_boardAdapter.GetPolyPlatedPads_Back(), B_Cu ); + } // Load 3D models // ///////////////////////////////////////////////////////////////////////// diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp index 6a408b7b53..4251e554b1 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp @@ -733,7 +733,11 @@ bool C3D_RENDER_OGL_LEGACY::Redraw( if( (layer_id >= F_Cu) && (layer_id <= B_Cu) ) { - setCopperMaterial(); + if( !m_boardAdapter.GetFlag( FL_USE_REALISTIC_MODE ) || + !m_boardAdapter.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) + set_layer_material( layer_id ); + else + setCopperMaterial(); if( skipRenderHoles ) { @@ -1082,7 +1086,11 @@ void C3D_RENDER_OGL_LEGACY::ogl_free_all_display_lists() m_ogl_disp_lists_layers.clear(); delete m_ogl_disp_lists_platedPads_F_Cu; + m_ogl_disp_lists_platedPads_F_Cu = nullptr; + delete m_ogl_disp_lists_platedPads_B_Cu; + m_ogl_disp_lists_platedPads_B_Cu = nullptr; + for( MAP_OGL_DISP_LISTS::const_iterator ii = m_ogl_disp_lists_layers_holes_outer.begin(); ii != m_ogl_disp_lists_layers_holes_outer.end(); diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp index e0dfcab8d9..6a83ebff42 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp @@ -703,18 +703,20 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER* aStatusReporter, REPORTER* aWarnin }// for each layer on map // Create plated copper - - SFVEC3F layerColor_F_Cu = m_boardAdapter.GetLayerColor( F_Cu ); - SFVEC3F layerColor_B_Cu = m_boardAdapter.GetLayerColor( B_Cu ); - - if( m_boardAdapter.GetFlag( FL_USE_REALISTIC_MODE ) ) + if( m_boardAdapter.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ) { - layerColor_F_Cu = m_boardAdapter.m_CopperColor;; - layerColor_B_Cu = layerColor_F_Cu; - } + SFVEC3F layerColor_F_Cu = m_boardAdapter.GetLayerColor( F_Cu ); + SFVEC3F layerColor_B_Cu = m_boardAdapter.GetLayerColor( B_Cu ); - createItemsFromContainer( m_boardAdapter.GetPlatedPads_Front(), F_Cu, &m_materials.m_Copper, layerColor_F_Cu, +m_boardAdapter.GetCopperThickness3DU() * 0.1f ); - createItemsFromContainer( m_boardAdapter.GetPlatedPads_Back(), B_Cu, &m_materials.m_Copper, layerColor_B_Cu, -m_boardAdapter.GetCopperThickness3DU() * 0.1f ); + if( m_boardAdapter.GetFlag( FL_USE_REALISTIC_MODE ) ) + { + layerColor_F_Cu = m_boardAdapter.m_CopperColor; + layerColor_B_Cu = layerColor_F_Cu; + } + + createItemsFromContainer( m_boardAdapter.GetPlatedPads_Front(), F_Cu, &m_materials.m_Copper, layerColor_F_Cu, +m_boardAdapter.GetCopperThickness3DU() * 0.1f ); + createItemsFromContainer( m_boardAdapter.GetPlatedPads_Back(), B_Cu, &m_materials.m_Copper, layerColor_B_Cu, -m_boardAdapter.GetCopperThickness3DU() * 0.1f ); + } // Add Mask layer // Solder mask layers are "negative" layers so the elements that we have diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.cpp b/3d-viewer/3d_viewer/3d_viewer_settings.cpp index 872d3c1a80..7d98ba4c2c 100644 --- a/3d-viewer/3d_viewer/3d_viewer_settings.cpp +++ b/3d-viewer/3d_viewer/3d_viewer_settings.cpp @@ -179,7 +179,8 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() &m_Render.subtract_mask_from_silk, false ) ); m_params.emplace_back( new PARAM( "render.clip_silk_on_via_annulus", &m_Render.clip_silk_on_via_annulus, false ) ); - + m_params.emplace_back( new PARAM( "render.plated_and_bare_copper", + &m_Render.renderPlatedPadsAsPlated, false ) ); m_params.emplace_back( new PARAM( "camera.animation_enabled", &m_Camera.animation_enabled, true ) ); m_params.emplace_back( new PARAM( "camera.moving_speed_multiplier", diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.h b/3d-viewer/3d_viewer/3d_viewer_settings.h index 966ee699d3..b63e0ec1ec 100644 --- a/3d-viewer/3d_viewer/3d_viewer_settings.h +++ b/3d-viewer/3d_viewer/3d_viewer_settings.h @@ -82,6 +82,7 @@ public: bool show_zones; bool subtract_mask_from_silk; bool clip_silk_on_via_annulus; + bool renderPlatedPadsAsPlated; }; struct CAMERA_SETTINGS diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp index 9e0816e964..70e673859b 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp @@ -198,6 +198,7 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow() m_checkBoxECO->SetValue( m_settings.GetFlag( FL_ECO ) ); m_checkBoxSubtractMaskFromSilk->SetValue( m_settings.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) ); m_checkBoxClipSilkOnViaAnnulus->SetValue( m_settings.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) ); + m_checkBoxRenderPlatedPadsAsPlated->SetValue( m_settings.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) ); // OpenGL options m_checkBoxCuThickness->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) ); @@ -253,6 +254,7 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow() m_settings.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() ); m_settings.SetFlag( FL_SUBTRACT_MASK_FROM_SILK, m_checkBoxSubtractMaskFromSilk->GetValue() ); m_settings.SetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS, m_checkBoxClipSilkOnViaAnnulus->GetValue() ); + m_settings.SetFlag( FL_RENDER_PLATED_PADS_AS_PLATED, m_checkBoxRenderPlatedPadsAsPlated->GetValue() ); // Set 3D shapes visibility m_settings.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() ); diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp index bc5c14d551..e76526bd95 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp @@ -77,13 +77,16 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Clip silkscreen at via annulus"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizerRenderOptions->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxALL, 5 ); - wxFlexGridSizer* fgSizer3; - fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer3->SetFlexibleDirection( wxBOTH ); - fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + fgSizerRenderOptions->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerRenderOptions->Add( fgSizer3, 1, wxEXPAND, 5 ); + fgSizerRenderOptions->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Non plated pads copper as bare copper"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxRenderPlatedPadsAsPlated->SetToolTip( _("Display plated pads as plated but other copper as raw copper material. (Slow)") ); + + fgSizerRenderOptions->Add( m_checkBoxRenderPlatedPadsAsPlated, 0, wxALL, 5 ); sbSizer1->Add( fgSizerRenderOptions, 0, wxEXPAND|wxBOTTOM, 5 ); diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp index 9e17ec2949..d7c7e3c402 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp @@ -186,11 +186,11 @@ bSizeLeft wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Render Options @@ -198,11 +198,11 @@ wxVERTICAL 1 none - + 5 wxEXPAND|wxBOTTOM 0 - + 3 wxBOTH @@ -875,22 +875,88 @@ - + 5 wxEXPAND 1 - - 2 - wxBOTH - - - 0 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Non plated pads copper as bare copper + + 0 + + + 0 - fgSizer3 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 + 1 + m_checkBoxRenderPlatedPadsAsPlated + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Display plated pads as plated but other copper as raw copper material. (Slow) + + wxFILTER_NONE + wxDefaultValidator + + + + diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h index 45004f0b4a..3fd51c8f04 100644 --- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h +++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.h @@ -57,6 +57,7 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM wxCheckBox* m_checkBoxSubtractMaskFromSilk; wxStaticBitmap* m_bitmapClipSilkOnViaAnnulus; wxCheckBox* m_checkBoxClipSilkOnViaAnnulus; + wxCheckBox* m_checkBoxRenderPlatedPadsAsPlated; wxStaticBitmap* m_bitmap3DshapesTH; wxCheckBox* m_checkBox3DshapesTH; wxStaticBitmap* m_bitmap3DshapesSMD; diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index 4ed792d7bb..ec0e385fd9 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -528,6 +528,7 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg ) TRANSFER_SETTING( FL_ECO, show_eco ); TRANSFER_SETTING( FL_SHOW_BOARD_BODY, show_board_body ); TRANSFER_SETTING( FL_CLIP_SILK_ON_VIA_ANNULUS, clip_silk_on_via_annulus ); + TRANSFER_SETTING( FL_RENDER_PLATED_PADS_AS_PLATED, renderPlatedPadsAsPlated ); m_boardAdapter.GridSet( static_cast( cfg->m_Render.grid_type ) ); m_boardAdapter.AntiAliasingSet( static_cast( cfg->m_Render.opengl_AA_mode ) ); @@ -676,6 +677,7 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg ) TRANSFER_SETTING( show_axis, FL_AXIS ); TRANSFER_SETTING( show_board_body, FL_SHOW_BOARD_BODY ); TRANSFER_SETTING( clip_silk_on_via_annulus, FL_CLIP_SILK_ON_VIA_ANNULUS ); + TRANSFER_SETTING( renderPlatedPadsAsPlated, FL_RENDER_PLATED_PADS_AS_PLATED ); TRANSFER_SETTING( show_comments, FL_COMMENTS ); TRANSFER_SETTING( show_eco, FL_ECO ); TRANSFER_SETTING( show_footprints_insert, FL_MODULE_ATTRIBUTES_NORMAL_INSERT );