Commit 7e1aef22 authored by Marco Mattila's avatar Marco Mattila

Pcbnew: fix filleting of zones with parallel adjacent edges

parent ddff71c1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment