diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index d4bcf80354..b817d18611 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -6,7 +6,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -361,7 +361,10 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem, const wxPoint& aStart, cons // start_angle < end_angle. So ensure this is the case here: // Due to the fact atan2 returns angles between -180 to + 180 degrees, // this is not always the case ( a modulo 360.0 degrees can be lost ) - if( start_angle > end_angle ) + // + // Note also an arc with same start and end angle is a circle (360 deg arc) + // in gerber files + if( start_angle >= end_angle ) end_angle += 3600; double arc_angle = start_angle - end_angle;