mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Remove unused pad layers and simplify pad colors
This commit is contained in:
parent
f354eca50e
commit
71a0a638a0
common
include
pcbnew
@ -169,9 +169,6 @@ wxString LayerName( int aLayer )
|
||||
case LAYER_FP_VALUES: return _( "Values" );
|
||||
case LAYER_FP_REFERENCES: return _( "Reference designators" );
|
||||
case LAYER_FP_TEXT: return _( "Footprint text" );
|
||||
case LAYER_PADS_SMD_FR: return _( "SMD pads front" );
|
||||
case LAYER_PADS_SMD_BK: return _( "SMD pads back" );
|
||||
case LAYER_PADS_TH: return _( "Through-hole pads" );
|
||||
case LAYER_TRACKS: return _( "Tracks" );
|
||||
case LAYER_VIA_THROUGH: return _( "Through vias" );
|
||||
case LAYER_VIA_BBLIND: return _( "Blind/Buried vias" );
|
||||
|
@ -848,8 +848,6 @@ GAL_SET GAL_SET::DefaultVisible()
|
||||
LAYER_VIA_THROUGH,
|
||||
// LAYER_HIDDEN_TEXT, // DEPCREATED SINCE 9.0. Invisible text hidden by default
|
||||
LAYER_ANCHOR,
|
||||
LAYER_PADS_SMD_FR,
|
||||
LAYER_PADS_SMD_BK,
|
||||
LAYER_RATSNEST,
|
||||
LAYER_GRID,
|
||||
LAYER_GRID_AXES,
|
||||
@ -859,7 +857,6 @@ GAL_SET GAL_SET::DefaultVisible()
|
||||
LAYER_FP_VALUES,
|
||||
LAYER_FP_REFERENCES,
|
||||
LAYER_TRACKS,
|
||||
LAYER_PADS_TH,
|
||||
LAYER_PAD_PLATEDHOLES,
|
||||
LAYER_NON_PLATEDHOLES,
|
||||
LAYER_PAD_HOLEWALLS,
|
||||
|
@ -164,19 +164,14 @@ static const std::map<int, COLOR4D> s_defaultTheme =
|
||||
{ LAYER_GRID, CSS_COLOR( 132, 132, 132, 1 ) },
|
||||
{ LAYER_GRID_AXES, CSS_COLOR( 194, 194, 194, 1 ) },
|
||||
{ LAYER_PAD_PLATEDHOLES, CSS_COLOR( 194, 194, 0, 1 ) },
|
||||
{ LAYER_PADS_TH, CSS_COLOR( 227, 183, 46, 1 ) },
|
||||
{ LAYER_NON_PLATEDHOLES, CSS_COLOR( 26, 196, 210, 1 ) },
|
||||
{ LAYER_RATSNEST, CSS_COLOR( 0, 248, 255, 0.35 ) },
|
||||
{ LAYER_SELECT_OVERLAY, CSS_COLOR( 4, 255, 67, 1 ) },
|
||||
{ LAYER_VIA_THROUGH, CSS_COLOR( 236, 236, 236, 1 ) },
|
||||
{ LAYER_VIA_BBLIND, CSS_COLOR( 187, 151, 38, 1 ) },
|
||||
{ LAYER_VIA_HOLES, CSS_COLOR( 227, 183, 46, 1 ) },
|
||||
{ LAYER_VIA_MICROVIA, CSS_COLOR( 0, 132, 132, 1 ) },
|
||||
{ LAYER_DRAWINGSHEET, CSS_COLOR( 200, 114, 171, 1 ) },
|
||||
{ LAYER_PAGE_LIMITS, CSS_COLOR( 132, 132, 132, 1 ) },
|
||||
{ NETNAMES_LAYER_ID_START, CSS_COLOR( 255, 255, 255, 0.7 ) },
|
||||
{ LAYER_PAD_NETNAMES, CSS_COLOR( 255, 255, 255, 0.9 ) },
|
||||
{ LAYER_VIA_NETNAMES, CSS_COLOR( 51, 51, 51, 0.9 ) },
|
||||
|
||||
{ F_Cu, CSS_COLOR( 200, 52, 52, 1 ) },
|
||||
{ In1_Cu, CSS_COLOR( 127, 200, 127, 1 ) },
|
||||
@ -385,19 +380,14 @@ static const std::map<int, COLOR4D> s_classicTheme =
|
||||
{ LAYER_GRID, COLOR4D( DARKGRAY ) },
|
||||
{ LAYER_GRID_AXES, COLOR4D( BLUE ) },
|
||||
{ LAYER_PAD_PLATEDHOLES, COLOR4D( YELLOW ) },
|
||||
{ LAYER_PADS_TH, COLOR4D( YELLOW ) },
|
||||
{ LAYER_NON_PLATEDHOLES, COLOR4D( YELLOW ) },
|
||||
{ LAYER_RATSNEST, COLOR4D( WHITE ) },
|
||||
{ LAYER_SELECT_OVERLAY, COLOR4D( PUREGREEN ) },
|
||||
{ LAYER_VIA_THROUGH, COLOR4D( LIGHTGRAY ) },
|
||||
{ LAYER_VIA_BBLIND, COLOR4D( BROWN ) },
|
||||
{ LAYER_VIA_HOLES, COLOR4D( 0.5, 0.4, 0, 0.8 ) },
|
||||
{ LAYER_VIA_MICROVIA, COLOR4D( CYAN ) },
|
||||
{ LAYER_DRAWINGSHEET, COLOR4D( DARKRED ) },
|
||||
{ LAYER_PAGE_LIMITS, COLOR4D( DARKGRAY) },
|
||||
{ NETNAMES_LAYER_ID_START, CSS_COLOR( 255, 255, 255, 0.7 ) },
|
||||
{ LAYER_PAD_NETNAMES, CSS_COLOR( 255, 255, 255, 0.9 ) },
|
||||
{ LAYER_VIA_NETNAMES, CSS_COLOR( 51, 51, 51, 0.9 ) },
|
||||
|
||||
{ F_Cu, COLOR4D( RED ) },
|
||||
{ In1_Cu, COLOR4D( YELLOW ) },
|
||||
|
@ -126,13 +126,9 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath )
|
||||
CLR( "board.grid", LAYER_GRID );
|
||||
CLR( "board.grid_axes", LAYER_GRID_AXES );
|
||||
CLR( "board.pad_plated_hole", LAYER_PAD_PLATEDHOLES );
|
||||
CLR( "board.pad_through_hole", LAYER_PADS_TH );
|
||||
CLR( "board.plated_hole", LAYER_NON_PLATEDHOLES );
|
||||
CLR( "board.ratsnest", LAYER_RATSNEST );
|
||||
CLR( "board.via_blind_buried", LAYER_VIA_BBLIND );
|
||||
CLR( "board.via_hole", LAYER_VIA_HOLES );
|
||||
CLR( "board.via_micro", LAYER_VIA_MICROVIA );
|
||||
CLR( "board.via_through", LAYER_VIA_THROUGH );
|
||||
CLR( "board.worksheet", LAYER_DRAWINGSHEET );
|
||||
CLR( "board.page_limits", LAYER_PAGE_LIMITS );
|
||||
CLR( "board.track_net_names", NETNAMES_LAYER_ID_START );
|
||||
|
@ -160,11 +160,8 @@ void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const
|
||||
{
|
||||
switch( layer )
|
||||
{
|
||||
case LAYER_PADS_TH:
|
||||
case LAYER_PAD_PLATEDHOLES:
|
||||
case LAYER_PAD_HOLEWALLS:
|
||||
case LAYER_PADS_SMD_FR:
|
||||
case LAYER_PADS_SMD_BK:
|
||||
draw = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -201,8 +201,8 @@ enum GAL_LAYER_ID: int
|
||||
// LAYER_MOD_TEXT_BK deprecated + 6,
|
||||
// LAYER_HIDDEN_TEXT = GAL_LAYER_ID_START + 7, ///< DEPRECATED, UNUSED SINCE 9.0. text marked as invisible
|
||||
LAYER_ANCHOR = GAL_LAYER_ID_START + 8, ///< anchor of items having an anchor point (texts, footprints)
|
||||
LAYER_PADS_SMD_FR = GAL_LAYER_ID_START + 9, ///< smd pads, front layer
|
||||
LAYER_PADS_SMD_BK = GAL_LAYER_ID_START + 10, ///< smd pads, back layer
|
||||
// LAYER_PADS_SMD_FR = GAL_LAYER_ID_START + 9, ///< Deprecated since 9.0
|
||||
// LAYER_PADS_SMD_BK = GAL_LAYER_ID_START + 10, ///< Deprecated since 9.0
|
||||
LAYER_RATSNEST = GAL_LAYER_ID_START + 11,
|
||||
LAYER_GRID = GAL_LAYER_ID_START + 12,
|
||||
LAYER_GRID_AXES = GAL_LAYER_ID_START + 13,
|
||||
@ -212,7 +212,7 @@ enum GAL_LAYER_ID: int
|
||||
LAYER_FP_VALUES = GAL_LAYER_ID_START + 17, ///< show footprints values (when texts are visible)
|
||||
LAYER_FP_REFERENCES = GAL_LAYER_ID_START + 18, ///< show footprints references (when texts are visible)
|
||||
LAYER_TRACKS = GAL_LAYER_ID_START + 19,
|
||||
LAYER_PADS_TH = GAL_LAYER_ID_START + 20, ///< multilayer pads, usually with holes
|
||||
// LAYER_PADS_TH = GAL_LAYER_ID_START + 20, ///< Deprecated since 9.0
|
||||
LAYER_PAD_PLATEDHOLES = GAL_LAYER_ID_START + 21, ///< to draw pad holes (plated)
|
||||
LAYER_VIA_HOLES = GAL_LAYER_ID_START + 22, ///< to draw via holes (pad holes do not use this layer)
|
||||
LAYER_DRC_ERROR = GAL_LAYER_ID_START + 23, ///< layer for drc markers with SEVERITY_ERROR
|
||||
@ -697,12 +697,6 @@ inline int GetNetnameLayer( int aLayer )
|
||||
{
|
||||
if( IsCopperLayer( aLayer ) )
|
||||
return NETNAMES_LAYER_INDEX( aLayer );
|
||||
else if( aLayer == LAYER_PADS_TH )
|
||||
return LAYER_PAD_NETNAMES;
|
||||
else if( aLayer == LAYER_PADS_SMD_FR )
|
||||
return LAYER_PAD_FR_NETNAMES;
|
||||
else if( aLayer == LAYER_PADS_SMD_BK )
|
||||
return LAYER_PAD_BK_NETNAMES;
|
||||
else if( IsViaPadLayer( aLayer ) )
|
||||
return LAYER_VIA_NETNAMES;
|
||||
|
||||
|
@ -659,17 +659,20 @@ std::set<int> g_excludedLayers =
|
||||
LAYER_VIAS,
|
||||
LAYER_VIA_THROUGH,
|
||||
LAYER_VIA_HOLEWALLS,
|
||||
LAYER_VIA_BBLIND,
|
||||
LAYER_VIA_MICROVIA,
|
||||
LAYER_FOOTPRINTS_FR,
|
||||
LAYER_FOOTPRINTS_BK,
|
||||
LAYER_PADS_SMD_FR,
|
||||
LAYER_PADS_SMD_BK,
|
||||
LAYER_FP_VALUES,
|
||||
LAYER_FP_REFERENCES,
|
||||
LAYER_TRACKS,
|
||||
LAYER_FP_TEXT,
|
||||
GAL_LAYER_ID_START + 6, // where LAYER_MOD_TEXT_BK (deprecated) used to be
|
||||
GAL_LAYER_ID_START + 7, // where LAYER_HIDDEN_TEXT (deprecated) used to be
|
||||
GAL_LAYER_ID_START + 9, // where LAYER_PADS_SMD_FR (deprecated) used to be
|
||||
GAL_LAYER_ID_START + 10, // where LAYER_PADS_SMD_BK (deprecated) used to be
|
||||
GAL_LAYER_ID_START + 14, // where LAYER_NO_CONNECTS (deprecated) used to be
|
||||
GAL_LAYER_ID_START + 20, // where LAYER_PADS_TH (deprecated) used to be
|
||||
LAYER_PAD_PLATEDHOLES,
|
||||
LAYER_PAD_HOLEWALLS,
|
||||
LAYER_GP_OVERLAY,
|
||||
|
@ -419,7 +419,6 @@ bool FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
||||
migrateLegacyColor( f + "Color4DAuxItems", LAYER_AUX_ITEMS );
|
||||
migrateLegacyColor( f + "Color4DGrid", LAYER_GRID );
|
||||
migrateLegacyColor( f + "Color4DNonPlatedEx", LAYER_NON_PLATEDHOLES );
|
||||
migrateLegacyColor( f + "Color4DPadThruHoleEx", LAYER_PADS_TH );
|
||||
migrateLegacyColor( f + "Color4DPCBBackground", LAYER_PCB_BACKGROUND );
|
||||
migrateLegacyColor( f + "Color4DPCBCursor", LAYER_CURSOR );
|
||||
migrateLegacyColor( f + "Color4DRatsEx", LAYER_RATSNEST );
|
||||
|
@ -1684,12 +1684,6 @@ double PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||
return HIDE;
|
||||
|
||||
// Handle Render tab switches
|
||||
if( ( GetAttribute() == PAD_ATTRIB::PTH || GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
&& !aView->IsLayerVisible( LAYER_PADS_TH ) )
|
||||
{
|
||||
return HIDE;
|
||||
}
|
||||
|
||||
const PCB_LAYER_ID& pcbLayer = static_cast<PCB_LAYER_ID>( aLayer );
|
||||
|
||||
if( !IsFlipped() && !aView->IsLayerVisible( LAYER_FOOTPRINTS_FR ) )
|
||||
@ -1698,12 +1692,6 @@ double PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||
if( IsFlipped() && !aView->IsLayerVisible( LAYER_FOOTPRINTS_BK ) )
|
||||
return HIDE;
|
||||
|
||||
if( IsFrontLayer( pcbLayer ) && !aView->IsLayerVisible( LAYER_PADS_SMD_FR ) )
|
||||
return HIDE;
|
||||
|
||||
if( IsBackLayer( pcbLayer ) && !aView->IsLayerVisible( LAYER_PADS_SMD_BK ) )
|
||||
return HIDE;
|
||||
|
||||
LSET visible = board->GetVisibleLayers() & board->GetEnabledLayers();
|
||||
|
||||
if( IsHoleLayer( aLayer ) )
|
||||
|
@ -914,7 +914,7 @@ PCB_LAYER_ID PADSTACK::EffectiveLayerFor( PCB_LAYER_ID aLayer ) const
|
||||
// For these, just give the front copper geometry, it doesn't matter.
|
||||
case LAYER_PAD_NETNAMES:
|
||||
case LAYER_VIA_NETNAMES:
|
||||
case LAYER_PADS_TH:
|
||||
case LAYER_PADS:
|
||||
case LAYER_PAD_PLATEDHOLES:
|
||||
case LAYER_VIA_HOLES:
|
||||
case LAYER_PAD_HOLEWALLS:
|
||||
|
@ -748,9 +748,7 @@ GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide()
|
||||
guide.SetIgnoreFPTextOnFront( !m_pcb->IsElementVisible( LAYER_FP_TEXT ) );
|
||||
guide.SetIgnoreFootprintsOnBack( !m_pcb->IsElementVisible( LAYER_FOOTPRINTS_BK ) );
|
||||
guide.SetIgnoreFootprintsOnFront( !m_pcb->IsElementVisible( LAYER_FOOTPRINTS_FR ) );
|
||||
guide.SetIgnorePadsOnBack( ! m_pcb->IsElementVisible( LAYER_PADS_SMD_BK ) );
|
||||
guide.SetIgnorePadsOnFront( ! m_pcb->IsElementVisible( LAYER_PADS_SMD_FR ) );
|
||||
guide.SetIgnoreThroughHolePads( ! m_pcb->IsElementVisible( LAYER_PADS_TH ) );
|
||||
guide.SetIgnoreThroughHolePads( ! m_pcb->IsElementVisible( LAYER_PADS ) );
|
||||
guide.SetIgnoreFPValues( !m_pcb->IsElementVisible( LAYER_FP_VALUES ) );
|
||||
guide.SetIgnoreFPReferences( !m_pcb->IsElementVisible( LAYER_FP_REFERENCES ) );
|
||||
guide.SetIgnoreThroughVias( ! m_pcb->IsElementVisible( LAYER_VIAS ) );
|
||||
|
@ -101,9 +101,8 @@ const int GAL_LAYER_ORDER[] =
|
||||
LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS,
|
||||
LAYER_PAD_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_NON_PLATEDHOLES,
|
||||
LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA,
|
||||
LAYER_PADS_TH,
|
||||
|
||||
LAYER_PAD_FR_NETNAMES, LAYER_PADS_SMD_FR,
|
||||
LAYER_PAD_FR_NETNAMES,
|
||||
NETNAMES_LAYER_INDEX( F_Cu ), F_Cu, ZONE_LAYER_FOR( F_Cu ),
|
||||
F_Mask, ZONE_LAYER_FOR( F_Mask ),
|
||||
F_SilkS, ZONE_LAYER_FOR( F_SilkS ),
|
||||
@ -143,7 +142,7 @@ const int GAL_LAYER_ORDER[] =
|
||||
NETNAMES_LAYER_INDEX( In29_Cu ), In29_Cu, ZONE_LAYER_FOR( In29_Cu ),
|
||||
NETNAMES_LAYER_INDEX( In30_Cu ), In30_Cu, ZONE_LAYER_FOR( In30_Cu ),
|
||||
|
||||
LAYER_PAD_BK_NETNAMES, LAYER_PADS_SMD_BK,
|
||||
LAYER_PAD_BK_NETNAMES,
|
||||
NETNAMES_LAYER_INDEX( B_Cu ), B_Cu, ZONE_LAYER_FOR( B_Cu ),
|
||||
B_Mask, ZONE_LAYER_FOR( B_Mask ),
|
||||
B_SilkS, ZONE_LAYER_FOR( B_SilkS ),
|
||||
@ -364,7 +363,7 @@ void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( PCB_LAYER_ID aLayer )
|
||||
LAYER_PAD_FR_NETNAMES, LAYER_PAD_BK_NETNAMES, LAYER_PAD_NETNAMES,
|
||||
ZONE_LAYER_FOR( aLayer ),
|
||||
BITMAP_LAYER_FOR( aLayer ),
|
||||
LAYER_PADS_TH, LAYER_PAD_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_NON_PLATEDHOLES,
|
||||
LAYER_PAD_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_NON_PLATEDHOLES,
|
||||
LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_HOLES,
|
||||
LAYER_VIA_HOLEWALLS,
|
||||
LAYER_DRC_ERROR, LAYER_DRC_WARNING, LAYER_DRC_EXCLUSION, LAYER_MARKER_SHADOWS,
|
||||
@ -382,12 +381,10 @@ void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( PCB_LAYER_ID aLayer )
|
||||
// Pads should be shown too
|
||||
if( aLayer == B_Cu )
|
||||
{
|
||||
rSettings->SetLayerIsHighContrast( LAYER_PADS_SMD_BK );
|
||||
rSettings->SetLayerIsHighContrast( LAYER_FOOTPRINTS_BK );
|
||||
}
|
||||
else if( aLayer == F_Cu )
|
||||
{
|
||||
rSettings->SetLayerIsHighContrast( LAYER_PADS_SMD_FR );
|
||||
rSettings->SetLayerIsHighContrast( LAYER_FOOTPRINTS_FR );
|
||||
}
|
||||
}
|
||||
@ -407,7 +404,7 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( PCB_LAYER_ID aLayer )
|
||||
LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_HOLES,
|
||||
LAYER_VIA_HOLEWALLS,
|
||||
LAYER_VIA_NETNAMES,
|
||||
LAYER_PADS_TH, LAYER_PAD_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_NON_PLATEDHOLES,
|
||||
LAYER_PAD_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_NON_PLATEDHOLES,
|
||||
LAYER_PAD_NETNAMES,
|
||||
LAYER_SELECT_OVERLAY, LAYER_GP_OVERLAY,
|
||||
LAYER_RATSNEST,
|
||||
@ -424,12 +421,12 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( PCB_LAYER_ID aLayer )
|
||||
|
||||
// Extra layers that are brought to the top if a F.* or B.* is selected
|
||||
const std::vector<int> frontLayers = {
|
||||
F_Cu, F_Adhes, F_Paste, F_SilkS, F_Mask, F_Fab, F_CrtYd, LAYER_PADS_SMD_FR,
|
||||
F_Cu, F_Adhes, F_Paste, F_SilkS, F_Mask, F_Fab, F_CrtYd,
|
||||
LAYER_PAD_FR_NETNAMES, NETNAMES_LAYER_INDEX( F_Cu )
|
||||
};
|
||||
|
||||
const std::vector<int> backLayers = {
|
||||
B_Cu, B_Adhes, B_Paste, B_SilkS, B_Mask, B_Fab, B_CrtYd, LAYER_PADS_SMD_BK,
|
||||
B_Cu, B_Adhes, B_Paste, B_SilkS, B_Mask, B_Fab, B_CrtYd,
|
||||
LAYER_PAD_BK_NETNAMES, NETNAMES_LAYER_INDEX( B_Cu )
|
||||
};
|
||||
|
||||
@ -495,10 +492,6 @@ void PCB_DRAW_PANEL_GAL::SyncLayersVisibility( const BOARD* aBoard )
|
||||
m_view->SetLayerVisible( LAYER_VIA_BBLIND, true );
|
||||
m_view->SetLayerVisible( LAYER_VIA_THROUGH, true );
|
||||
|
||||
// Pad layers controlled by dependencies
|
||||
m_view->SetLayerVisible( LAYER_PADS_SMD_FR, true );
|
||||
m_view->SetLayerVisible( LAYER_PADS_SMD_BK, true );
|
||||
|
||||
// Always enable netname layers, as their visibility is controlled by layer dependencies
|
||||
for( int i = NETNAMES_LAYER_ID_START; i < NETNAMES_LAYER_ID_END; ++i )
|
||||
m_view->SetLayerVisible( i, true );
|
||||
@ -706,19 +699,6 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
|
||||
m_view->SetRequired( LAYER_VIA_BBLIND, LAYER_VIAS );
|
||||
m_view->SetRequired( LAYER_VIA_THROUGH, LAYER_VIAS );
|
||||
|
||||
// Pad visibility
|
||||
m_view->SetRequired( LAYER_PADS_TH, LAYER_PADS );
|
||||
m_view->SetRequired( LAYER_PADS_SMD_FR, LAYER_PADS );
|
||||
m_view->SetRequired( LAYER_PADS_SMD_BK, LAYER_PADS );
|
||||
|
||||
// Front footprints
|
||||
m_view->SetRequired( LAYER_PADS_SMD_FR, F_Cu );
|
||||
m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PADS_SMD_FR );
|
||||
|
||||
// Back footprints
|
||||
m_view->SetRequired( LAYER_PADS_SMD_BK, B_Cu );
|
||||
m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PADS_SMD_BK );
|
||||
|
||||
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
|
||||
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY ) ;
|
||||
m_view->SetLayerTarget( LAYER_GP_OVERLAY, KIGFX::TARGET_OVERLAY );
|
||||
|
@ -152,10 +152,6 @@ void PCB_RENDER_SETTINGS::LoadColors( const COLOR_SETTINGS* aSettings )
|
||||
m_layerColors[LAYER_PAD_PLATEDHOLES] = aSettings->GetColor( LAYER_PCB_BACKGROUND );
|
||||
m_layerColors[LAYER_VIA_NETNAMES] = aSettings->GetColor( LAYER_VIA_NETNAMES );
|
||||
m_layerColors[LAYER_PAD_NETNAMES] = aSettings->GetColor( LAYER_PAD_NETNAMES );
|
||||
m_layerColors[LAYER_PADS_SMD_FR] = aSettings->GetColor( F_Cu );
|
||||
m_layerColors[LAYER_PADS_SMD_BK] = aSettings->GetColor( B_Cu );
|
||||
m_layerColors[LAYER_PAD_FR_NETNAMES] = aSettings->GetColor( LAYER_PAD_NETNAMES );
|
||||
m_layerColors[LAYER_PAD_BK_NETNAMES] = aSettings->GetColor( LAYER_PAD_NETNAMES );
|
||||
|
||||
// Netnames for copper layers
|
||||
const COLOR4D lightLabel = aSettings->GetColor( NETNAMES_LAYER_ID_START );
|
||||
@ -218,10 +214,12 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const BOARD_ITEM* aItem, int aLayer ) con
|
||||
int holeLayer = aLayer;
|
||||
int annularRingLayer = UNDEFINED_LAYER;
|
||||
|
||||
// TODO(JE) padstacks -- this won't work, we don't know what the annular ring layer is
|
||||
// Inserting F_Cu here for now.
|
||||
if( pad && pad->GetAttribute() == PAD_ATTRIB::PTH )
|
||||
annularRingLayer = LAYER_PADS_TH;
|
||||
annularRingLayer = F_Cu;
|
||||
else if( via )
|
||||
annularRingLayer = LAYER_VIA_THROUGH;
|
||||
annularRingLayer = F_Cu;
|
||||
|
||||
if( annularRingLayer != UNDEFINED_LAYER
|
||||
&& m_layerColors[ holeLayer ] == m_layerColors[ annularRingLayer ] )
|
||||
@ -237,11 +235,10 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const BOARD_ITEM* aItem, int aLayer ) con
|
||||
aLayer = aLayer - LAYER_ZONE_START;
|
||||
}
|
||||
|
||||
// Hole walls should pull from the copper layer
|
||||
if( aLayer == LAYER_PAD_HOLEWALLS )
|
||||
aLayer = LAYER_PADS_TH;
|
||||
else if( aLayer == LAYER_VIA_HOLEWALLS )
|
||||
aLayer = LAYER_VIA_THROUGH;
|
||||
// Hole walls should pull from the via hole layer since it does not vary with active copper
|
||||
// layer. For simplicity of configuration, pad hole walls can use the via color.
|
||||
else if( aLayer == LAYER_VIA_HOLEWALLS || aLayer == LAYER_PAD_HOLEWALLS )
|
||||
aLayer = LAYER_VIA_HOLES;
|
||||
|
||||
// Show via mask layers if appropriate
|
||||
if( aLayer == LAYER_VIA_THROUGH && !m_isPrinting )
|
||||
@ -345,9 +342,8 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const BOARD_ITEM* aItem, int aLayer ) con
|
||||
|
||||
switch( originalLayer )
|
||||
{
|
||||
case LAYER_PADS_SMD_FR:
|
||||
case LAYER_PADS_SMD_BK:
|
||||
case LAYER_PADS_TH:
|
||||
// TODO(JE) not sure if this is needed
|
||||
case LAYER_PADS:
|
||||
{
|
||||
const PAD* pad = static_cast<const PAD*>( aItem );
|
||||
|
||||
|
@ -171,9 +171,6 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
|
||||
setVisibility( LAYER_FP_REFERENCES );
|
||||
setVisibility( LAYER_FP_TEXT );
|
||||
setVisibility( LAYER_PADS );
|
||||
setVisibility( LAYER_PADS_SMD_FR );
|
||||
setVisibility( LAYER_PADS_SMD_BK );
|
||||
setVisibility( LAYER_PADS_TH );
|
||||
|
||||
setVisibility( LAYER_TRACKS );
|
||||
setVisibility( LAYER_VIAS );
|
||||
@ -194,18 +191,8 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
|
||||
}
|
||||
else
|
||||
{
|
||||
// Draw layers that must be not visible on printing are set to an invisible layer
|
||||
// LAYER_PADS_SMD_FR, LAYER_PADS_SMD_BK and LAYER_PADS_TH must be enabled to print pads on
|
||||
// technical layers, but not the pad on copper layer(s) if they are not enabled
|
||||
|
||||
if( !aLayerSet.test( F_Cu ) )
|
||||
renderSettings->SetLayerColor( LAYER_PADS_SMD_FR, invisible_color );
|
||||
|
||||
if( !aLayerSet.test( B_Cu ) )
|
||||
renderSettings->SetLayerColor( LAYER_PADS_SMD_BK, invisible_color );
|
||||
|
||||
// Enable items on copper layers, but do not draw holes
|
||||
for( GAL_LAYER_ID layer : { LAYER_PADS_TH, LAYER_VIA_THROUGH, LAYER_VIA_MICROVIA, LAYER_VIA_BBLIND } )
|
||||
for( GAL_LAYER_ID layer : { LAYER_VIA_THROUGH, LAYER_VIA_MICROVIA, LAYER_VIA_BBLIND } )
|
||||
{
|
||||
if( ( aLayerSet & LSET::AllCuMask() ).any() ) // Items visible on any copper layer
|
||||
aView.SetLayerVisible( layer, true );
|
||||
@ -222,7 +209,7 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
|
||||
LAYER_FOOTPRINTS_FR, LAYER_FOOTPRINTS_BK,
|
||||
LAYER_TRACKS, LAYER_VIAS,
|
||||
LAYER_ZONES, LAYER_SHAPES,
|
||||
LAYER_PADS, LAYER_PADS_SMD_FR, LAYER_PADS_SMD_BK, LAYER_PADS_TH
|
||||
LAYER_PADS
|
||||
};
|
||||
|
||||
for( int layer : alwaysEnabled )
|
||||
|
@ -958,7 +958,6 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
||||
migrateLegacyColor( "Color4DAuxItems", LAYER_AUX_ITEMS );
|
||||
migrateLegacyColor( "Color4DGrid", LAYER_GRID );
|
||||
migrateLegacyColor( "Color4DNonPlatedEx", LAYER_NON_PLATEDHOLES );
|
||||
migrateLegacyColor( "Color4DPadThruHoleEx", LAYER_PADS_TH );
|
||||
migrateLegacyColor( "Color4DPCBBackground", LAYER_PCB_BACKGROUND );
|
||||
migrateLegacyColor( "Color4DPCBCursor", LAYER_CURSOR );
|
||||
migrateLegacyColor( "Color4DRatsEx", LAYER_RATSNEST );
|
||||
|
@ -779,9 +779,9 @@ const GENERAL_COLLECTORS_GUIDE PCB_SELECTION_TOOL::getCollectorsGuide() const
|
||||
guide.SetIgnoreFPTextOnFront( !board()->IsElementVisible( LAYER_FP_TEXT ) );
|
||||
guide.SetIgnoreFootprintsOnBack( !board()->IsElementVisible( LAYER_FOOTPRINTS_BK ) );
|
||||
guide.SetIgnoreFootprintsOnFront( !board()->IsElementVisible( LAYER_FOOTPRINTS_FR ) );
|
||||
guide.SetIgnorePadsOnBack( padsDisabled || ! board()->IsElementVisible( LAYER_PADS_SMD_BK ) );
|
||||
guide.SetIgnorePadsOnFront( padsDisabled || ! board()->IsElementVisible( LAYER_PADS_SMD_FR ) );
|
||||
guide.SetIgnoreThroughHolePads( padsDisabled || ! board()->IsElementVisible( LAYER_PADS_TH ) );
|
||||
guide.SetIgnorePadsOnBack( padsDisabled );
|
||||
guide.SetIgnorePadsOnFront( padsDisabled );
|
||||
guide.SetIgnoreThroughHolePads( padsDisabled );
|
||||
guide.SetIgnoreFPValues( !board()->IsElementVisible( LAYER_FP_VALUES ) );
|
||||
guide.SetIgnoreFPReferences( !board()->IsElementVisible( LAYER_FP_REFERENCES ) );
|
||||
guide.SetIgnoreThroughVias( ! board()->IsElementVisible( LAYER_VIAS ) );
|
||||
@ -3049,10 +3049,6 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
||||
|
||||
if( pad->GetAttribute() == PAD_ATTRIB::PTH || pad->GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
{
|
||||
// Check render mode (from the Items tab) first
|
||||
if( !board()->IsElementVisible( LAYER_PADS_TH ) )
|
||||
return false;
|
||||
|
||||
// A pad's hole is visible on every layer the pad is visible on plus many layers the
|
||||
// pad is not visible on -- so we only need to check for any visible hole layers.
|
||||
if( !( visibleLayers() & LSET::PhysicalLayersMask() ).any() )
|
||||
@ -3060,12 +3056,6 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check render mode (from the Items tab) first
|
||||
if( pad->IsOnLayer( F_Cu ) && !board()->IsElementVisible( LAYER_PADS_SMD_FR ) )
|
||||
return false;
|
||||
else if( pad->IsOnLayer( B_Cu ) && !board()->IsElementVisible( LAYER_PADS_SMD_BK ) )
|
||||
return false;
|
||||
|
||||
if( !( pad->GetLayerSet() & visibleLayers() ).any() )
|
||||
return false;
|
||||
}
|
||||
|
@ -335,7 +335,6 @@ const APPEARANCE_CONTROLS::APPEARANCE_SETTING APPEARANCE_CONTROLS::s_objectSetti
|
||||
RR(),
|
||||
RR( _HKI( "Footprints Front" ), LAYER_FOOTPRINTS_FR, _HKI( "Show footprints that are on board's front" ) ),
|
||||
RR( _HKI( "Footprints Back" ), LAYER_FOOTPRINTS_BK, _HKI( "Show footprints that are on board's back" ) ),
|
||||
RR( _HKI( "Through-hole Pads" ), LAYER_PADS_TH, _HKI( "Show through-hole pads" ) ),
|
||||
RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ),
|
||||
RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ),
|
||||
RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ),
|
||||
@ -360,7 +359,6 @@ static std::set<int> s_allowedInFpEditor =
|
||||
LAYER_PADS,
|
||||
LAYER_ZONES,
|
||||
LAYER_SHAPES,
|
||||
LAYER_PADS_TH,
|
||||
LAYER_FP_VALUES,
|
||||
LAYER_FP_REFERENCES,
|
||||
LAYER_FP_TEXT,
|
||||
@ -3033,11 +3031,6 @@ void APPEARANCE_CONTROLS::OnColorSwatchChanged( wxCommandEvent& aEvent )
|
||||
if( IsCopperLayer( layer ) )
|
||||
view->UpdateLayerColor( ZONE_LAYER_FOR( layer ) );
|
||||
|
||||
if( layer == F_Cu )
|
||||
view->UpdateLayerColor( LAYER_PADS_SMD_FR );
|
||||
else if( layer == B_Cu )
|
||||
view->UpdateLayerColor( LAYER_PADS_SMD_BK );
|
||||
|
||||
// Update the bitmap of the layer box
|
||||
if( m_frame->IsType( FRAME_PCB_EDITOR ) )
|
||||
static_cast<PCB_EDIT_FRAME*>( m_frame )->ReCreateLayerBox( false );
|
||||
|
Loading…
Reference in New Issue
Block a user