Do not plot zero width oval holes in Gerber X2 drill files

In case there are zero width oval holes on the PCB,
it is safer to not plot them at all, rather than plotting
with width arbitrarily increased to 10 mils.
This also makes Gerber outputs consistent with Excellon outputs.
This commit is contained in:
Andrzej Wolski 2018-06-17 14:37:49 +02:00 committed by jean-pierre charras
parent ae02039ed4
commit 834d9335dd
1 changed files with 4 additions and 0 deletions

View File

@ -283,6 +283,10 @@ int GERBER_WRITER::createDrillFile( wxString& aFullFilename, bool aIsNpth,
convertOblong2Segment( hole_descr.m_Hole_Size,
hole_descr.m_Hole_Orient, start, end );
int width = std::min( hole_descr.m_Hole_Size.x, hole_descr.m_Hole_Size.y );
if ( width == 0 )
continue;
plotter.ThickSegment( start+hole_pos, end+hole_pos,
width, FILLED, &gbr_metadata );
#endif