diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index afb846b9b0..c5ba8aa7f3 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1190,22 +1190,10 @@ std::unique_ptr PNS_KICAD_IFACE_BASE::syncPad( PAD* aPad ) if( aPad->GetDrillSize().x > 0 ) solid->SetHole( new PNS::HOLE( aPad->GetEffectiveHoleShape()->Clone() ) ); - // We generate a single SOLID for a pad, so we have to treat it as ALWAYS_FLASHED and then - // perform layer-specific flashing tests internally. - std::shared_ptr shape = aPad->GetEffectiveShape( UNDEFINED_LAYER, - FLASHING::ALWAYS_FLASHED ); + std::shared_ptr shape = aPad->GetEffectivePolygon(); - if( shape->HasIndexableSubshapes() && shape->GetIndexableSubshapeCount() == 1 ) - { - std::vector subshapes; - shape->GetIndexableSubshapes( subshapes ); - - solid->SetShape( subshapes[0]->Clone() ); - } - else - { - solid->SetShape( shape->Clone() ); - } + if( shape->OutlineCount() ) + solid->SetShape( new SHAPE_SIMPLE( shape->Outline( 0 ) ) ); return solid; }