diff --git a/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py b/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py index 55c1698b48..af8935c35b 100644 --- a/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py +++ b/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py @@ -37,7 +37,7 @@ popt.SetOutputDirectory(plotDir) # Set some important plot options: popt.SetPlotFrameRef(False) #do not change it -popt.SetLineWidth(FromMM(0.35)) +popt.SetLineWidth(FromMM(0.15)) # default line width to plot items having no line thickiness defined popt.SetAutoScale(False) #do not change it popt.SetScale(1) #do not change it @@ -48,8 +48,14 @@ popt.SetExcludeEdgeLayer(False); popt.SetScale(1) popt.SetUseAuxOrigin(True) -# This by gerbers only (also the name is truly horrid!) +# This by gerbers only popt.SetSubtractMaskFromSilk(False) +# Disable plot pad holes +popt.SetDrillMarksType( PCB_PLOT_PARAMS.NO_DRILL_SHAPE ); +# Skip plot pad NPTH when possible: when drill size and shape == pad size and shape +# usually sel to True for copper layers +popt.SetSkipPlotNPTH_Pads( False ); + # Once the defaults are set it become pretty easy... # I have a Turing-complete programming language here: I'll use it... @@ -70,6 +76,11 @@ plot_plan = [ for layer_info in plot_plan: + if layer_info[1] <= B_Cu: + popt.SetSkipPlotNPTH_Pads( True ) + else: + popt.SetSkipPlotNPTH_Pads( False ) + pctl.SetLayer(layer_info[1]) pctl.OpenPlotfile(layer_info[0], PLOT_FORMAT_GERBER, layer_info[2]) print 'plot %s' % pctl.GetPlotFileName() @@ -80,6 +91,7 @@ for layer_info in plot_plan: lyrcnt = board.GetCopperLayerCount(); for innerlyr in range ( 1, lyrcnt-1 ): + popt.SetSkipPlotNPTH_Pads( True ); pctl.SetLayer(innerlyr) lyrname = 'inner%s' % innerlyr pctl.OpenPlotfile(lyrname, PLOT_FORMAT_GERBER, "inner") diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index d71ec2ac85..9e6acd67d1 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -431,10 +431,9 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, case PAD_SHAPE_CIRCLE: case PAD_SHAPE_OVAL: if( aPlotOpt.GetSkipPlotNPTH_Pads() && - (pad->GetSize() == pad->GetDrillSize()) && - (pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED) ) + ( pad->GetSize() == pad->GetDrillSize() ) && + ( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) ) break; - // Fall through: case PAD_SHAPE_TRAPEZOID: case PAD_SHAPE_RECT: