From ec52ffd9736d13a257fa664b66667b95e4d806f5 Mon Sep 17 00:00:00 2001 From: ponchio Date: Fri, 15 Jun 2007 15:04:43 +0000 Subject: [PATCH] *** empty log message *** --- vcg/complex/trimesh/create/advancing_front.h | 9 +++------ vcg/complex/trimesh/create/ball_pivoting.h | 13 ++----------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/vcg/complex/trimesh/create/advancing_front.h b/vcg/complex/trimesh/create/advancing_front.h index ba4ceab7..63570553 100644 --- a/vcg/complex/trimesh/create/advancing_front.h +++ b/vcg/complex/trimesh/create/advancing_front.h @@ -9,8 +9,6 @@ namespace vcg { namespace tri { - -extern FILE *fp; class FrontEdge { public: @@ -85,7 +83,7 @@ protected: //HACK to speed up things until i can use a seach structure // int i = mesh.face.size() - 4*(front.size()); // if(front.size() < 100) i = mesh.face.size() - 100; - i = 0; + int i = 0; if(i < 0) i = 0; for(; i < (int)mesh.face.size(); i++) { FaceType &f = mesh.face[i]; @@ -189,6 +187,7 @@ public: std::list::iterator touch = front.end(); int v2 = Place(current, touch); + if(v2 == -1) { KillEdge(ei); return false; @@ -196,13 +195,12 @@ public: assert(v2 != v0 && v2 != v1); - if(touch != front.end()) { + if(touch != front.end()) { //check for orientation and manifoldness //touch == current.previous? if(v2 == previous.v0) { if(!CheckEdge(v2, v1)) { - fprintf(fp, "killing\n"); KillEdge(ei); return false; } @@ -230,7 +228,6 @@ public: //touch == (*current.next).next } else if(v2 == next.v1) { if(!CheckEdge(v0, v2)) { - fprintf(fp, "killing\n"); KillEdge(ei); return false; } diff --git a/vcg/complex/trimesh/create/ball_pivoting.h b/vcg/complex/trimesh/create/ball_pivoting.h index 01e81bf4..b3b6e39b 100644 --- a/vcg/complex/trimesh/create/ball_pivoting.h +++ b/vcg/complex/trimesh/create/ball_pivoting.h @@ -14,8 +14,6 @@ */ namespace vcg { namespace tri { - -FILE *fp; template class BallPivoting: public AdvancingFront { public: @@ -54,12 +52,8 @@ template class BallPivoting: public AdvancingFront { if(radius == 0) radius = sqrt((this->mesh.bbox.Diag()*this->mesh.bbox.Diag())/this->mesh.vn); else - radius *= this->mesh.bbox.Diag()/100; - - fp = fopen("prova.txt", "wb+"); - fprintf(fp, "radius %lf\n", radius); + radius *= this->mesh.bbox.Diag()/100; - min_edge *= radius; max_edge *= radius; @@ -205,7 +199,6 @@ template class BallPivoting: public AdvancingFront { //select a new vertex, mark as Visited and mark as usedBit all neighbours (less than min_edge) int Place(FrontEdge &edge, std::list::iterator &touch) { - fprintf(fp, "place front.size() %d\n", this->front.size()); Point3x v0 = this->mesh.vert[edge.v0].P(); Point3x v1 = this->mesh.vert[edge.v1].P(); Point3x v2 = this->mesh.vert[edge.v2].P(); @@ -312,9 +305,7 @@ template class BallPivoting: public AdvancingFront { if(normal * newnormal < max_angle || this->nb[id] >= 2) { return -1; } - - fprintf(fp, "isB: %d\n", candidate->IsB()); - + //test if id is in some border (to return touch for(list::iterator k = this->front.begin(); k != this->front.end(); k++) if((*k).v0 == id) touch = k;