From faeec25557106d7934df9983310df09cc6a4e133 Mon Sep 17 00:00:00 2001 From: levanlap2502 Date: Mon, 15 Jan 2024 10:54:40 +0700 Subject: [PATCH] Fix fillet lines, when line angle is 0 or 180 Check angle of line before creating Fillet Fixes https://gitlab.com/kicad/code/kicad/-/issues/15966 --- pcbnew/tools/item_modification_routine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/tools/item_modification_routine.cpp b/pcbnew/tools/item_modification_routine.cpp index 42696f6c36..c95abcb7a2 100644 --- a/pcbnew/tools/item_modification_routine.cpp +++ b/pcbnew/tools/item_modification_routine.cpp @@ -112,6 +112,8 @@ void LINE_FILLET_ROUTINE::ProcessLinePair( PCB_SHAPE& aLineA, PCB_SHAPE& aLineB // Nothing to do return; + if( seg_a.Angle( seg_b ).IsHorizontal() ) + return; SHAPE_ARC sArc( seg_a, seg_b, m_filletRadiusIU ); VECTOR2I t1newPoint, t2newPoint;