Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselationhelpers.cpp

    r6a7f78c re138de  
    7777
    7878  if (fabs(m11) < MYEPSILON)
    79     eLog() << Verbose(1) << "three points are colinear." << endl;
     79    eLog() << Verbose(0) << "ERROR: three points are colinear." << endl;
    8080
    8181  center->x[0] =  0.5 * m12/ m11;
     
    8484
    8585  if (fabs(a.Distance(center) - RADIUS) > MYEPSILON)
    86     eLog() << Verbose(1) << "The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;
     86    eLog() << Verbose(0) << "ERROR: The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;
    8787
    8888  gsl_matrix_free(A);
     
    187187  gamma = M_PI - SideA.Angle(&SideB);
    188188  //Log() << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl;
    189   if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON) {
    190     eLog() << Verbose(1) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl;
    191   }
     189  if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON)
     190    eLog() << Verbose(0) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl;
    192191
    193192  Center->Zero();
     
    225224  // test whether new center is on the parameter circle's plane
    226225  if (fabs(helper.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) {
    227     eLog() << Verbose(1) << "Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal))  << "!" << endl;
     226    eLog() << Verbose(0) << "ERROR: Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal))  << "!" << endl;
    228227    helper.ProjectOntoPlane(&CirclePlaneNormal);
    229228  }
     
    231230  // test whether the new center vector has length of CircleRadius
    232231  if (fabs(radius - CircleRadius) > HULLEPSILON)
    233     eLog() << Verbose(1) << "The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
     232    eLog() << Verbose(1) << "ERROR: The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
    234233  alpha = helper.Angle(&OldSphereCenter);
    235234  // make the angle unique by checking the halfplanes/search direction
     
    462461  for (int i=0;i<3;i++)
    463462    for (int j=i+1; j<3; j++) {
    464       if (nodes[i] == NULL) {
    465         Log() << Verbose(1) << "Node nr. " << i << " is not yet present." << endl;
    466         result = true;
    467       } else if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) {  // there already is a line
     463      if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) {  // there already is a line
    468464        LineMap::const_iterator FindLine;
    469465        pair<LineMap::const_iterator,LineMap::const_iterator> FindPair;
     
    495491  Vector BaseLineVector, OrthogonalVector, helper;
    496492  if (candidate1->BaseLine != candidate2->BaseLine) {  // sanity check
    497     eLog() << Verbose(1) << "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
     493    Log() << Verbose(0) << "ERROR: sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
    498494    //return false;
    499495    exit(1);
     
    578574          }
    579575        } else {
    580           eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","
     576          eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
    581577            << LC->n[2] << " is invalid!" << endl;
    582578        }
     
    634630          }
    635631        } else {
    636           eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","
     632          eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
    637633            << LC->n[2] << " is invalid!" << endl;
    638634        }
     
    742738    }
    743739  } else {
    744     eLog() << Verbose(1) << "Given vrmlfile is " << vrmlfile << "." << endl;
     740    eLog() << Verbose(0) << "ERROR: Given vrmlfile is " << vrmlfile << "." << endl;
    745741  }
    746742  delete(center);
     
    756752{
    757753  Vector helper;
    758 
    759   if (Tess->LastTriangle != NULL) {
    760     // include the current position of the virtual sphere in the temporary raster3d file
    761     Vector *center = cloud->GetCenter();
    762     // make the circumsphere's center absolute again
    763     helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node);
    764     helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node);
    765     helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node);
    766     helper.Scale(1./3.);
    767     helper.SubtractVector(center);
    768     // and add to file plus translucency object
    769     *rasterfile << "# current virtual sphere\n";
    770     *rasterfile << "8\n  25.0    0.6     -1.0 -1.0 -1.0     0.2        0 0 0 0\n";
    771     *rasterfile << "2\n  " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n";
    772     *rasterfile << "9\n  terminating special property\n";
    773     delete(center);
    774   }
     754  // include the current position of the virtual sphere in the temporary raster3d file
     755  Vector *center = cloud->GetCenter();
     756  // make the circumsphere's center absolute again
     757  helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node);
     758  helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node);
     759  helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node);
     760  helper.Scale(1./3.);
     761  helper.SubtractVector(center);
     762  // and add to file plus translucency object
     763  *rasterfile << "# current virtual sphere\n";
     764  *rasterfile << "8\n  25.0    0.6     -1.0 -1.0 -1.0     0.2        0 0 0 0\n";
     765  *rasterfile << "2\n  " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n";
     766  *rasterfile << "9\n  terminating special property\n";
     767  delete(center);
    775768};
    776769
     
    815808    *rasterfile << "9\n#  terminating special property\n";
    816809  } else {
    817     eLog() << Verbose(1) << "Given rasterfile is " << rasterfile << "." << endl;
     810    eLog() << Verbose(0) << "ERROR: Given rasterfile is " << rasterfile << "." << endl;
    818811  }
    819812  IncludeSphereinRaster3D(rasterfile, Tess, cloud);
     
    832825    *tecplot << "TITLE = \"3D CONVEX SHELL\"" << endl;
    833826    *tecplot << "VARIABLES = \"X\" \"Y\" \"Z\" \"U\"" << endl;
    834     *tecplot << "ZONE T=\"";
    835     if (N < 0) {
    836       *tecplot << cloud->GetName();
    837     } else {
    838       *tecplot << N << "-";
    839       for (int i=0;i<3;i++)
    840         *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name;
    841     }
     827    *tecplot << "ZONE T=\"" << N << "-";
     828    for (int i=0;i<3;i++)
     829      *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name;
    842830    *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl;
    843831    int i=0;
Note: See TracChangeset for help on using the changeset viewer.