Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselationhelpers.cpp

    re138de r6a7f78c  
    7777
    7878  if (fabs(m11) < MYEPSILON)
    79     eLog() << Verbose(0) << "ERROR: three points are colinear." << endl;
     79    eLog() << Verbose(1) << "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(0) << "ERROR: The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;
     86    eLog() << Verbose(1) << "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(0) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - 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  }
    191192
    192193  Center->Zero();
     
    224225  // test whether new center is on the parameter circle's plane
    225226  if (fabs(helper.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) {
    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;
     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;
    227228    helper.ProjectOntoPlane(&CirclePlaneNormal);
    228229  }
     
    230231  // test whether the new center vector has length of CircleRadius
    231232  if (fabs(radius - CircleRadius) > HULLEPSILON)
    232     eLog() << Verbose(1) << "ERROR: The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
     233    eLog() << Verbose(1) << "The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
    233234  alpha = helper.Angle(&OldSphereCenter);
    234235  // make the angle unique by checking the halfplanes/search direction
     
    461462  for (int i=0;i<3;i++)
    462463    for (int j=i+1; j<3; j++) {
    463       if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) {  // there already is a line
     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
    464468        LineMap::const_iterator FindLine;
    465469        pair<LineMap::const_iterator,LineMap::const_iterator> FindPair;
     
    491495  Vector BaseLineVector, OrthogonalVector, helper;
    492496  if (candidate1->BaseLine != candidate2->BaseLine) {  // sanity check
    493     Log() << Verbose(0) << "ERROR: sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
     497    eLog() << Verbose(1) << "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
    494498    //return false;
    495499    exit(1);
     
    574578          }
    575579        } else {
    576           eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
     580          eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","
    577581            << LC->n[2] << " is invalid!" << endl;
    578582        }
     
    630634          }
    631635        } else {
    632           eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
     636          eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","
    633637            << LC->n[2] << " is invalid!" << endl;
    634638        }
     
    738742    }
    739743  } else {
    740     eLog() << Verbose(0) << "ERROR: Given vrmlfile is " << vrmlfile << "." << endl;
     744    eLog() << Verbose(1) << "Given vrmlfile is " << vrmlfile << "." << endl;
    741745  }
    742746  delete(center);
     
    752756{
    753757  Vector helper;
    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);
     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  }
    768775};
    769776
     
    808815    *rasterfile << "9\n#  terminating special property\n";
    809816  } else {
    810     eLog() << Verbose(0) << "ERROR: Given rasterfile is " << rasterfile << "." << endl;
     817    eLog() << Verbose(1) << "Given rasterfile is " << rasterfile << "." << endl;
    811818  }
    812819  IncludeSphereinRaster3D(rasterfile, Tess, cloud);
     
    825832    *tecplot << "TITLE = \"3D CONVEX SHELL\"" << endl;
    826833    *tecplot << "VARIABLES = \"X\" \"Y\" \"Z\" \"U\"" << endl;
    827     *tecplot << "ZONE T=\"" << N << "-";
    828     for (int i=0;i<3;i++)
    829       *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name;
     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    }
    830842    *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl;
    831843    int i=0;
Note: See TracChangeset for help on using the changeset viewer.