Correct is-inside logic.

Fixes https://gitlab.com/kicad/code/kicad/issues/13259
This commit is contained in:
Jeff Young 2022-12-27 14:34:08 +00:00
parent 572c10b2c4
commit c85590a470
1 changed files with 6 additions and 1 deletions

View File

@ -706,10 +706,15 @@ bool BuildBoardPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, int aE
for( int ii = 0; ii < fpHoles.OutlineCount(); ++ii )
{
const VECTOR2I holePt = fpHoles.Outline( ii ).CPoint( 0 );
for( int jj = 0; jj < aOutlines.OutlineCount(); ++jj )
{
if( aOutlines.Outline( jj ).Intersects( fpHoles.Outline( ii ) ) )
if( aOutlines.Outline( jj ).PointInside( holePt ) )
{
aOutlines.AddHole( fpHoles.Outline( ii ), jj );
break;
}
}
}