gerbview: fix incorrect render of regions defined by a 360 deg arcd (a circle)
these regions were missing. Fixes #10805 https://gitlab.com/kicad/code/kicad/issues/10805
This commit is contained in:
parent
c79916b359
commit
c125cb673e
|
@ -6,7 +6,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* 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
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -360,7 +360,10 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem, const VECTOR2I& aStart, con
|
||||||
// start_angle < end_angle. So ensure this is the case here:
|
// start_angle < end_angle. So ensure this is the case here:
|
||||||
// Due to the fact atan2 returns angles between -180 to + 180 degrees,
|
// 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 )
|
// 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 += ANGLE_360;
|
end_angle += ANGLE_360;
|
||||||
|
|
||||||
EDA_ANGLE arc_angle = start_angle - end_angle;
|
EDA_ANGLE arc_angle = start_angle - end_angle;
|
||||||
|
|
Loading…
Reference in New Issue