Handle keepout areas with holes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12581
This commit is contained in:
parent
cd191ed25d
commit
6927e75eae
|
@ -122,11 +122,11 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run()
|
||||||
|
|
||||||
if( copperZone->IsFilled() && areaBBox.Intersects( copperBBox ) )
|
if( copperZone->IsFilled() && areaBBox.Intersects( copperBBox ) )
|
||||||
{
|
{
|
||||||
// Collisions include touching, so we need to deflate outline by
|
// Collisions include touching, so we need to deflate outline by enough to
|
||||||
// enough to exclude it. This is particularly important for detecting
|
// exclude it. This is particularly important for detecting copper fills as
|
||||||
// copper fills as they will be exactly touching along the entire
|
// they will be exactly touching along the entire exclusion border.
|
||||||
// exclusion border.
|
|
||||||
SHAPE_POLY_SET areaPoly = ruleArea->Outline()->CloneDropTriangulation();
|
SHAPE_POLY_SET areaPoly = ruleArea->Outline()->CloneDropTriangulation();
|
||||||
|
areaPoly.Fracture( SHAPE_POLY_SET::PM_FAST );
|
||||||
areaPoly.Deflate( epsilon, 0, SHAPE_POLY_SET::ALLOW_ACUTE_CORNERS );
|
areaPoly.Deflate( epsilon, 0, SHAPE_POLY_SET::ALLOW_ACUTE_CORNERS );
|
||||||
|
|
||||||
DRC_RTREE* zoneRTree = board->m_CopperZoneRTreeCache[ copperZone ].get();
|
DRC_RTREE* zoneRTree = board->m_CopperZoneRTreeCache[ copperZone ].get();
|
||||||
|
|
Loading…
Reference in New Issue