Allow selection of NPTH pads with zero copper size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9249
This commit is contained in:
Jon Evans 2021-09-26 18:17:50 -04:00
parent 422def1261
commit e2368b733c
2 changed files with 5 additions and 0 deletions

View File

@ -1478,6 +1478,9 @@ bool SHAPE_POLY_SET::Collide( const SEG& aSeg, int aClearance, int* aActual,
bool SHAPE_POLY_SET::Collide( const VECTOR2I& aP, int aClearance, int* aActual, bool SHAPE_POLY_SET::Collide( const VECTOR2I& aP, int aClearance, int* aActual,
VECTOR2I* aLocation ) const VECTOR2I* aLocation ) const
{ {
if( IsEmpty() || VertexCount() == 0 )
return false;
VECTOR2I nearest; VECTOR2I nearest;
ecoord dist_sq = SquaredDistance( aP, aLocation ? &nearest : nullptr ); ecoord dist_sq = SquaredDistance( aP, aLocation ? &nearest : nullptr );

View File

@ -854,6 +854,8 @@ SHAPE_POLY_SET FOOTPRINT::GetBoundingHull() const
{ {
pad->TransformShapeWithClearanceToPolygon( rawPolys, UNDEFINED_LAYER, 0, ARC_LOW_DEF, pad->TransformShapeWithClearanceToPolygon( rawPolys, UNDEFINED_LAYER, 0, ARC_LOW_DEF,
ERROR_OUTSIDE ); ERROR_OUTSIDE );
// In case hole is larger than pad
pad->TransformHoleWithClearanceToPolygon( rawPolys, 0, ARC_LOW_DEF, ERROR_OUTSIDE );
} }
for( FP_ZONE* zone : m_fp_zones ) for( FP_ZONE* zone : m_fp_zones )