Skip to content
Snippets Groups Projects
Commit 3ae166db authored by Laurent Van Migroet's avatar Laurent Van Migroet
Browse files

_DEBUG-->MYDEBUG

parent 63ae208e
Branches
Tags
No related merge requests found
// $Id: meshGFace.cpp,v 1.115 2008-02-05 14:40:30 remacle Exp $
// $Id: meshGFace.cpp,v 1.116 2008-02-06 11:15:01 miegroet Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -901,7 +901,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
std::map<GEntity*,std::vector<SPoint2> > meshes;
std::map<GEntity*,std::vector<SPoint2> > meshes_seam;
const int _DEBUG = false;
const int MYDEBUG = false;
std::map<BDS_Point*,MVertex*> recover_map;
......@@ -910,7 +910,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
GEdgeLoop::iter it = gel.begin();
if (_DEBUG)printf("face %d with %d edges case %d\n",gf->tag(), (int)gf->edges().size(),seam_the_first);
if (MYDEBUG)printf("face %d with %d edges case %d\n",gf->tag(), (int)gf->edges().size(),seam_the_first);
while (it != gel.end())
{
......@@ -957,7 +957,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
while (unordered.size())
{
if (_DEBUG)printf("unordered.size() = %d\n",unordered.size());
if (MYDEBUG)printf("unordered.size() = %d\n",unordered.size());
std::list<GEdgeSigned>::iterator it = unordered.begin();
std::vector<SPoint2> coords;
......@@ -986,19 +986,19 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
found = (*it);
}
unordered.erase(it);
if (_DEBUG)printf("Starting with edge = %d seam %d\n",(*it).ge->tag(),seam);
if (MYDEBUG)printf("Starting with edge = %d seam %d\n",(*it).ge->tag(),seam);
break;
}
else
{
if (_DEBUG)printf("Followed by edge = %d\n",(*it).ge->tag());
if (MYDEBUG)printf("Followed by edge = %d\n",(*it).ge->tag());
SPoint2 first_coord = mesh1d[0];
double d=-1,d_reversed=-1,d_seam=-1,d_seam_reversed=-1;
d = dist2(last_coord,first_coord);
if (_DEBUG)printf("%g %g dist = %12.5E\n",first_coord.x(),first_coord.y(),d);
if (MYDEBUG)printf("%g %g dist = %12.5E\n",first_coord.x(),first_coord.y(),d);
if (d < tol)
{
// if (_DEBUG)printf("d = %12.5E %d\n",d, (int)coords.size());
// if (MYDEBUG)printf("d = %12.5E %d\n",d, (int)coords.size());
coords.clear();
coords = mesh1d;
found = GEdgeSigned(1,ge);
......@@ -1007,10 +1007,10 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
}
SPoint2 first_coord_reversed = mesh1d_reversed[0];
d_reversed = dist2(last_coord,first_coord_reversed);
if (_DEBUG)printf("%g %g dist_reversed = %12.5E\n",first_coord_reversed.x(),first_coord_reversed.y(),d_reversed);
if (MYDEBUG)printf("%g %g dist_reversed = %12.5E\n",first_coord_reversed.x(),first_coord_reversed.y(),d_reversed);
if (d_reversed < tol)
{
// if (_DEBUG)printf("d_r = %12.5E\n",d_reversed);
// if (MYDEBUG)printf("d_r = %12.5E\n",d_reversed);
coords.clear();
coords = mesh1d_reversed;
found = (GEdgeSigned(-1,ge));
......@@ -1022,7 +1022,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
SPoint2 first_coord_seam = mesh1d_seam[0];
SPoint2 first_coord_seam_reversed = mesh1d_seam_reversed[0];
d_seam = dist2(last_coord,first_coord_seam);
if (_DEBUG)printf("dist_seam = %12.5E\n",d_seam);
if (MYDEBUG)printf("dist_seam = %12.5E\n",d_seam);
if (d_seam < tol)
{
coords.clear();
......@@ -1032,7 +1032,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
goto Finalize;
}
d_seam_reversed = dist2(last_coord,first_coord_seam_reversed);
if (_DEBUG)printf("dist_seam_reversed = %12.5E\n",d_seam_reversed);
if (MYDEBUG)printf("dist_seam_reversed = %12.5E\n",d_seam_reversed);
if (d_seam_reversed < tol)
{
coords.clear();
......@@ -1048,7 +1048,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
}
Finalize:
if (_DEBUG)printf("Finalize, found %d points\n",coords.size());
if (MYDEBUG)printf("Finalize, found %d points\n",coords.size());
if (coords.size() == 0){
// It has not worked : either tolerance is wrong or the first seam edge
// has to be taken with the other parametric coordinates (because it is
......@@ -1074,7 +1074,7 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
edgeLoop.push_back(found.ge->mesh_vertices[i]);
}
if (_DEBUG)printf("edge %d size %d size %d\n",found.ge->tag(), (int)edgeLoop.size(), (int)coords.size());
if (MYDEBUG)printf("edge %d size %d size %d\n",found.ge->tag(), (int)edgeLoop.size(), (int)coords.size());
std::vector<BDS_Point*> edgeLoop_BDS;
for (unsigned int i=0;i<edgeLoop.size();i++)
......@@ -1109,14 +1109,14 @@ bool buildConsecutiveListOfVertices ( GFace *gf,
m->add_geom (ge->tag(), ge->dim());
BDS_GeomEntity *g = m->get_geom(ge->tag(),ge->dim());
pp->g = g;
if (_DEBUG)printf("point %3d (%8.5f %8.5f : %8.5f %8.5f) (%2d,%2d)\n",count,pp->u,pp->v,param.x(),param.y(),pp->g->classif_tag,pp->g->classif_degree);
if (MYDEBUG)printf("point %3d (%8.5f %8.5f : %8.5f %8.5f) (%2d,%2d)\n",count,pp->u,pp->v,param.x(),param.y(),pp->g->classif_tag,pp->g->classif_degree);
bbox += SPoint3(U,V,0);
edgeLoop_BDS.push_back(pp);
recover_map[pp] = here;
count++;
}
last_coord = coords[coords.size()-1];
if (_DEBUG)printf("last coord %g %g\n",last_coord.x(),last_coord.y());
if (MYDEBUG)printf("last coord %g %g\n",last_coord.x(),last_coord.y());
result.insert(result.end(),edgeLoop_BDS.begin(),edgeLoop_BDS.end());
// for (unsigned int i=0;i<result.size();i++)
// {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment