From 0b1cb0e19d2f824826d0f3ba466d2085e2b774a2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 4 Dec 2023 17:46:39 +0100 Subject: [PATCH] Gerber plotter: do not skip not filled polygons with a 0 line thickness. It is legal in Gerber files, although lines with thickness = 0 are not displayed by some viewers. --- common/plotters/GERBER_plotter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index b481f3a9c3..cf898f783c 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -976,7 +976,7 @@ void GERBER_PLOTTER::PlotPolyAsRegion( const SHAPE_LINE_CHAIN& aPoly, FILL_T aFi { // plot a filled polygon using Gerber region, therefore adding X2 attributes // to the solid polygon - if( aWidth ) + if( aWidth || aFill == FILL_T::NO_FILL ) PlotPoly( aPoly, FILL_T::NO_FILL, aWidth, aGbrMetadata ); if( aFill != FILL_T::NO_FILL ) @@ -1034,7 +1034,7 @@ void GERBER_PLOTTER::PlotPoly( const SHAPE_LINE_CHAIN& aPoly, FILL_T aFill, int fputs( "G37*\n", m_outputFile ); } - if( aWidth > 0 ) // Draw the polyline/polygon outline + if( aWidth > 0 || aFill == FILL_T::NO_FILL ) // Draw the polyline/polygon outline { SetCurrentLineWidth( aWidth, gbr_metadata ); @@ -1102,7 +1102,7 @@ void GERBER_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T fputs( "G37*\n", m_outputFile ); } - if( aWidth > 0 ) // Draw the polyline/polygon outline + if( aWidth > 0 || aFill == FILL_T::NO_FILL ) // Draw the polyline/polygon outline { SetCurrentLineWidth( aWidth, gbr_metadata );