Subversion Repositories gelsvn

Rev

Rev 129 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 129 Rev 183
Line 24... Line 24...
24
 
24
 
25
		void check_boundary_consistency(VertexIter v)
25
		void check_boundary_consistency(VertexIter v)
26
		{
26
		{
27
				HalfEdgeIter h = v->he;
27
				HalfEdgeIter h = v->he;
28
				HalfEdgeIter h0 = h;
28
				HalfEdgeIter h0 = h;
29
#ifndef NDEBUG
-
 
30
				int k=0;
-
 
31
#endif
29
 
32
				while(h->face != NULL_FACE_ITER)
30
				while(h->face != NULL_FACE_ITER)
33
				{
31
				{
34
						assert(h->prev != NULL_HALFEDGE_ITER);
-
 
35
						assert(h->prev->opp != NULL_HALFEDGE_ITER);
-
 
36
#ifndef NDEBUG
-
 
37
						if(++k == 1e6) 
-
 
38
						{
-
 
39
								cout << __FILE__ << __LINE__ 
-
 
40
										 << " : Oops infinite loop around vertex" << endl;
-
 
41
								return;
-
 
42
						}
-
 
43
#endif
-
 
44
						h = h->prev->opp;
32
						h = h->prev->opp;
45
						if(h==h0) return;
33
						if(h==h0) return;
46
				}
34
				}
47
 
35
 
48
				v->he = h;
36
				v->he = h;
49
				HalfEdgeIter h_opp = v->he->opp;
37
				HalfEdgeIter h_opp = h->opp;
50
				while(h_opp->face != NULL_FACE_ITER)
38
				while(h_opp->face != NULL_FACE_ITER)
51
						h_opp = h_opp->next->opp;
39
						h_opp = h_opp->next->opp;
52
				h_opp->next = h;
40
				h_opp->vert = v;
53
				h->prev = h_opp;
41
				link(h_opp,h);
54
		}
42
		}
55
 
43
 
56
		int valency(VertexIter v) 
44
		int valency(VertexIter v) 
57
		{
45
		{
58
				VertexCirculator vc(v);
46
				VertexCirculator vc(v);