From 8ee81e0fc49aa276cbddd5c9b96e9ad0ce757d6f Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Fri, 18 Feb 2022 11:09:57 +0000
Subject: [PATCH] Fix plotting of PCB arcs.

---
 pcbnew/plot_brditems_plotter.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp
index f48b35c85f..cda1f1d0c9 100644
--- a/pcbnew/plot_brditems_plotter.cpp
+++ b/pcbnew/plot_brditems_plotter.cpp
@@ -674,7 +674,7 @@ void BRDITEMS_PLOTTER::PlotFootprintShape( const FP_SHAPE* aShape )
         {
             radius = KiROUND( GetLineLength( aShape->GetCenter(), aShape->GetStart() ) );
             EDA_ANGLE startAngle( aShape->GetStart() - aShape->GetCenter() );
-            EDA_ANGLE endAngle = startAngle + aShape->GetArcAngle();
+            EDA_ANGLE endAngle = startAngle - aShape->GetArcAngle();
 
             // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
             if( std::abs( aShape->GetArcAngle().AsDegrees() ) == 360.0 )
@@ -684,7 +684,7 @@ void BRDITEMS_PLOTTER::PlotFootprintShape( const FP_SHAPE* aShape )
             }
             else
             {
-                m_plotter->ThickArc( aShape->GetCenter(), -endAngle, -startAngle, radius,
+                m_plotter->ThickArc( aShape->GetCenter(), -startAngle, -endAngle, radius,
                                      thickness, GetPlotMode(), &gbr_metadata );
             }
         }
@@ -946,7 +946,7 @@ void BRDITEMS_PLOTTER::PlotPcbShape( const PCB_SHAPE* aShape )
         case SHAPE_T::ARC:
         {
             EDA_ANGLE startAngle( aShape->GetStart() - aShape->GetCenter() );
-            EDA_ANGLE endAngle = startAngle + aShape->GetArcAngle();
+            EDA_ANGLE endAngle = startAngle - aShape->GetArcAngle();
 
             // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
             if( std::abs( aShape->GetArcAngle().AsDegrees() ) == 360.0 )
@@ -956,7 +956,7 @@ void BRDITEMS_PLOTTER::PlotPcbShape( const PCB_SHAPE* aShape )
             }
             else
             {
-                m_plotter->ThickArc( aShape->GetCenter(), -endAngle, -startAngle,
+                m_plotter->ThickArc( aShape->GetCenter(), -startAngle, -endAngle,
                                      aShape->GetRadius(), thickness, GetPlotMode(), &gbr_metadata );
             }