From 4cc820f5509dabaa0bdb82cafabd2aa38dabc311 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 18 Aug 2020 06:51:35 -0700 Subject: [PATCH] PNS: skip hulls for layers where the solid isn't If we don't have an object on the required layer and there isn't a through-hole (m_alternateShape), then we shouldn't return a hull Fixes https://gitlab.com/kicad/code/kicad/issues/5233 --- pcbnew/router/pns_solid.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index 8202707e04..567f0b8aca 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -39,7 +39,14 @@ const SHAPE_LINE_CHAIN SOLID::Hull( int aClearance, int aWalkaroundThickness, in SHAPE* shape = m_shape; if( !ROUTER::GetInstance()->GetInterface()->IsPadOnLayer( this, aLayer ) ) + { + /// The alternate shape is defined for THT pads. If we don't have an alternate shape + /// then the solid shape does not exist on this layer + if( !m_alternateShape ) + return SHAPE_LINE_CHAIN(); + shape = m_alternateShape; + } switch( shape->Type() ) {