diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index 986817b349..48077d55a2 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -604,10 +604,6 @@ void SHAPE_POLY_SET::Inflate( int aAmount, int aCircleSegmentsCount, if( aCircleSegmentsCount < 6 ) // avoid incorrect aCircleSegmentsCount values aCircleSegmentsCount = 6; - // Clipper has a bug where round-off error is accumulated into the last segment. Increasing - // the segment count by one probably accounts for this, but we increment by 2 to be safe. - aCircleSegmentsCount += 2; - double coeff; if( aCircleSegmentsCount > SEG_CNT_MAX || arc_tolerance_factor[aCircleSegmentsCount] == 0 ) diff --git a/thirdparty/clipper/clipper.cpp b/thirdparty/clipper/clipper.cpp index b0656ec2dc..ae5360b2b0 100644 --- a/thirdparty/clipper/clipper.cpp +++ b/thirdparty/clipper/clipper.cpp @@ -5458,6 +5458,10 @@ void ClipperOffset::DoRound( int j, int k ) Y = X2 * m_sin + Y * m_cos; } + m_destPoly.push_back( IntPoint( + Round( m_srcPoly[j].X + X * m_delta ), + Round( m_srcPoly[j].Y + Y * m_delta ) ) ); + m_destPoly.push_back( IntPoint( Round( m_srcPoly[j].X + m_normals[j].X * m_delta ), Round( m_srcPoly[j].Y + m_normals[j].Y * m_delta ) ) );