diff --git a/katana/src/Manipulator.cpp b/katana/src/Manipulator.cpp index f29e591ee..23fd68724 100644 --- a/katana/src/Manipulator.cpp +++ b/katana/src/Manipulator.cpp @@ -724,12 +724,16 @@ namespace Katana { cdebug_log(159,0) << "[1] WDensity[1]=" << gcells[1]->getWDensity(1) << " " << gcells[1] << endl; for ( size_t i = 2; i+1 < gcells.size() ; ++i ) { - cdebug_log(159,0) << "[" << i << "] WDensity[1]=" << gcells[i]->getWDensity(1) + cdebug_log(159,0) << "[" << i + << "] WDensity[1]=" << gcells[i]->getWDensity(1) + << " WDensity[2]=" << gcells[i]->getWDensity(2) << " " << gcells[i] << endl; - if (gcells[i]->getWDensity(1) < candidate->getWDensity(1)) - candidate = gcells[i]; + if (gcells[i]->getWDensity(1) < 0.7) { + if (gcells[i]->getWDensity(2) < candidate->getWDensity(2)) + candidate = gcells[i]; + } } - if (candidate->getWDensity(1) < 0.5) { + if (candidate->getWDensity(1) < 0.7) { TrackElement* dogleg = nullptr; TrackElement* parallel = nullptr; cdebug_log(159,0) << "Making dogleg in " << candidate << endl; diff --git a/katana/src/SegmentFsm.cpp b/katana/src/SegmentFsm.cpp index c211d2981..c29c3f7ce 100644 --- a/katana/src/SegmentFsm.cpp +++ b/katana/src/SegmentFsm.cpp @@ -84,6 +84,7 @@ namespace { inline size_t Cs1Candidate::getEnd () const { return _end; } inline size_t Cs1Candidate::getSize () const { return _conflicts.size(); } inline Interval Cs1Candidate::getLongestConflict () const { return _longestConflict; } + inline DbU::Unit Cs1Candidate::getConflictLength () const { return _conflictLength; } inline DbU::Unit Cs1Candidate::getBreakPos () const { return _breakPos; } inline void Cs1Candidate::setBegin ( size_t i ) { _begin=i; } inline void Cs1Candidate::setEnd ( size_t i ) { _end=i; } @@ -980,7 +981,7 @@ namespace Katana { | ((_data1 and (_data1->getStateCount() < 2)) ? Manipulator::AllowExpand : Manipulator::NoExpand); - cdebug_log(159,0) << "SegmentFsm::conflictSolveByPlaceds()" << endl; + cdebug_log(159,1) << "SegmentFsm::conflictSolveByPlaceds()" << endl; cdebug_log(159,0) << "| Candidates Tracks: " << endl; segment->base()->getConstraints( constraints ); @@ -996,6 +997,7 @@ namespace Katana { , getString(plane).c_str() , DbU::getValueString(constraints.getVMin()).c_str() ) << endl; + cdebug_tabw(159,-1); return false; } @@ -1065,9 +1067,19 @@ namespace Katana { sort( candidates.begin(), candidates.end() ); + cdebug_log(159,0) << "Conflict track candidates:" << endl; for ( size_t icandidate=0 ; icandidateisVH() and (segment->getDepth() == 1)) { + cdebug_log(159,0) << "VH gauge case." << endl; if (Manipulator(segment,*this).makeDogleg(overlap0,Flags::ShortDogleg)) { - //cerr << "Break using ShortDogleg." << endl; success = true; break; } + // else { + // cdebug_log(159,0) << "Second try with expaned overlap " << overlap0 << endl; + // overlap0.inflate( Session::getSliceHeight() ); + // if (Manipulator(segment,*this).makeDogleg(overlap0,Flags::ShortDogleg)) { + // success = true; + // break; + // } + // } } else { cdebug_log(159,0) << "conflictSolveByPlaceds() other->isGlobal():" << other->isGlobal() << endl; if (other->isGlobal()) { @@ -1134,6 +1154,7 @@ namespace Katana { success = true; } + cdebug_tabw(159,-1); return success; } @@ -1484,7 +1505,8 @@ namespace Katana { if (Session::getConfiguration()->isVH() and segment->getLength() < 6*Session::getSliceHeight()) { cdebug_log(159,0) << "Global, SegmentFsm: RipupPerpandiculars." << endl; - break; + success = manipulator.ripupPerpandiculars(); + if (success) break; } } case DataNegociate::Slacken: