Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008
(cherry picked from commit d9a77e6a64
)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15231
This commit is contained in:
parent
391204ea0d
commit
bac1fb18f0
|
@ -1807,13 +1807,14 @@ bool DRC_ENGINE::IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
|
||||||
|
|
||||||
if( parentFootprint && parentFootprint->IsNetTie() )
|
if( parentFootprint && parentFootprint->IsNetTie() )
|
||||||
{
|
{
|
||||||
|
int epsilon = GetDesignSettings()->GetDRCEpsilon();
|
||||||
std::map<wxString, int> padToNetTieGroupMap = parentFootprint->MapPadNumbersToNetTieGroups();
|
std::map<wxString, int> padToNetTieGroupMap = parentFootprint->MapPadNumbersToNetTieGroups();
|
||||||
|
|
||||||
for( PAD* pad : parentFootprint->Pads() )
|
for( PAD* pad : parentFootprint->Pads() )
|
||||||
{
|
{
|
||||||
if( padToNetTieGroupMap[ pad->GetNumber() ] >= 0 && aTrackNetCode == pad->GetNetCode() )
|
if( padToNetTieGroupMap[ pad->GetNumber() ] >= 0 && aTrackNetCode == pad->GetNetCode() )
|
||||||
{
|
{
|
||||||
if( pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos, 0 ) )
|
if( pad->GetEffectiveShape( aTrackLayer )->Collide( aCollisionPos, epsilon ) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,8 +198,8 @@ public:
|
||||||
* Check if the given collision between a track and another item occurs during the track's
|
* Check if the given collision between a track and another item occurs during the track's
|
||||||
* entry into a net-tie pad.
|
* entry into a net-tie pad.
|
||||||
*/
|
*/
|
||||||
static bool IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
|
bool IsNetTieExclusion( int aTrackNetCode, PCB_LAYER_ID aTrackLayer,
|
||||||
const VECTOR2I& aCollisionPos, BOARD_ITEM* aCollidingItem );
|
const VECTOR2I& aCollisionPos, BOARD_ITEM* aCollidingItem );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addRule( std::shared_ptr<DRC_RULE>& rule )
|
void addRule( std::shared_ptr<DRC_RULE>& rule )
|
||||||
|
|
Loading…
Reference in New Issue