Changeset f07455 for molecuilder


Ignore:
Timestamp:
Apr 22, 2010, 3:47:22 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
af20f3
Parents:
424d3fe
Message:

FIX: Tesselation::FindStartingTriangle() returns false when no triangle could have been created.

  • this may act in the future as the beginning to some mean of increasing radii or another way to find a starting triangle.
Location:
molecuilder/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.cpp

    r424d3fe rf07455  
    980980
    981981  // 1. get starting triangle
    982   TesselStruct->FindStartingTriangle(RADIUS, LCList);
     982  if (!TesselStruct->FindStartingTriangle(RADIUS, LCList)) {
     983    DoeLog(0) && (eLog() << Verbose(0) << "No valid starting triangle found." << endl);
     984    performCriticalExit();
     985  }
    983986  if (filename != NULL) {
    984987    if ((DoSingleStepOutput && ((TesselStruct->TrianglesOnBoundary.size() % SingleStepWidth == 0)))) { // if we have a new triangle and want to output each new triangle configuration
  • molecuilder/src/tesselation.cpp

    r424d3fe rf07455  
    21812181 * \param RADIUS radius of virtual rolling sphere
    21822182 * \param *LC LinkedCell structure with neighbouring TesselPoint's
    2183  */
    2184 void Tesselation::FindStartingTriangle(const double RADIUS, const LinkedCell *LC)
     2183 * \return true - a starting triangle has been created, false - no valid triple of points found
     2184 */
     2185bool Tesselation::FindStartingTriangle(const double RADIUS, const LinkedCell *LC)
    21852186{
    21862187  Info FunctionInfo(__func__);
     
    23032304    delete BaseLine;
    23042305  }
     2306
     2307  return (BTS != NULL);
    23052308}
    23062309;
  • molecuilder/src/tesselation.hpp

    r424d3fe rf07455  
    296296
    297297    // concave envelope
    298     void FindStartingTriangle(const double RADIUS, const LinkedCell *LC);
     298    bool FindStartingTriangle(const double RADIUS, const LinkedCell *LC);
    299299    void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC);
    300300    void FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet  * const ThirdNode, const double RADIUS, const LinkedCell *LC) const;
Note: See TracChangeset for help on using the changeset viewer.