From ffd1139cfe2d69cb997841470ad77b48dd9620f7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 3 Nov 2021 18:52:41 +0000 Subject: [PATCH] Make sure a pad is at least as big as its hole in the RTree. Fixes https://gitlab.com/kicad/code/kicad/issues/9516 --- pcbnew/drc/drc_rtree.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pcbnew/drc/drc_rtree.h b/pcbnew/drc/drc_rtree.h index c357fde0f2..fe853b5429 100644 --- a/pcbnew/drc/drc_rtree.h +++ b/pcbnew/drc/drc_rtree.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -35,6 +36,7 @@ #include #include +#include #include /** @@ -99,6 +101,17 @@ public: else subshapes.push_back( shape.get() ); + if( aItem->Type() == PCB_PAD_T ) + { + PAD* pad = static_cast( aItem ); + + if( pad->GetDrillSizeX() ) + { + const SHAPE* hole = pad->GetEffectiveHoleShape(); + subshapes.push_back( const_cast( hole ) ); + } + } + for( SHAPE* subshape : subshapes ) { BOX2I bbox = subshape->BBox();