Pcbnew: fix filleting of zones with parallel adjacent edges

This commit is contained in:
Marco Mattila 2013-08-16 14:51:35 +03:00
parent ddff71c11b
commit 7e1aef2200
1 changed files with 4 additions and 0 deletions

View File

@ -448,6 +448,10 @@ CPolyLine* CPolyLine::Fillet( unsigned int aRadius, unsigned int aSegments )
double radius = aRadius;
double denom = sqrt( 2.0 / ( 1 + cosine ) - 1 );
// Do nothing in case of parallel edges
if( isinf( denom ) )
continue;
// Limit rounding distance to one half of an edge
if( 0.5 * lena * denom < radius )
radius = 0.5 * lena * denom;