mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Prevent overplotting copper layers
68fa45dea0115ae23a8650eb6f6ce05448a2d42e wanted to ensure that drill marks were visible even when plotting non-copper layers. However, this had the effect of changing the plot order depending on whether drill marks were shown or not. The current solution is to overplot drill marks if both copper and non-copper layers are shown. This remains a sub-optimal solution as buried vias will be overplotted along with through holes. It may be a better long-term solution to gate the plotting of covering pad layers' drill marks to the plot options that include copper layers on the same page
This commit is contained in:
parent
31a3a7d406
commit
7911165294
@ -60,29 +60,22 @@ void PlotBoardLayers( BOARD* aBoard, PLOTTER* aPlotter, const LSEQ& aLayers,
|
||||
if( !aBoard || !aPlotter || aLayers.empty() )
|
||||
return;
|
||||
|
||||
// if a drill mark must be plotted, the copper layer needs to be plotted
|
||||
// after other layers because the drill mark must be plotted as a filled
|
||||
// white shape *after* all other shapes are plotted
|
||||
bool plot_mark = aPlotOptions.GetDrillMarksType() != DRILL_MARKS::NO_DRILL_SHAPE;
|
||||
// if a drill mark must be plotted,it must be plotted as a filled
|
||||
// white shape *after* all other shapes are plotted, provided that
|
||||
// the other shapes are not copper layers
|
||||
bool plot_mark = ( aPlotOptions.GetDrillMarksType() != DRILL_MARKS::NO_DRILL_SHAPE
|
||||
&& !aPlotOptions.GetLayerSelection().ClearCopperLayers().empty()
|
||||
&& !aPlotOptions.GetLayerSelection().ClearNonCopperLayers().empty() );
|
||||
|
||||
for( PCB_LAYER_ID layer : aLayers )
|
||||
{
|
||||
// copper layers with drill marks will be plotted after all other layers
|
||||
if( IsCopperLayer( layer ) && plot_mark )
|
||||
continue;
|
||||
|
||||
PlotOneBoardLayer( aBoard, aPlotter, layer, aPlotOptions );
|
||||
}
|
||||
|
||||
if( !plot_mark )
|
||||
return;
|
||||
|
||||
for( PCB_LAYER_ID layer : aLayers )
|
||||
if( plot_mark )
|
||||
{
|
||||
if( !IsCopperLayer( layer ) )
|
||||
continue;
|
||||
|
||||
PlotOneBoardLayer( aBoard, aPlotter, layer, aPlotOptions );
|
||||
aPlotter->SetColor( WHITE );
|
||||
BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOptions );
|
||||
itemplotter.PlotDrillMarks();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user