Only sketch pads on fab layers if they exist on that side

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4546
This commit is contained in:
Jon Evans 2020-05-26 21:14:08 -04:00
parent d46c651d80
commit 39a2416c11
3 changed files with 8 additions and 5 deletions

View File

@ -98,7 +98,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
gbSizer1->Add( m_excludeEdgeLayerOpt, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_sketchPadsOnFabLayers = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Sketch pads on fab layers"), wxDefaultPosition, wxDefaultSize, 0 );
m_sketchPadsOnFabLayers->SetToolTip( _("Do not plot pads on silkscreen layers, even when they are assigned to them.\nUncheck this if you wish to create assembly drawings from silkscreen layers.") );
m_sketchPadsOnFabLayers->SetToolTip( _("Include pad outlines on F.Fab and B.Fab layers when plotting") );
gbSizer1->Add( m_sketchPadsOnFabLayers, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );

View File

@ -920,7 +920,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Do not plot pads on silkscreen layers, even when they are assigned to them.&#x0A;Uncheck this if you wish to create assembly drawings from silkscreen layers.</property>
<property name="tooltip">Include pad outlines on F.Fab and B.Fab layers when plotting</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -215,8 +215,9 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
bool onCopperLayer = ( LSET::AllCuMask() & aLayerMask ).any();
bool onSolderMaskLayer = ( LSET( 2, F_Mask, B_Mask ) & aLayerMask ).any();
bool onSolderPasteLayer = ( LSET( 2, F_Paste, B_Paste ) & aLayerMask ).any();
bool onFabLayer = ( LSET( 2, F_Fab, B_Fab ) & aLayerMask ).any();
bool sketchPads = onFabLayer && aPlotOpt.GetSketchPadsOnFabLayers();
bool onFrontFab = ( LSET( F_Fab ) & aLayerMask ).any();
bool onBackFab = ( LSET( B_Fab ) & aLayerMask ).any();
bool sketchPads = ( onFrontFab || onBackFab ) && aPlotOpt.GetSketchPadsOnFabLayers();
// Plot edge layer and graphic items
itemplotter.PlotBoardGraphicItems();
@ -240,7 +241,9 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
if( !( pad->GetLayerSet() & aLayerMask ).any() )
{
if( sketchPads )
if( sketchPads &&
( ( onFrontFab && pad->GetLayerSet().Contains( F_Cu ) ) ||
( onBackFab && pad->GetLayerSet().Contains( B_Cu ) ) ) )
padPlotMode = SKETCH;
else
continue;