kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #36206
[PATCH] Do not plot zero width oval holes in Gerber X2 drill, files
From 2be418ff0ef219960d53d5252d331b6def443bd0 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.kicad@xxxxxxxxx>
Date: Sun, 17 Jun 2018 14:37:49 +0200
Subject: [PATCH 2/2] 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.
---
pcbnew/exporters/gendrill_gerber_writer.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pcbnew/exporters/gendrill_gerber_writer.cpp b/pcbnew/exporters/gendrill_gerber_writer.cpp
index 351a330d8..2dc1db860 100644
--- a/pcbnew/exporters/gendrill_gerber_writer.cpp
+++ b/pcbnew/exporters/gendrill_gerber_writer.cpp
@@ -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
--
2.16.2
Follow ups