From 86eaa3de357e950ffe1c56eee744ba37b768efc5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 5 Aug 2023 10:40:35 +0200 Subject: [PATCH] Pcbnew plot: do not plot via hole on layers where the via does not exist: buried vias are not on all copper layers. their hole is also not on all copper layer Fixes #15355 https://gitlab.com/kicad/code/kicad/-/issues/15355 --- pcbnew/plot_brditems_plotter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 9fbf40bbfc..c530a7981e 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -931,6 +931,10 @@ void BRDITEMS_PLOTTER::PlotDrillMarks() { const PCB_VIA* via = static_cast( track ); + // Via are not always on all layers + if( ( via->GetLayerSet() & m_layerMask ).none() ) + continue; + plotOneDrillMark( PAD_DRILL_SHAPE_CIRCLE, via->GetStart(), VECTOR2I( via->GetDrillValue(), 0 ), VECTOR2I( via->GetWidth(), 0 ), ANGLE_0, smallDrill );