From 42dae1504a096235a6df7a0dddbacfb8e1c53075 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Thu, 18 Aug 2022 22:42:16 +0200 Subject: [PATCH] router: fix negative chamfer value for hulls generated for 0-length segments --- pcbnew/router/pns_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index dcdfeed9f2..737488236e 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -235,7 +235,7 @@ const SHAPE_LINE_CHAIN SegmentHull ( const SHAPE_SEGMENT& aSeg, int aClearance, if( a == b ) { - int xx2 = KiROUND( 2.0 * ( 1.0 - M_SQRT2 ) * d ); + int xx2 = KiROUND( 2.0 * ( 1.0 - M_SQRT1_2 ) * d ); return OctagonalHull( a - VECTOR2I( aSeg.GetWidth() / 2, aSeg.GetWidth() / 2 ), VECTOR2I( aSeg.GetWidth(), aSeg.GetWidth() ),