Change via keep-start-end to be start/end, not top/bottom.
The implementation used to always check F_Cu and B_Cu, rather than where the via started and ended (which will be different for blind/ buried vias and microvias).
This commit is contained in:
parent
199743e8b0
commit
1aad2fb37b
|
@ -106,7 +106,7 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
{
|
||||
if( !via->GetRemoveUnconnected() )
|
||||
return 0;
|
||||
else if( via->GetKeepTopBottom() )
|
||||
else if( via->GetKeepStartEnd() )
|
||||
return 1;
|
||||
else
|
||||
return 2;
|
||||
|
@ -607,11 +607,11 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
|
|||
break;
|
||||
case 1:
|
||||
v->SetRemoveUnconnected( true );
|
||||
v->SetKeepTopBottom( true );
|
||||
v->SetKeepStartEnd( true );
|
||||
break;
|
||||
case 2:
|
||||
v->SetRemoveUnconnected( true );
|
||||
v->SetKeepTopBottom( false );
|
||||
v->SetKeepStartEnd( false );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -93,7 +93,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow()
|
|||
{
|
||||
PCB_VIA* via = static_cast<PCB_VIA*>( item );
|
||||
via->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE );
|
||||
via->SetKeepTopBottom( m_cbPreservePads->IsChecked() );
|
||||
via->SetKeepStartEnd( m_cbPreservePads->IsChecked() );
|
||||
}
|
||||
|
||||
if( item->Type() == PCB_FOOTPRINT_T && m_cbPads->IsChecked() )
|
||||
|
@ -142,7 +142,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow()
|
|||
m_commit.Modify( item );
|
||||
PCB_VIA* via = static_cast<PCB_VIA*>( item );
|
||||
via->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE );
|
||||
via->SetKeepTopBottom( m_cbPreservePads->IsChecked() );
|
||||
via->SetKeepStartEnd( m_cbPreservePads->IsChecked() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ PCB_VIA::PCB_VIA( BOARD_ITEM* aParent ) :
|
|||
SetDrillDefault();
|
||||
|
||||
m_removeUnconnectedLayer = false;
|
||||
m_keepTopBottomLayer = true;
|
||||
m_keepStartEndLayer = true;
|
||||
|
||||
for( size_t ii = 0; ii < arrayDim( m_zoneLayerConnections ); ++ii )
|
||||
m_zoneLayerConnections[ ii ] = ZLC_UNCONNECTED;
|
||||
|
@ -615,7 +615,7 @@ bool PCB_VIA::FlashLayer( int aLayer ) const
|
|||
if( !m_removeUnconnectedLayer )
|
||||
return true;
|
||||
|
||||
if( m_keepTopBottomLayer && ( aLayer == m_layer || aLayer == m_bottomLayer ) )
|
||||
if( m_keepStartEndLayer && ( aLayer == m_layer || aLayer == m_bottomLayer ) )
|
||||
return true;
|
||||
|
||||
// Must be static to keep from raising its ugly head in performance profiles
|
||||
|
|
|
@ -474,17 +474,17 @@ public:
|
|||
bool GetRemoveUnconnected() const { return m_removeUnconnectedLayer; }
|
||||
|
||||
/**
|
||||
* Sets whether we keep the top and bottom connections even if they are not connected
|
||||
* Sets whether we keep the start and end annular rings even if they are not connected
|
||||
*/
|
||||
void SetKeepTopBottom( bool aSet ) { m_keepTopBottomLayer = aSet; }
|
||||
bool GetKeepTopBottom() const { return m_keepTopBottomLayer; }
|
||||
void SetKeepStartEnd( bool aSet ) { m_keepStartEndLayer = aSet; }
|
||||
bool GetKeepStartEnd() const { return m_keepStartEndLayer; }
|
||||
|
||||
bool ConditionallyFlashed( PCB_LAYER_ID aLayer ) const
|
||||
{
|
||||
if( !m_removeUnconnectedLayer )
|
||||
return false;
|
||||
|
||||
if( m_keepTopBottomLayer && ( aLayer == F_Cu || aLayer == B_Cu ) )
|
||||
if( m_keepStartEndLayer && ( aLayer == m_layer || aLayer == m_bottomLayer ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -574,8 +574,8 @@ private:
|
|||
|
||||
int m_drill; ///< for vias: via drill (- 1 for default value)
|
||||
|
||||
bool m_removeUnconnectedLayer; ///< Remove unconnected copper on a via
|
||||
bool m_keepTopBottomLayer; ///< Keep the top and bottom annular rings
|
||||
bool m_removeUnconnectedLayer; ///< Remove annular rings on unconnected layers
|
||||
bool m_keepStartEndLayer; ///< Keep the start and end annular rings
|
||||
bool m_isFree; ///< "Free" vias don't get their nets auto-updated
|
||||
|
||||
mutable ZONE_LAYER_CONNECTION m_zoneLayerConnections[B_Cu + 1];
|
||||
|
|
|
@ -5369,7 +5369,7 @@ PCB_VIA* PCB_PARSER::parsePCB_VIA()
|
|||
|
||||
// File format default is no-token == no-feature.
|
||||
via->SetRemoveUnconnected( false );
|
||||
via->SetKeepTopBottom( false );
|
||||
via->SetKeepStartEnd( false );
|
||||
|
||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||
{
|
||||
|
@ -5438,7 +5438,7 @@ PCB_VIA* PCB_PARSER::parsePCB_VIA()
|
|||
break;
|
||||
|
||||
case T_keep_end_layers:
|
||||
via->SetKeepTopBottom( true );
|
||||
via->SetKeepStartEnd( true );
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
|
|
|
@ -2146,7 +2146,7 @@ void PCB_PLUGIN::format( const PCB_TRACK* aTrack, int aNestLevel ) const
|
|||
{
|
||||
m_out->Print( 0, " (remove_unused_layers)" );
|
||||
|
||||
if( via->GetKeepTopBottom() )
|
||||
if( via->GetKeepStartEnd() )
|
||||
m_out->Print( 0, " (keep_end_layers)" );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue