Fix issues in plot functions, when used from python scripts.
This commit is contained in:
parent
17f7921311
commit
be070d95be
|
@ -36,11 +36,11 @@ popt = pctl.GetPlotOptions()
|
|||
popt.SetOutputDirectory(plotDir)
|
||||
|
||||
# Set some important plot options:
|
||||
popt.SetPlotFrameRef(False)
|
||||
popt.SetPlotFrameRef(False) #do not change it
|
||||
popt.SetLineWidth(FromMM(0.35))
|
||||
|
||||
popt.SetAutoScale(False)
|
||||
popt.SetScale(1)
|
||||
popt.SetAutoScale(False) #do not change it
|
||||
popt.SetScale(1) #do not change it
|
||||
popt.SetMirror(False)
|
||||
popt.SetUseGerberAttributes(True)
|
||||
popt.SetUseGerberProtelExtensions(False)
|
||||
|
@ -100,7 +100,10 @@ drlwriter.SetMapFileFormat( PLOT_FORMAT_PDF )
|
|||
mirror = False
|
||||
minimalHeader = False
|
||||
offset = wxPoint(0,0)
|
||||
drlwriter.SetOptions( mirror, minimalHeader, offset )
|
||||
# False to generate 2 separate drill files (one for plated holes, one for non plated holes)
|
||||
# True to generate only one drill file
|
||||
mergeNPTH = False
|
||||
drlwriter.SetOptions( mirror, minimalHeader, offset, mergeNPTH )
|
||||
|
||||
metricFmt = True
|
||||
drlwriter.SetFormat( metricFmt )
|
||||
|
|
|
@ -214,7 +214,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
|
|||
|
||||
case F_SilkS:
|
||||
case B_SilkS:
|
||||
if ( plotOpt.GetPlotOutlineMode() )
|
||||
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
|
||||
// PlotLayerOutlines() is designed only for DXF plotters.
|
||||
// and must not be used for other plot formats
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
|
@ -255,7 +257,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
|
|||
plotOpt.SetSkipPlotNPTH_Pads( false );
|
||||
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
|
||||
|
||||
if ( plotOpt.GetPlotOutlineMode() )
|
||||
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
|
||||
// PlotLayerOutlines() is designed only for DXF plotters.
|
||||
// and must not be used for other plot formats
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
|
@ -265,7 +269,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
|
|||
plotOpt.SetSkipPlotNPTH_Pads( false );
|
||||
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
|
||||
|
||||
if ( plotOpt.GetPlotOutlineMode() )
|
||||
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
|
||||
// PlotLayerOutlines() is designed only for DXF plotters.
|
||||
// and must not be used for other plot formats
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
|
|
Loading…
Reference in New Issue