Skip move in meander placers if points match.

This commit is contained in:
Alex Shvartzkop 2023-10-07 06:00:25 +03:00 committed by dsa-t
parent 8b21a260c9
commit ce8849f8bc
2 changed files with 6 additions and 2 deletions

View File

@ -163,7 +163,8 @@ bool DP_MEANDER_PLACER::pairOrientation( const DIFF_PAIR::COUPLED_SEGMENTS& aPai
bool DP_MEANDER_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
{
// return false;
if( m_currentStart == aP )
return false;
DIFF_PAIR::COUPLED_SEGMENTS_VEC coupledSegments;

View File

@ -107,13 +107,16 @@ bool MEANDER_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
bool MEANDER_PLACER::doMove( const VECTOR2I& aP, ITEM* aEndItem, long long int aTargetLength )
{
SHAPE_LINE_CHAIN pre, tuned, post;
if( m_currentStart == aP )
return false;
if( m_currentNode )
delete m_currentNode;
m_currentNode = m_world->Branch();
SHAPE_LINE_CHAIN pre, tuned, post;
m_originLine.CLine().Split( m_currentStart, aP, pre, tuned, post );
m_result = MEANDERED_LINE( this, false );