debug printouts

This commit is contained in:
Andreas Fabri 2014-02-13 19:46:03 +01:00
parent 1fb697f162
commit 422c7b87f7
2 changed files with 38 additions and 7 deletions

View File

@ -79,7 +79,7 @@ public:
#ifdef CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR
template <typename IT>
Intrusive_list(IT first, IT last)
: f(), b(), n(0)
: f(), b(), n(0)
{
if(first == last){
return;
@ -89,7 +89,7 @@ public:
Type_handle ch = f;
++n;
++first;
while(first != last){
while(first != last){
if((ch != Type(*first)) && ((*first)->next_intrusive()==Type_handle())){
// not yet inserted
ch->set_next_intrusive(*first);
@ -194,9 +194,9 @@ public:
if(pos != Type_handle()){
if(pos == b){
pos = Type_handle(); // past the end
}else {
}else {
pos = pos->next_intrusive();
}
}
}
return *this;
}
@ -669,7 +669,7 @@ private:
Facet mirror = tr_.mirror_facet(facet);
return ( (mirror<facet)?mirror:facet );
#else
Cell_handle n = c->neighbor(i);
Cell_handle n = c->neighbor(i);
if(c < n){
return Facet(c,i);
}else{
@ -2031,6 +2031,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
it != vertex_to_proj.end() ;
++it )
{
std::cout << "vp " << (*it)->ts << "\t" << (*it)->point() << std::endl;
Point_3 new_pos = project_on_surface((*it)->point(),*it);
if ( new_pos != Point_3() )
@ -2479,6 +2480,27 @@ get_least_square_surface_plane(const Vertex_handle& v,
const int& i = fit->second;
surface_point_vector.push_back(cell->get_facet_surface_center(i));
/*
if(cell->ts == 658591 || cell->ts == 658596)
{
for( typename Facet_vector::iterator fit2 = facets.begin() ;
fit2 != facets.end() ;
++fit2 )
{
Cell_handle c = fit2->first;
int ii = fit2->second;
std::cout << " f "<< ii << " " << c->ts
<<": " << c->get_facet_surface_center(ii)
<< std::endl;
Facet mf = tr_.mirror_facet(*fit2);
c = mf.first;
ii = mf.second;
std::cout << " fn "<< ii << " " << c->ts
<<": " << c->get_facet_surface_center(ii)
<< std::endl;
}
}
*/
}
}
@ -2704,7 +2726,7 @@ fill_modified_vertices(InputIterator cells_begin,
{
for ( int i=0 ; i<4 ; ++i )
{
// Insert vertices if not already inserted
// Insert vertices if not already inserted
const Vertex_handle& current_vertex = (*it)->vertex(i);
if ( !tr_.is_infinite(current_vertex)
&& already_inserted_vertices.insert(current_vertex).second )

View File

@ -292,15 +292,19 @@ operator()(int nb_iterations, Visitor visitor)
int i = -1;
while ( ++i < nb_iterations && ! is_time_limit_reached() )
{
std::cout << "ODT iteration " << i << std::endl;
if(!do_freeze_)
nb_frozen_points_ = 0;
else
nb_vertices_moved = moving_vertices.size();
// Compute move for each vertex
Moves_vector moves = compute_moves(moving_vertices);
visitor.after_compute_moves();
incident(c3t3_);
//Pb with Freeze : sometimes a few vertices continue moving indefinitely
//if the nb of moving vertices is < 1% of total nb AND does not decrease
if(do_freeze_
@ -318,6 +322,7 @@ operator()(int nb_iterations, Visitor visitor)
break;
// Update mesh with those moves
update_mesh(moves, moving_vertices, visitor);
visitor.end_of_iteration(i);
@ -452,13 +457,17 @@ compute_move(const Vertex_handle& v)
// Get move from move function
Vector_3 move = move_function_(v, incident_cells, c3t3_, sizing_field_);
// Project surface vertex
if ( c3t3_.in_dimension(v) == 2 )
{
Point_3 new_position = translate(v->point(),move);
move = vector(v->point(), helper_.project_on_surface(new_position,v));
}
//std::cout << "mv " << v->point()
// << "\t to " << translate(v->point(),move)
// << "\t(ts = "<< v->ts <<")"
// << "\t(d = "<< c3t3_.in_dimension(v) <<")" << std::endl;
FT local_sq_size = min_circumradius_sq_length(v, incident_cells);
if ( FT(0) == local_sq_size )