From 45386ccbf39f9570dca1ff83d8908b92acb09089 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 26 Jan 2018 19:48:56 +0000 Subject: [PATCH] Honor SMALL_DRILL_SHAPE option when plotting DXF. Fixes: lp:1566744 * https://bugs.launchpad.net/kicad/+bug/1566744 --- pcbnew/plot_board_layers.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 23cb3e2547..523a0655c1 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -680,6 +680,9 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter, // Plot pad holes if( aPlotOpt.GetDrillMarksType() != PCB_PLOT_PARAMS::NO_DRILL_SHAPE ) { + int smallDrill = (aPlotOpt.GetDrillMarksType() == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE) + ? SMALL_DRILL : INT_MAX; + for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { for( D_PAD* pad = module->PadsList(); pad; pad = pad->Next() ) @@ -690,9 +693,13 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter, continue; if( hole.x == hole.y ) + { + hole.x = std::min( smallDrill, hole.x ); aPlotter->Circle( pad->GetPosition(), hole.x, NO_FILL ); + } else { + // Note: small drill marks have no significance when applied to slots wxPoint drl_start, drl_end; int width; pad->GetOblongDrillGeometry( drl_start, drl_end, width );