Make sure a pad is at least as big as its hole in the RTree.
Fixes https://gitlab.com/kicad/code/kicad/issues/9516
This commit is contained in:
parent
2b5ea7812f
commit
ffd1139cfe
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <eda_rect.h>
|
#include <eda_rect.h>
|
||||||
#include <board_item.h>
|
#include <board_item.h>
|
||||||
|
#include <pad.h>
|
||||||
#include <fp_text.h>
|
#include <fp_text.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
|
|
||||||
#include <geometry/rtree.h>
|
#include <geometry/rtree.h>
|
||||||
#include <geometry/shape.h>
|
#include <geometry/shape.h>
|
||||||
|
#include <geometry/shape_segment.h>
|
||||||
#include <math/vector2d.h>
|
#include <math/vector2d.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,6 +101,17 @@ public:
|
||||||
else
|
else
|
||||||
subshapes.push_back( shape.get() );
|
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 )
|
for( SHAPE* subshape : subshapes )
|
||||||
{
|
{
|
||||||
BOX2I bbox = subshape->BBox();
|
BOX2I bbox = subshape->BBox();
|
||||||
|
|
Loading…
Reference in New Issue