Fix a missing init in gerber plot script demo.
Fixes: lp:1759071 https://bugs.launchpad.net/kicad/+bug/1759071
This commit is contained in:
parent
0ded476f9d
commit
602d9e1972
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue