- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tesselation/tesselationhelpers.cpp
ra2a2f7 rb8d215 235 235 if (helper.ScalarProduct(SearchDirection) < -HULLEPSILON) // acos is not unique on [0, 2.*M_PI), hence extra check to decide between two half intervals 236 236 alpha = 2.*M_PI - alpha; 237 LOG( 3, "DEBUG: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << RelativeOldSphereCenter << " and resulting angle is " << alpha << ".");237 LOG(5, "DEBUG: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << RelativeOldSphereCenter << " and resulting angle is " << alpha << "."); 238 238 radius = helper.distance(RelativeOldSphereCenter); 239 239 helper.ProjectOntoPlane(NormalVector); 240 240 // check whether new center is somewhat away or at least right over the current baseline to prevent intersecting triangles 241 241 if ((radius > HULLEPSILON) || (helper.Norm() < HULLEPSILON)) { 242 LOG( 4, "DEBUG: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << ".");242 LOG(6, "DEBUG: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "."); 243 243 return alpha; 244 244 } else { 245 LOG( 3, "DEBUG: NewSphereCenter " << RelativeNewSphereCenter << " is too close to RelativeOldSphereCenter" << RelativeOldSphereCenter << ".");245 LOG(5, "DEBUG: NewSphereCenter " << RelativeNewSphereCenter << " is too close to RelativeOldSphereCenter" << RelativeOldSphereCenter << "."); 246 246 return 2.*M_PI; 247 247 } … … 278 278 } 279 279 280 LOG( 1, "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << ".");280 LOG(4, "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << "."); 281 281 282 282 return phi; … … 289 289 * \param *c third vector 290 290 * \param *d fourth vector 291 * \return \f$ \frac{1}{6} \cdot ((a-d) \times (a-c) \cdot (a-b))\f$291 * \return \f$ \frac{1}{6} | (a-d) \cdot \bigl ( (b-d) \times (c-d) \bigr ) | \f$ 292 292 */ 293 293 double CalculateVolumeofGeneralTetraeder(const Vector &a, const Vector &b, const Vector &c, const Vector &d) … … 302 302 for (int j=0;j<3;j++) 303 303 TetraederVector[j].SubtractVector(d); 304 Point = TetraederVector[ 0];305 Point.VectorProduct(TetraederVector[ 1]);306 volume = 1./6. * fabs(Point.ScalarProduct(TetraederVector[ 2]));304 Point = TetraederVector[1]; 305 Point.VectorProduct(TetraederVector[2]); 306 volume = 1./6. * fabs(Point.ScalarProduct(TetraederVector[0])); 307 307 return volume; 308 308 }; … … 545 545 Normal.VectorProduct(OtherBaseline); 546 546 Normal.Normalize(); 547 LOG( 1, "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << ".");547 LOG(3, "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << "."); 548 548 549 549 // project one offset point of OtherBase onto this plane (and add plane offset vector) … … 559 559 *Intersection = line1.getIntersection(line2); 560 560 Normal = (*Intersection) - (Base->endpoints[0]->node->getPosition()); 561 LOG( 1, "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(Baseline)/Baseline.NormSquared()) << ".");561 LOG(3, "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(Baseline)/Baseline.NormSquared()) << "."); 562 562 563 563 return Intersection; … … 751 751 *tecplot << endl; 752 752 // print connectivity 753 LOG( 1, "The following triangles were created:");753 LOG(4, "DEBUG: The following triangles were created:"); 754 754 for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) { 755 LOG( 1, " " << runner->second->endpoints[0]->node->getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName());755 LOG(4, " " << runner->second->endpoints[0]->node->getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName()); 756 756 *tecplot << LookupList[runner->second->endpoints[0]->node->getNr()] << " " << LookupList[runner->second->endpoints[1]->node->getNr()] << " " << LookupList[runner->second->endpoints[2]->node->getNr()] << endl; 757 757 } … … 778 778 for (PointMap::const_iterator PointRunner = TesselStruct->PointsOnBoundary.begin(); PointRunner != TesselStruct->PointsOnBoundary.end(); PointRunner++) { 779 779 point = PointRunner->second; 780 LOG( 1, "INFO: Current point is " << *point << ".");780 LOG(2, "INFO: Current point is " << *point << "."); 781 781 782 782 // calculate mean concavity over all connected line
Note:
See TracChangeset
for help on using the changeset viewer.