gerbview: fix incorrect render of regions defined by a 360 deg arcd (a circle)
these regions were missing.
This commit is contained in:
parent
a8c275ae5d
commit
ab878cc257
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue