Ignore:
Timestamp:
Nov 10, 2009, 8:59:00 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
418117a
Parents:
2fbbc96
Message:

Attempt to fix tesselation for case 1_2-dimethylbenzene.

  • The issue is still the strongly degenerated end of the molecule, that is very flat.
  • new function: Tesselation::HasOtherBaselineBetterCandidate() - checks whether for the two other baselines of a proposed triangle there isn't an even better candidate
  • Tesselation::FindNextSuitableTriangle() uses the above function.
  • FindNonConvexBorder() - instead of jumping to end() if a new line was attempted, we jump to the beginning but only if new line was created succesfully.
  • DoSingleStepOutput reactived for this debugging.
  • Where the newly installed tesselations did only fail for this molecule, now they fail for all and some segfault. Only this runs through cleanly.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.cpp

    r2fbbc96 r09d3b8  
    994994  while ((baseline != TesselStruct->LinesOnBoundary.end()) || (OneLoopWithoutSuccessFlag)) {
    995995    if (baseline->second->triangles.size() == 1) {
     996      CheckListOfBaselines(TesselStruct);
    996997      // 3. find next triangle
    997998      TesselationFailFlag = TesselStruct->FindNextSuitableTriangle(*(baseline->second), *(((baseline->second->triangles.begin()))->second), RADIUS, LCList); //the line is there, so there is a triangle, but only one.
    998999      OneLoopWithoutSuccessFlag = OneLoopWithoutSuccessFlag || TesselationFailFlag;
    9991000      if (!TesselationFailFlag)
    1000         eLog() << Verbose(0) << "WARNING: FindNextSuitableTriangle failed." << endl;
     1001        eLog() << Verbose(2) << "FindNextSuitableTriangle failed." << endl;
    10011002
    10021003      // write temporary envelope
     
    10061007        }
    10071008      }
    1008       baseline = TesselStruct->LinesOnBoundary.end();
    1009       Log() << Verbose(2) << "Baseline set to end." << endl;
     1009      if (TesselationFailFlag) {
     1010        baseline = TesselStruct->LinesOnBoundary.begin();
     1011        OneLoopWithoutSuccessFlag = false;
     1012        Log() << Verbose(2) << "Baseline set to begin." << endl;
     1013      }
    10101014    } else {
    10111015      //Log() << Verbose(1) << "Line " << *baseline->second << " has " << baseline->second->triangles.size() << " triangles adjacent" << endl;
    10121016      if (baseline->second->triangles.size() != 2)
    1013         Log() << Verbose(1) << "ERROR: TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl;
     1017        eLog() << Verbose(1) << "TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl;
    10141018    }
    10151019
Note: See TracChangeset for help on using the changeset viewer.