mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Fixed bug where via violations were sometimes counted multiple times.
This commit is contained in:
parent
71224ca4bc
commit
850c773f9d
@ -148,12 +148,17 @@ bool DRC_TEST_PROVIDER_FANOUT_CHECKS::Run()
|
|||||||
|
|
||||||
if( track->Type() == PCB_VIA_T )
|
if( track->Type() == PCB_VIA_T )
|
||||||
{
|
{
|
||||||
|
if( visited.contains( track ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
PCB_VIA* via = static_cast<PCB_VIA*>( track );
|
PCB_VIA* via = static_cast<PCB_VIA*>( track );
|
||||||
|
|
||||||
int len = length + (point - via->GetPosition()).EuclideanNorm() - via->GetDrill();
|
int len = length + (point - via->GetPosition()).EuclideanNorm() - via->GetDrill();
|
||||||
|
|
||||||
if( len < length_limit )
|
if( len < length_limit )
|
||||||
{
|
{
|
||||||
|
visited.emplace( track );
|
||||||
|
|
||||||
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_PAD_FANOUT_VIA_DISTANCE );
|
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_PAD_FANOUT_VIA_DISTANCE );
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
@ -171,7 +176,6 @@ bool DRC_TEST_PROVIDER_FANOUT_CHECKS::Run()
|
|||||||
}
|
}
|
||||||
else if( track->Type() == PCB_ARC_T )
|
else if( track->Type() == PCB_ARC_T )
|
||||||
{
|
{
|
||||||
// TODO: Figure out how to support arcs.
|
|
||||||
PCB_ARC* arc = static_cast<PCB_ARC*>( track );
|
PCB_ARC* arc = static_cast<PCB_ARC*>( track );
|
||||||
|
|
||||||
SHAPE_ARC arc_shape { arc->GetStart(), arc->GetMid(), arc->GetEnd(), arc->GetWidth() };
|
SHAPE_ARC arc_shape { arc->GetStart(), arc->GetMid(), arc->GetEnd(), arc->GetWidth() };
|
||||||
@ -232,7 +236,7 @@ bool DRC_TEST_PROVIDER_FANOUT_CHECKS::Run()
|
|||||||
shortest = c.Distance( point );
|
shortest = c.Distance( point );
|
||||||
p = c;
|
p = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
int len = length + shortest;
|
int len = length + shortest;
|
||||||
|
|
||||||
if( len > length_limit * 2 )
|
if( len > length_limit * 2 )
|
||||||
@ -407,7 +411,7 @@ bool DRC_TEST_PROVIDER_FANOUT_CHECKS::Run()
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// pad fanout symmetry is easiest to be calculated using torque and net force.
|
// pad fanout symmetry is easiest to be calculated using torque and net force.
|
||||||
// Both need to be net zero for the fanout to be symmetric.
|
// Both need to be net zero for the fanout to be symmetric.
|
||||||
// Force is calculated using connected width.
|
// Force is calculated using connected width.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user