Special case for very-short tracks was killing both-ends-in-a-zone.

(And doing so randomly as if the closer endpoint to the zone center
was the one without a pad then it would get marked as good, while if
it was the other way around we'd notch 2 connections for the pad end
and none for the other end.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13420
This commit is contained in:
Jeff Young 2023-01-09 13:28:06 +00:00
parent 4dad07eef6
commit e916b715d5
1 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2017 CERN
* Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@ -755,6 +755,12 @@ bool CONNECTIVITY_DATA::TestTrackEndpointDangling( PCB_TRACK* aTrack, VECTOR2I*
if( hitStart && hitEnd )
{
if( zone )
{
// Both start and end in a zone: track may be redundant, but it's not dangling
return false;
}
if( getMinDist( item, aTrack->GetStart() ) < getMinDist( item, aTrack->GetEnd() ) )
start_count++;
else