Browse Source

Stop removing islands for fully-isolated zones

It is hard for a user to tell what is going on when their zone
just doesn't fill at all.  We catch isolated areas in the DRC so
we can just leave them alone here until the zone has at least one
non-isolated filled area.

Also change default back to always remove islands to reduce confusion

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13271
7.0
Jon Evans 3 years ago
parent
commit
ec4d377d15
  1. 21
      pcbnew/zone_filler.cpp
  2. 2
      pcbnew/zone_settings.cpp

21
pcbnew/zone_filler.cpp

@ -474,6 +474,27 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
//
for( CN_ZONE_ISOLATED_ISLAND_LIST& zone : islandsList )
{
// If *all* the polygons are islands, do not remove any of them
bool allIslands = true;
for( PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() )
{
if( !zone.m_islands.count( layer ) )
continue;
std::vector<int>& islands = zone.m_islands.at( layer );
std::shared_ptr<SHAPE_POLY_SET> poly = zone.m_zone->GetFilledPolysList( layer );
if( islands.size() != static_cast<size_t>( poly->OutlineCount() ) )
{
allIslands = false;
break;
}
}
if( allIslands )
continue;
for( PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() )
{
if( m_debugZoneFiller && LSET::InternalCuMask().Contains( layer ) )

2
pcbnew/zone_settings.cpp

@ -71,7 +71,7 @@ ZONE_SETTINGS::ZONE_SETTINGS()
m_cornerSmoothingType = SMOOTHING_NONE;
m_cornerRadius = 0;
m_removeIslands = ISLAND_REMOVAL_MODE::AREA;
m_removeIslands = ISLAND_REMOVAL_MODE::ALWAYS;
m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM;
SetIsRuleArea( false );

Loading…
Cancel
Save