From 4c61a79e47aee2110e5cb7e892fb5420cb95f23a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Feb 2024 11:34:27 +0100 Subject: [PATCH] 3D viewer: show "not covered by solder mask" graphic items with the right color. Previously, only pads and tracks were using the gold color when not covered by the solder mask layer. Fixes #16892 https://gitlab.com/kicad/code/kicad/-/issues/16892 --- 3d-viewer/3d_canvas/create_layer_items.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index 17de5fa5fb..94f52df48c 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2015-2016 Mario Luzeiro * Copyright (C) 2023 CERN - * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -635,6 +635,17 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) item->Type() ); break; } + + // add also this shape to the plated copper polygon list if required + if( cfg.differentiate_plated_copper ) + { + if( layer == F_Cu ) + item->TransformShapeToPolygon( *m_frontPlatedCopperPolys, F_Cu, + 0, maxError, ERROR_INSIDE ); + else if( layer == B_Cu ) + item->TransformShapeToPolygon( *m_backPlatedCopperPolys, B_Cu, + 0, maxError, ERROR_INSIDE ); + } } }