From f88dce1627375354202606396335c4f9bc3fc5c6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 3 Sep 2023 13:23:20 +0100 Subject: [PATCH] Don't return separate shapes from a custom-shaped pad. It just confuses the hull generator. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15553 (cherry picked from commit 43862d767e04a29d63baf9da6cb97207e34d7d32) --- pcbnew/router/pns_kicad_iface.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 8ef8bd705f..158a972adc 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1155,22 +1155,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; }