|
|
|
@ -40,7 +40,7 @@ |
|
|
|
using boost::optional; |
|
|
|
|
|
|
|
PNS_DIFF_PAIR_PLACER::PNS_DIFF_PAIR_PLACER( PNS_ROUTER* aRouter ) : |
|
|
|
PNS_PLACEMENT_ALGO ( aRouter ) |
|
|
|
PNS_PLACEMENT_ALGO( aRouter ) |
|
|
|
{ |
|
|
|
m_state = RT_START; |
|
|
|
m_chainedPlacement = false; |
|
|
|
@ -121,6 +121,7 @@ bool PNS_DIFF_PAIR_PLACER::rhMarkObstacles( const VECTOR2I& aP ) |
|
|
|
bool collN = static_cast<bool>( m_currentNode->CheckColliding( &m_currentTrace.NLine() ) ); |
|
|
|
|
|
|
|
m_fitOk = !( collP || collN ) ; |
|
|
|
|
|
|
|
return m_fitOk; |
|
|
|
} |
|
|
|
|
|
|
|
@ -304,9 +305,9 @@ bool PNS_DIFF_PAIR_PLACER::route( const VECTOR2I& aP ) |
|
|
|
case RM_MarkObstacles: |
|
|
|
return rhMarkObstacles( aP ); |
|
|
|
case RM_Walkaround: |
|
|
|
return rhWalkOnly ( aP ); |
|
|
|
return rhWalkOnly( aP ); |
|
|
|
case RM_Shove: |
|
|
|
return rhShoveOnly ( aP ); |
|
|
|
return rhShoveOnly( aP ); |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
@ -319,7 +320,7 @@ bool PNS_DIFF_PAIR_PLACER::rhShoveOnly( const VECTOR2I& aP ) |
|
|
|
{ |
|
|
|
m_currentNode = m_shove->CurrentNode(); |
|
|
|
|
|
|
|
bool ok = routeHead ( aP ); |
|
|
|
bool ok = routeHead( aP ); |
|
|
|
|
|
|
|
m_fitOk = false; |
|
|
|
|
|
|
|
@ -529,7 +530,7 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI |
|
|
|
double bestDist = std::numeric_limits<double>::max(); |
|
|
|
bool found = false; |
|
|
|
|
|
|
|
BOOST_FOREACH(PNS_ITEM* item, items ) |
|
|
|
BOOST_FOREACH( PNS_ITEM* item, items ) |
|
|
|
{ |
|
|
|
if( item->Kind() == aItem->Kind() ) |
|
|
|
{ |
|
|
|
@ -748,8 +749,8 @@ bool PNS_DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) |
|
|
|
|
|
|
|
if( !m_snapOnTarget && !m_currentTrace.EndsWithVias() ) |
|
|
|
{ |
|
|
|
SHAPE_LINE_CHAIN newP ( m_currentTrace.CP() ); |
|
|
|
SHAPE_LINE_CHAIN newN ( m_currentTrace.CN() ); |
|
|
|
SHAPE_LINE_CHAIN newP( m_currentTrace.CP() ); |
|
|
|
SHAPE_LINE_CHAIN newN( m_currentTrace.CN() ); |
|
|
|
|
|
|
|
if( newP.SegmentCount() > 1 && newN.SegmentCount() > 1 ) |
|
|
|
{ |
|
|
|
@ -765,8 +766,11 @@ bool PNS_DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) |
|
|
|
m_lastNode->Add( m_currentTrace.PLine().Via().Clone() ); |
|
|
|
m_lastNode->Add( m_currentTrace.NLine().Via().Clone() ); |
|
|
|
m_chainedPlacement = false; |
|
|
|
} else |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
m_chainedPlacement = !m_snapOnTarget; |
|
|
|
} |
|
|
|
|
|
|
|
PNS_LINE lineP( m_currentTrace.PLine() ); |
|
|
|
PNS_LINE lineN( m_currentTrace.NLine() ); |
|
|
|
|