Pcbnew: rename ZONE* m_SolderMask to m_SolderMaskBridges
(It is a container to build bridges on solder mask layers by DRC, not real zone) Disable also this special zone selection by adding it in PCB_SELECTION_TOOL::itemPassesFilter
This commit is contained in:
parent
96f9f2c658
commit
57efde1bbb
|
@ -98,15 +98,17 @@ BOARD::BOARD() :
|
||||||
m_layers[layer].m_type = LT_UNDEFINED;
|
m_layers[layer].m_type = LT_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SolderMask = new ZONE( this );
|
// Creates a zone to show sloder mask bridges created by a min web value
|
||||||
m_SolderMask->SetLayerSet( LSET().set( F_Mask ).set( B_Mask ) );
|
// it it just to show them
|
||||||
|
m_SolderMaskBridges = new ZONE( this );
|
||||||
|
m_SolderMaskBridges->SetLayerSet( LSET().set( F_Mask ).set( B_Mask ) );
|
||||||
int infinity = ( std::numeric_limits<int>::max() / 2 ) - pcbIUScale.mmToIU( 1 );
|
int infinity = ( std::numeric_limits<int>::max() / 2 ) - pcbIUScale.mmToIU( 1 );
|
||||||
m_SolderMask->Outline()->NewOutline();
|
m_SolderMaskBridges->Outline()->NewOutline();
|
||||||
m_SolderMask->Outline()->Append( VECTOR2I( -infinity, -infinity ) );
|
m_SolderMaskBridges->Outline()->Append( VECTOR2I( -infinity, -infinity ) );
|
||||||
m_SolderMask->Outline()->Append( VECTOR2I( -infinity, +infinity ) );
|
m_SolderMaskBridges->Outline()->Append( VECTOR2I( -infinity, +infinity ) );
|
||||||
m_SolderMask->Outline()->Append( VECTOR2I( +infinity, +infinity ) );
|
m_SolderMaskBridges->Outline()->Append( VECTOR2I( +infinity, +infinity ) );
|
||||||
m_SolderMask->Outline()->Append( VECTOR2I( +infinity, -infinity ) );
|
m_SolderMaskBridges->Outline()->Append( VECTOR2I( +infinity, -infinity ) );
|
||||||
m_SolderMask->SetMinThickness( 0 );
|
m_SolderMaskBridges->SetMinThickness( 0 );
|
||||||
|
|
||||||
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
||||||
|
|
||||||
|
@ -148,7 +150,7 @@ BOARD::~BOARD()
|
||||||
|
|
||||||
m_zones.clear();
|
m_zones.clear();
|
||||||
|
|
||||||
delete m_SolderMask;
|
delete m_SolderMaskBridges;
|
||||||
|
|
||||||
for( FOOTPRINT* footprint : m_footprints )
|
for( FOOTPRINT* footprint : m_footprints )
|
||||||
delete footprint;
|
delete footprint;
|
||||||
|
|
|
@ -1208,7 +1208,7 @@ public:
|
||||||
std::vector<ZONE*> m_DRCCopperZones;
|
std::vector<ZONE*> m_DRCCopperZones;
|
||||||
int m_DRCMaxClearance;
|
int m_DRCMaxClearance;
|
||||||
int m_DRCMaxPhysicalClearance;
|
int m_DRCMaxPhysicalClearance;
|
||||||
ZONE* m_SolderMask;
|
ZONE* m_SolderMaskBridges; // A container to build bridges on solder mask layers
|
||||||
std::map<ZONE*, std::map<PCB_LAYER_ID, ISOLATED_ISLANDS>> m_ZoneIsolatedIslandsMap;
|
std::map<ZONE*, std::map<PCB_LAYER_ID, ISOLATED_ISLANDS>> m_ZoneIsolatedIslandsMap;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -112,7 +112,7 @@ private:
|
||||||
|
|
||||||
void DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees( BOARD_ITEM* aItem )
|
void DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees( BOARD_ITEM* aItem )
|
||||||
{
|
{
|
||||||
ZONE* solderMask = m_board->m_SolderMask;
|
ZONE* solderMask = m_board->m_SolderMaskBridges;
|
||||||
|
|
||||||
if( aItem->Type() == PCB_ZONE_T )
|
if( aItem->Type() == PCB_ZONE_T )
|
||||||
{
|
{
|
||||||
|
@ -192,7 +192,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees( BOARD_ITEM* aItem )
|
||||||
|
|
||||||
void DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees()
|
void DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees()
|
||||||
{
|
{
|
||||||
ZONE* solderMask = m_board->m_SolderMask;
|
ZONE* solderMask = m_board->m_SolderMaskBridges;
|
||||||
LSET layers = { 4, F_Mask, B_Mask, F_Cu, B_Cu };
|
LSET layers = { 4, F_Mask, B_Mask, F_Cu, B_Cu };
|
||||||
|
|
||||||
const size_t progressDelta = 500;
|
const size_t progressDelta = 500;
|
||||||
|
|
|
@ -497,8 +497,8 @@ void PCB_BASE_FRAME::HideSolderMask()
|
||||||
{
|
{
|
||||||
KIGFX::PCB_VIEW* view = GetCanvas()->GetView();
|
KIGFX::PCB_VIEW* view = GetCanvas()->GetView();
|
||||||
|
|
||||||
if( view && GetBoard()->m_SolderMask && view->HasItem( GetBoard()->m_SolderMask ) )
|
if( view && GetBoard()->m_SolderMaskBridges && view->HasItem( GetBoard()->m_SolderMaskBridges ) )
|
||||||
view->Remove( GetBoard()->m_SolderMask );
|
view->Remove( GetBoard()->m_SolderMaskBridges );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -506,12 +506,12 @@ void PCB_BASE_FRAME::ShowSolderMask()
|
||||||
{
|
{
|
||||||
KIGFX::PCB_VIEW* view = GetCanvas()->GetView();
|
KIGFX::PCB_VIEW* view = GetCanvas()->GetView();
|
||||||
|
|
||||||
if( view && GetBoard()->m_SolderMask )
|
if( view && GetBoard()->m_SolderMaskBridges )
|
||||||
{
|
{
|
||||||
if( view->HasItem( GetBoard()->m_SolderMask ) )
|
if( view->HasItem( GetBoard()->m_SolderMaskBridges ) )
|
||||||
view->Remove( GetBoard()->m_SolderMask );
|
view->Remove( GetBoard()->m_SolderMaskBridges );
|
||||||
|
|
||||||
view->Add( GetBoard()->m_SolderMask );
|
view->Add( GetBoard()->m_SolderMaskBridges );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2390,6 +2390,12 @@ bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// m_SolderMaskBridges zone is a special zone, only used to showsolder mask briges
|
||||||
|
// after running DRC. it is not really a board item.
|
||||||
|
// Never select it or delete by a Commit.
|
||||||
|
if( zone == m_frame->GetBoard()->m_SolderMaskBridges )
|
||||||
|
return false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue