Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] CGAL::Uncertain_conversion_exception at run time

Subject: CGAL users discussion list

List archive

[cgal-discuss] CGAL::Uncertain_conversion_exception at run time


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] CGAL::Uncertain_conversion_exception at run time
  • Date: Sun, 8 Feb 2009 05:41:58 +0100 (CET)

Hi All,

I am getting uncertain conversion exception for following code snippet. I have
put only the relevant part of code here. I am getting this exception in the
incident_cells method.
..............
..............
typedef CGAL::Exact_predicates_inexact_constructions_kernel K1;
typedef CGAL::Triangulation_cell_base_3<K1> Cb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh;
typedef CGAL::Triangulation_data_structure_3<Vbh,Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K1,Tds> Dt;
typedef CGAL::Triangulation_hierarchy_3<Dt> Dh;
.............
.............
Dh T(P.begin(),P.end());
............
Dh::Vertex_handle random_vh;
............
cout<<"degree of the random vertex : "<<T.degree(random_vh);
std::list<Dh::Cell_handle>::iterator cell_iter;
T.incident_cells(random_vh,cell_iter);*****************The exception
line***********
...........
...........

Here is the line in the incident_cells method where the debugger is pointing
out the error(highlighted with '*' line):
incident_cells(const Vertex_handle& v, OutputIterator cells) const
{
CGAL_triangulation_precondition( v != Vertex_handle() );
CGAL_triangulation_expensive_precondition( is_vertex(v) );

if ( dimension() < 2 )
return cells;

std::vector<Cell_handle> tmp_cells;
tmp_cells.reserve(64);
if ( dimension() == 3 )
incident_cells_3(v, v->cell(),
std::make_pair(std::back_inserter(tmp_cells),
Emptyset_iterator()));
else
incident_cells_2(v, v->cell(), std::back_inserter(tmp_cells));

for(typename std::vector<Cell_handle>::iterator cit = tmp_cells.begin();
cit != tmp_cells.end(); ++cit) {
(*cit)->set_in_conflict_flag(0);
*cells++ = *cit; ***************************The exception
line********************
}
return cells;
}


Please point out where am I doing the mistake.

Thanks
Avanindra


  • [cgal-discuss] CGAL::Uncertain_conversion_exception at run time, avanindra.singh, 02/08/2009

Archive powered by MHonArc 2.6.16.

Top of Page