Changeset 20895b for molecuilder/src/tesselation.cpp
- Timestamp:
- Nov 4, 2009, 5:34:05 PM (16 years ago)
- Children:
- 5f1d021
- Parents:
- c1b76e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/tesselation.cpp
rc1b76e r20895b 2538 2538 } else { 2539 2539 list<TesselPoint*> *connectedClosestPoints = GetCircleOfConnectedPoints(out, trianglePoints[0], x); 2540 trianglePoints[1] = connectedClosestPoints->front(); 2541 trianglePoints[2] = connectedClosestPoints->back(); 2542 for (int i=0;i<3;i++) { 2543 if (trianglePoints[i] == NULL) { 2544 *out << Verbose(1) << "ERROR: IsInnerPoint encounters serious error, point " << i << " not found." << endl; 2540 if (connectedClosestPoints != NULL) { 2541 trianglePoints[1] = connectedClosestPoints->front(); 2542 trianglePoints[2] = connectedClosestPoints->back(); 2543 for (int i=0;i<3;i++) { 2544 if (trianglePoints[i] == NULL) { 2545 *out << Verbose(1) << "ERROR: IsInnerPoint encounters serious error, point " << i << " not found." << endl; 2546 } 2547 //*out << Verbose(2) << "List of triangle points:" << endl; 2548 //*out << Verbose(3) << *trianglePoints[i] << endl; 2545 2549 } 2546 //*out << Verbose(2) << "List of triangle points:" << endl; 2547 //*out << Verbose(3) << *trianglePoints[i] << endl; 2548 } 2549 2550 triangles = FindTriangles(trianglePoints); 2551 *out << Verbose(2) << "List of possible triangles:" << endl; 2552 for(list<BoundaryTriangleSet*>::iterator Runner = triangles->begin(); Runner != triangles->end(); Runner++) 2553 *out << Verbose(3) << **Runner << endl; 2554 2555 delete(connectedClosestPoints); 2550 2551 triangles = FindTriangles(trianglePoints); 2552 *out << Verbose(2) << "List of possible triangles:" << endl; 2553 for(list<BoundaryTriangleSet*>::iterator Runner = triangles->begin(); Runner != triangles->end(); Runner++) 2554 *out << Verbose(3) << **Runner << endl; 2555 2556 delete(connectedClosestPoints); 2557 } else { 2558 triangles = NULL; 2559 *out << Verbose(1) << "There is no circle of connected points!" << endl; 2560 } 2556 2561 } 2557 2562 2558 if ( triangles->empty()) {2563 if ((triangles == NULL) || (triangles->empty())) { 2559 2564 *out << Verbose(0) << "ERROR: There is no nearest triangle. Please check the tesselation structure."; 2560 2565 delete(triangles); … … 2724 2729 Vector helper; 2725 2730 2731 if (connectedPoints == NULL) { 2732 *out << Verbose(2) << "Could not find any connected points!" << endl; 2733 delete(connectedCircle); 2734 return NULL; 2735 } 2726 2736 *out << Verbose(2) << "Begin of GetCircleOfConnectedPoints" << endl; 2727 2737
Note:
See TracChangeset
for help on using the changeset viewer.