From 2cd630b47d0451540a5bf7316e259708a88363d6 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Fri, 6 Oct 2023 00:26:33 +0300 Subject: [PATCH] Fix a bug causing lower segment count on holes when deflating polygons. --- libs/kimath/src/geometry/shape_poly_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index d63a7873f5..f337b13c41 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -1239,7 +1239,7 @@ void SHAPE_POLY_SET::inflate2( int aAmount, int aCircleSegCount, CORNER_STRATEGY void SHAPE_POLY_SET::Inflate( int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify ) { - int segCount = GetArcToSegmentCount( aAmount, aMaxError, FULL_CIRCLE ); + int segCount = GetArcToSegmentCount( std::abs( aAmount ), aMaxError, FULL_CIRCLE ); if( ADVANCED_CFG::GetCfg().m_UseClipper2 ) inflate2( aAmount, segCount, aCornerStrategy, aSimplify );