debug.cpp

Go to the documentation of this file.
00001 /**
00002  *\file         debug.cpp
00003  *
00004  *\brief        routines to test the consistency of B-rep data structure.
00005  *
00006  *              For the moment, only check that all edges in a loop have the same parent loop link.
00007  *
00008  *\author       Xianming Chen\n
00009  *              Computer Science Department\n
00010  *              University of Utah
00011  *
00012  *\date         16 Aug 2006\n
00013  *              Copyright (c) 2006, University of Utah
00014  */
00015 
00016 
00017 #include "euler.h"
00018 
00019 
00020 namespace euler
00021 {
00022 
00023   bool solid_t :: assert_consistent_B_rep()
00024   {
00025     solid_t* s = solid;
00026     while(s)
00027     {
00028       for(face_t *f = s->f; f; f=f->nxt)
00029       {
00030         for(loop_t* l = f->l; l; l=l->nxt)
00031         {
00032           edge_t* e = l->e, *e0 = e;
00033           do
00034           {
00035             if(e->l != l) { *(int*)(0) = 0;  return false; }
00036           }
00037           while( (e=e->nxt) != e0 );
00038         }
00039       }
00040       s = s->nxt;
00041     }
00042     return true;
00043   }
00044   
00045 
00046 
00047 
00048 
00049 
00050 }//end namespace euler

Generated on Wed Aug 30 16:27:58 2006 for euler by  doxygen 1.4.6