Use Chamfer lines when deflating

Rounded line ends when deflating leads to microscopic jags in the
outline that are not visible but add substantial computation time and
minor error when computing polygon offsets.

Instead, the chamfer deflate method prevents these jagged lines by
clipping angles < 90° by the error level.  This does not impact deflate
calls where we explicitly require the angles to be maintained
This commit is contained in:
Seth Hillbrand 2023-02-22 16:21:28 -08:00
parent 01039b50ca
commit af10878954
2 changed files with 2 additions and 2 deletions

View File

@ -1012,7 +1012,7 @@ public:
CORNER_STRATEGY aCornerStrategy = ROUND_ALL_CORNERS );
void Deflate( int aAmount, int aCircleSegmentsCount,
CORNER_STRATEGY aCornerStrategy = ROUND_ALL_CORNERS )
CORNER_STRATEGY aCornerStrategy = CHAMFER_ALL_CORNERS )
{
Inflate( -aAmount, aCircleSegmentsCount, aCornerStrategy );
}

View File

@ -1524,7 +1524,7 @@ bool ZONE_FILLER::fillCopperZone( const ZONE* aZone, PCB_LAYER_ID aLayer, PCB_LA
*/
if( half_min_width - epsilon > epsilon )
aFillPolys.Deflate( half_min_width - epsilon, numSegs, cornerStrategy );
aFillPolys.Deflate( half_min_width - epsilon, numSegs, fastCornerStrategy );
// Min-thickness is the web thickness. On the other hand, a blob min-thickness by
// min-thickness is not useful. Since there's no obvious definition of web vs. blob, we