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
This commit is contained in:
Seth Hillbrand 2020-08-18 06:51:35 -07:00
parent c2847e00d8
commit 4cc820f550
1 changed files with 7 additions and 0 deletions

View File

@ -39,7 +39,14 @@ const SHAPE_LINE_CHAIN SOLID::Hull( int aClearance, int aWalkaroundThickness, in
SHAPE* shape = m_shape; SHAPE* shape = m_shape;
if( !ROUTER::GetInstance()->GetInterface()->IsPadOnLayer( this, aLayer ) ) 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; shape = m_alternateShape;
}
switch( shape->Type() ) switch( shape->Type() )
{ {