router: don't cross DP lines when length tuning, fix swap pair polarity bug
Fixes: lp:1798500 * https://bugs.launchpad.net/kicad/+bug/1798500 Fixes: lp:1798221 * https://bugs.launchpad.net/kicad/+bug/1798221
This commit is contained in:
parent
ff992f4a64
commit
eea949ce0a
|
@ -503,7 +503,7 @@ bool DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, ITEM* aItem,
|
|||
found = true;
|
||||
bestDist = dist;
|
||||
|
||||
if( refNet == netP )
|
||||
if( refNet != netP )
|
||||
{
|
||||
aPair = DP_PRIMITIVE_PAIR ( item, primRef );
|
||||
aPair.SetAnchors( *anchor, *refAnchor );
|
||||
|
|
|
@ -150,7 +150,7 @@ const SEG DP_MEANDER_PLACER::baselineSegment( const DIFF_PAIR::COUPLED_SEGMENTS&
|
|||
}
|
||||
|
||||
|
||||
static bool pairOrientation( const DIFF_PAIR::COUPLED_SEGMENTS& aPair )
|
||||
bool DP_MEANDER_PLACER::pairOrientation( const DIFF_PAIR::COUPLED_SEGMENTS& aPair )
|
||||
{
|
||||
VECTOR2I midp = ( aPair.coupledP.A + aPair.coupledN.A ) / 2;
|
||||
|
||||
|
@ -197,7 +197,7 @@ bool DP_MEANDER_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
|||
|
||||
int offset = ( tuned.Gap() + tuned.Width() ) / 2;
|
||||
|
||||
if( !pairOrientation( coupledSegments[0] ) )
|
||||
if( pairOrientation( coupledSegments[0] ) )
|
||||
offset *= -1;
|
||||
|
||||
m_result.SetBaselineOffset( offset );
|
||||
|
|
|
@ -115,6 +115,7 @@ private:
|
|||
// void addCorner ( const VECTOR2I& aP );
|
||||
|
||||
const SEG baselineSegment( const DIFF_PAIR::COUPLED_SEGMENTS& aCoupledSegs );
|
||||
bool pairOrientation( const DIFF_PAIR::COUPLED_SEGMENTS& aPair );
|
||||
|
||||
void setWorld( NODE* aWorld );
|
||||
void release();
|
||||
|
|
Loading…
Reference in New Issue