Edge Cuts shapes have zero width.

Fixes https://gitlab.com/kicad/code/kicad/issues/6517
This commit is contained in:
Jeff Young 2020-11-26 17:42:02 +00:00
parent b3204a06fd
commit 06b9439dbf
2 changed files with 13 additions and 1 deletions

View File

@ -1054,6 +1054,17 @@ bool PNS_KICAD_IFACE_BASE::syncGraphicalItem( PNS::NODE* aWorld, PCB_SHAPE* aIte
else
solid->SetLayer( aItem->GetLayer() );
if( aItem->GetLayer() == Edge_Cuts )
{
switch( shape->Type() )
{
case SH_SEGMENT: static_cast<SHAPE_SEGMENT*>( shape )->SetWidth( 0 ); break;
case SH_ARC: static_cast<SHAPE_ARC*>( shape )->SetWidth( 0 ); break;
case SH_LINE_CHAIN: static_cast<SHAPE_LINE_CHAIN*>( shape )->SetWidth( 0 ); break;
default: /* remaining shapes don't have width */ break;
}
}
solid->SetNet( -1 );
solid->SetParent( aItem );
solid->SetShape( shape );

View File

@ -78,7 +78,8 @@ public:
return m_alternateShape;
}
const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0, int aLayer = -1 ) const override;
const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0,
int aLayer = -1 ) const override;
void SetShape( SHAPE* shape )
{