Restore the 5.1 NetTie hack.
We really need to do first-class net ties.... Fixes https://gitlab.com/kicad/code/kicad/issues/6416
This commit is contained in:
parent
94a358c592
commit
bfc4afc506
|
@ -224,6 +224,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
static std::shared_ptr<SHAPE> getShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer )
|
||||
{
|
||||
if( aItem->Type() == PCB_PAD_T && !static_cast<PAD*>( aItem )->FlashLayer( aLayer ) )
|
||||
|
@ -248,6 +249,15 @@ static std::shared_ptr<SHAPE> getShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer )
|
|||
}
|
||||
|
||||
|
||||
static bool isNetTie( BOARD_ITEM* aItem )
|
||||
{
|
||||
if( aItem->GetParent() && aItem->GetParent()->Type() == PCB_FOOTPRINT_T )
|
||||
return static_cast<FOOTPRINT*>( aItem->GetParent() )->IsNetTie();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( TRACK* track, SHAPE* trackShape,
|
||||
PCB_LAYER_ID layer,
|
||||
BOARD_ITEM* other )
|
||||
|
@ -377,6 +387,11 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances()
|
|||
if( other->HasFlag( SKIP_STRUCT ) )
|
||||
return false;
|
||||
|
||||
// It would really be better to know what particular nets a nettie
|
||||
// should allow, but for now it is what it is.
|
||||
if( isNetTie( other ) )
|
||||
return false;
|
||||
|
||||
auto otherCItem = dynamic_cast<BOARD_CONNECTED_ITEM*>( other );
|
||||
|
||||
if( otherCItem && otherCItem->GetNetCode() == track->GetNetCode() )
|
||||
|
|
Loading…
Reference in New Issue