diff --git a/pcbnew/router/pns_diff_pair_placer.cpp b/pcbnew/router/pns_diff_pair_placer.cpp index cddc9b093c..8a33d333fb 100644 --- a/pcbnew/router/pns_diff_pair_placer.cpp +++ b/pcbnew/router/pns_diff_pair_placer.cpp @@ -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 ); diff --git a/pcbnew/router/pns_dp_meander_placer.cpp b/pcbnew/router/pns_dp_meander_placer.cpp index 8d5797b339..d4102ce84d 100644 --- a/pcbnew/router/pns_dp_meander_placer.cpp +++ b/pcbnew/router/pns_dp_meander_placer.cpp @@ -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 ); diff --git a/pcbnew/router/pns_dp_meander_placer.h b/pcbnew/router/pns_dp_meander_placer.h index 22b36dc63f..7fa9532c98 100644 --- a/pcbnew/router/pns_dp_meander_placer.h +++ b/pcbnew/router/pns_dp_meander_placer.h @@ -115,7 +115,8 @@ 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();