pcb_painter.cpp: fix incorrect shape of CHAMFERED_RECT pads with negative clearance.
Negative clearance (for instance on mask or paste layer) was not taken in account
This commit is contained in:
parent
00b4134eb8
commit
9fb77473cd
|
@ -1149,6 +1149,23 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
||||||
case SH_SIMPLE:
|
case SH_SIMPLE:
|
||||||
{
|
{
|
||||||
const SHAPE_SIMPLE* poly = static_cast<const SHAPE_SIMPLE*>( shape );
|
const SHAPE_SIMPLE* poly = static_cast<const SHAPE_SIMPLE*>( shape );
|
||||||
|
|
||||||
|
if( margin.x < 0 ) // The poly shape must be deflated
|
||||||
|
{
|
||||||
|
int maxError = bds.m_MaxError;
|
||||||
|
int numSegs = GetArcToSegmentCount( -margin.x, maxError, 360.0 );
|
||||||
|
SHAPE_POLY_SET outline;
|
||||||
|
outline.NewOutline();
|
||||||
|
|
||||||
|
for( int ii = 0; ii < poly->PointCount(); ++ii )
|
||||||
|
outline.Append( poly->CPoint( ii ) );
|
||||||
|
|
||||||
|
outline.Deflate( -margin.x, numSegs );
|
||||||
|
|
||||||
|
m_gal->DrawPolygon( outline );
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
m_gal->DrawPolygon( poly->Vertices() );
|
m_gal->DrawPolygon( poly->Vertices() );
|
||||||
|
|
||||||
// Now add on a rounded margin (using segments) if the margin > 0
|
// Now add on a rounded margin (using segments) if the margin > 0
|
||||||
|
|
Loading…
Reference in New Issue