From 8a4ba87fba9a4f69effeba4ad367bc25875d1d8d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 20 Oct 2019 21:11:06 +0200 Subject: [PATCH] Gerber output: Fix incorrect zones outline thickness in filled areas. Fixes: lp:1848929 https://bugs.launchpad.net/kicad/+bug/1848929 --- common/plotters/GERBER_plotter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 624065c555..1124620253 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -594,9 +594,6 @@ void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, // one should plot outline as thick segments GBR_METADATA* gbr_metadata = static_cast( aData ); - if( !aFill ) - SetCurrentLineWidth( aWidth, gbr_metadata ); - if( gbr_metadata ) formatNetAttribute( &gbr_metadata->m_NetlistMetadata ); @@ -617,8 +614,10 @@ void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, fputs( "G37*\n", outputFile ); } - if( aWidth > 0 ) + if( aWidth > 0 ) // Draw the polyline/polygon outline { + SetCurrentLineWidth( aWidth, gbr_metadata ); + MoveTo( aCornerList[0] ); for( unsigned ii = 1; ii < aCornerList.size(); ii++ ) @@ -919,7 +918,10 @@ void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS aCornerRadius, 0.0, 0, GetPlotterArcHighDef() ); if( aTraceMode != FILLED ) + { + SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, &gbr_metadata ); outline.Inflate( -GetCurrentLineWidth()/2, 16 ); + } std::vector< wxPoint > cornerList; // TransformRoundRectToPolygon creates only one convex polygon