Browse Source

Make sure a pad is at least as big as its hole in the RTree.

Fixes https://gitlab.com/kicad/code/kicad/issues/9516
6.0.7
Jeff Young 4 years ago
parent
commit
ffd1139cfe
  1. 13
      pcbnew/drc/drc_rtree.h

13
pcbnew/drc/drc_rtree.h

@ -27,6 +27,7 @@
#include <eda_rect.h>
#include <board_item.h>
#include <pad.h>
#include <fp_text.h>
#include <memory>
#include <unordered_set>
@ -35,6 +36,7 @@
#include <geometry/rtree.h>
#include <geometry/shape.h>
#include <geometry/shape_segment.h>
#include <math/vector2d.h>
/**
@ -99,6 +101,17 @@ public:
else
subshapes.push_back( shape.get() );
if( aItem->Type() == PCB_PAD_T )
{
PAD* pad = static_cast<PAD*>( aItem );
if( pad->GetDrillSizeX() )
{
const SHAPE* hole = pad->GetEffectiveHoleShape();
subshapes.push_back( const_cast<SHAPE*>( hole ) );
}
}
for( SHAPE* subshape : subshapes )
{
BOX2I bbox = subshape->BBox();

Loading…
Cancel
Save