From ecda00e1542e3bcdf8947bec8e27a0089b84c985 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 3 Nov 2022 10:36:44 +0100 Subject: [PATCH] Adjustments in AutoSegment::canReduce() and TrackSegment::canRealign(). * Change: In AutoSegment::canReduce(), allow reduction, when in channel mode, for bottom connected jumpers at depth 1. Forbidden otherwise as it may cause problems with the terminals (in OTC). * Change: In TrackSegment::canRealign(), allow realignement of reduced segments. What really needs to be checked is that it do not have perpandiculars in reduced state. --- anabatic/src/AutoSegment.cpp | 3 ++- katana/src/TrackSegment.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/anabatic/src/AutoSegment.cpp b/anabatic/src/AutoSegment.cpp index 2f623e53..60ef6f7f 100644 --- a/anabatic/src/AutoSegment.cpp +++ b/anabatic/src/AutoSegment.cpp @@ -1808,7 +1808,8 @@ namespace Anabatic { return false; } - if ((getDepth() == 1) and isSpinBottom()) return false; + if (not Session::getAnabatic()->isChannelMode() + and (getDepth() == 1) and isSpinBottom()) return false; if ((flags & Flags::WithPerpands) and _reduceds) return false; cdebug_log(159,0) << " source:" << source->isHTee() << "+" << source->isVTee() << endl; diff --git a/katana/src/TrackSegment.cpp b/katana/src/TrackSegment.cpp index b5391e88..e6a5728c 100644 --- a/katana/src/TrackSegment.cpp +++ b/katana/src/TrackSegment.cpp @@ -623,7 +623,7 @@ namespace Katana { bool TrackSegment::canRealign () const { - if (isGlobal() or isNonPref() or isReduced()) return false; + if (isGlobal() or isNonPref() /*or isReduced()*/) return false; for ( TrackElement* perpandicular : const_cast(this)->getPerpandiculars() ) { if (perpandicular->isReduced()) return false; }