Non-copper zones need a different trim-outside-board strategy.

The copper zones are checking for any point being outside the board
as they will have already been broken in to islands either entirely
outside or entirely inside the board.  Not so for non-copper zones.

However, non-copper zones are *already* trimmed to the board edges,
so we just need to avoid using the above faulty assumption.

Fixes https://gitlab.com/kicad/code/kicad/issues/5811
This commit is contained in:
Jeff Young 2020-09-30 11:48:44 +01:00
parent d3f8f2b81e
commit 673b52b5c4
1 changed files with 3 additions and 1 deletions

View File

@ -365,7 +365,9 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*>& aZones, bool aCheck, wxWin
// Now remove islands outside the board edge
for( ZONE_CONTAINER* zone : aZones )
{
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
LSET zoneCopperLayers = zone->GetLayerSet() & LSET::AllCuMask( MAX_CU_LAYERS );
for( PCB_LAYER_ID layer : zoneCopperLayers.Seq() )
{
if( m_debugZoneFiller && LSET::InternalCuMask().Contains( layer ) )
continue;