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
(cherry picked from commit af10878954
)
This commit is contained in:
parent
7ef5e079fd
commit
e699bcf5a3
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -1528,7 +1528,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
|
||||
|
|
Loading…
Reference in New Issue