router: pick similar starting shapes for the diff pairs, not the very nearest one
This commit is contained in:
parent
346b721156
commit
b4fd9f3ed5
|
@ -540,7 +540,14 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
|
||||||
|
|
||||||
double dist = ( *anchor - *refAnchor ).EuclideanNorm();
|
double dist = ( *anchor - *refAnchor ).EuclideanNorm();
|
||||||
|
|
||||||
if( dist < bestDist )
|
bool shapeMatches = true;
|
||||||
|
|
||||||
|
if( item->OfKind( PNS_ITEM::SOLID ) && item->Layers() != aItem->Layers() )
|
||||||
|
{
|
||||||
|
shapeMatches = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( dist < bestDist && shapeMatches )
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
bestDist = dist;
|
bestDist = dist;
|
||||||
|
|
|
@ -111,6 +111,16 @@ public:
|
||||||
return PNS_LAYERSET( 0, 256 ); // fixme: use layer IDs header
|
return PNS_LAYERSET( 0, 256 ); // fixme: use layer IDs header
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==( const PNS_LAYERSET& aOther ) const
|
||||||
|
{
|
||||||
|
return ( m_start == aOther.m_start ) && ( m_end == aOther.m_end );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!=( const PNS_LAYERSET& aOther ) const
|
||||||
|
{
|
||||||
|
return ( m_start != aOther.m_start ) || ( m_end != aOther.m_end );
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_start;
|
int m_start;
|
||||||
int m_end;
|
int m_end;
|
||||||
|
|
Loading…
Reference in New Issue