Avoid Clipper when possible.

When expanding an error to the outside of a rounded corner pad we
need to trim it to the pad bounding box or else we get little ears
where the circle approximation meets the pad square.  This is expensive,
and for clearance lines we don't really care whether the error is
inside or outside.

Fixes https://gitlab.com/kicad/code/kicad/issues/8157
This commit is contained in:
Jeff Young 2021-04-08 18:56:10 +01:00
parent 5ea68c7694
commit a8b40bf683
1 changed files with 3 additions and 1 deletions

View File

@ -1164,9 +1164,11 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
else
{
SHAPE_POLY_SET polySet;
// Use ERROR_INSIDE because it avoids Clipper and is therefore much faster.
aPad->TransformShapeWithClearanceToPolygon( polySet, ToLAYER_ID( aLayer ),
clearance,
bds.m_MaxError, ERROR_OUTSIDE );
bds.m_MaxError, ERROR_INSIDE );
m_gal->DrawPolygon( polySet );
}
}