Add DRCEpsilon to net-tie-exclusion testing.

Fixes https://gitlab.com/kicad/code/kicad/issues/14008
This commit is contained in:
Jeff Young 2023-02-23 13:48:16 +00:00
parent 4bb508eacf
commit d9a77e6a64
2 changed files with 4 additions and 3 deletions

View File

@ -1772,13 +1772,14 @@ bool DRC_ENGINE::IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
if( parentFootprint && parentFootprint->IsNetTie() )
{
int epsilon = GetDesignSettings()->GetDRCEpsilon();
std::map<wxString, int> padToNetTieGroupMap = parentFootprint->MapPadNumbersToNetTieGroups();
for( PAD* pad : parentFootprint->Pads() )
{
if( padToNetTieGroupMap[ pad->GetNumber() ] >= 0 && aTrackNetCode == pad->GetNetCode() )
{
if( pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos, 0 ) )
if( pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos, epsilon ) )
return true;
}
}

View File

@ -198,8 +198,8 @@ public:
* Check if the given collision between a track and another item occurs during the track's
* entry into a net-tie pad.
*/
static bool IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
const VECTOR2I& aCollisionPos, BOARD_ITEM* aCollidingItem );
bool IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
const VECTOR2I& aCollisionPos, BOARD_ITEM* aCollidingItem );
private:
void addRule( std::shared_ptr<DRC_RULE>& rule )