From 17cac94c6ae9e49ce351bc09f9d59a90a167e164 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 22 Feb 2025 13:35:14 +0000 Subject: [PATCH] Make sure drill layer pairs are created in odb++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #20039 (cherry picked from commit 255f4aee760ba353411da1e129bedca3586b4624) Co-authored-by: Daniel Treffenstädt --- pcbnew/pcb_io/odbpp/odb_entity.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pcbnew/pcb_io/odbpp/odb_entity.cpp b/pcbnew/pcb_io/odbpp/odb_entity.cpp index fb70631445..0492072852 100644 --- a/pcbnew/pcb_io/odbpp/odb_entity.cpp +++ b/pcbnew/pcb_io/odbpp/odb_entity.cpp @@ -347,20 +347,17 @@ void ODB_MATRIX_ENTITY::AddDrillMatrixLayer() std::make_pair( PCB_LAYER_ID::UNDEFINED_LAYER, matrix.m_layerName ) ); }; - if( drill_layers.find( std::make_pair( F_Cu, B_Cu ) ) != drill_layers.end() - || !slot_holes.empty() ) - { - // for pad has hole - if( has_pth_layer ) - InitDrillMatrix( "plated", std::make_pair( F_Cu, B_Cu ) ); - if( has_npth_layer ) - InitDrillMatrix( "non-plated", std::make_pair( F_Cu, B_Cu ) ); - } + if( has_npth_layer ) + InitDrillMatrix( "non-plated", std::make_pair( F_Cu, B_Cu ) ); + // at least one non plated hole is present. + + if( has_pth_layer && drill_layers.find( std::make_pair( F_Cu, B_Cu ) ) == drill_layers.end() ) + InitDrillMatrix( "plated", std::make_pair( F_Cu, B_Cu ) ); + // there is no circular plated dril hole present. for( const auto& [layer_pair, vec] : drill_layers ) { - if( layer_pair != std::make_pair( F_Cu, B_Cu ) ) // pad has initialized above - InitDrillMatrix( "plated", layer_pair ); // for via + InitDrillMatrix( "plated", layer_pair ); } }