Changeset 8f9a8e
- Timestamp:
- Aug 7, 2009, 9:12:19 AM (16 years ago)
- Children:
- 0fc0b5
- Parents:
- e1a46d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/tesselation.cpp
re1a46d r8f9a8e 1101 1101 ; 1102 1102 1103 1104 1105 1103 /** Checks whether the triangle consisting of the three points is already present. 1106 1104 * Searches for the points in Tesselation::PointsOnBoundary and checks their … … 1327 1325 cout << Verbose(0) << "Begin of Find_next_suitable_triangle\n"; 1328 1326 bool result = true; 1327 bool degenerateTriangle = false; 1329 1328 CandidateList *Opt_Candidates = new CandidateList(); 1330 1329 … … 1423 1422 AddTrianglePoint(BaseRay->endpoints[1]->node, 2); 1424 1423 1425 AddTriangleLine(TPS[0], TPS[1], 0); 1426 AddTriangleLine(TPS[0], TPS[2], 1); 1427 AddTriangleLine(TPS[1], TPS[2], 2); 1428 1429 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1430 AddTriangle(); 1431 (*it)->OptCenter.Scale(-1.); 1432 BTS->GetNormalVector((*it)->OptCenter); 1433 (*it)->OptCenter.Scale(-1.); 1434 1435 cout << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector 1436 << " for this triangle ... " << endl; 1424 if (CheckLineCriteriaforDegeneratedTriangle(TPS)) { 1425 AddTriangleLine(TPS[0], TPS[1], 0); 1426 AddTriangleLine(TPS[0], TPS[2], 1); 1427 AddTriangleLine(TPS[1], TPS[2], 2); 1428 1429 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1430 AddTriangle(); 1431 (*it)->OptCenter.Scale(-1.); 1432 BTS->GetNormalVector((*it)->OptCenter); 1433 (*it)->OptCenter.Scale(-1.); 1434 1435 cout << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector 1436 << " for this triangle ... " << endl; 1437 1437 //cout << Verbose(1) << "We have "<< TrianglesOnBoundaryCount << " for line " << *BaseRay << "." << endl; 1438 } else { 1439 cout << Verbose(1) << "WARNING: This triangle consisting of "; 1440 cout << *(*it)->point << ", "; 1441 cout << *BaseRay->endpoints[0]->node << " and "; 1442 cout << *BaseRay->endpoints[1]->node << " "; 1443 cout << "exists and is not added, as it does not seem helpful!" << endl; 1444 result = false; 1445 } 1438 1446 } else if (existentTrianglesCount == 1) { // If there is a planar region within the structure, we need this triangle a second time. 1439 1447 AddTrianglePoint((*it)->point, 0); … … 1449 1457 1450 1458 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1451 AddTriangle(); 1459 AddTriangle(); // add to global map 1452 1460 1453 1461 (*it)->OtherOptCenter.Scale(-1.); … … 1802 1810 1803 1811 // check for three unique points 1804 //cout << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate-> x<< "." << endl;1812 //cout << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate->node << "." << endl; 1805 1813 if ((Candidate != BaseLine->endpoints[0]->node) && (Candidate != BaseLine->endpoints[1]->node) ){ 1806 1814 … … 1863 1871 } else { 1864 1872 if ((optCandidate != NULL) && (optCandidate->point != NULL)) { 1865 //cout << Verbose(2) << "REJECT: Old candidate : " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl;1873 //cout << Verbose(2) << "REJECT: Old candidate " << *(optCandidate->point) << " with " << *ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl; 1866 1874 } else { 1867 1875 //cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; … … 1870 1878 1871 1879 } else { 1872 //cout << Verbose(2) << "REJECT: NewSphereCenter " << NewSphereCenter << " is too far away: " << radius << "." << endl;1880 //cout << Verbose(2) << "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << "." << endl; 1873 1881 } 1874 1882 } else {
Note:
See TracChangeset
for help on using the changeset viewer.