Skip to Content.
Sympa Menu

cgal-discuss - 3D Delaunay cell dual error

Subject: CGAL users discussion list

List archive

3D Delaunay cell dual error


Chronological Thread 
  • From: Ashwin Nanjappa <>
  • To: CGAL Discuss <>
  • Subject: 3D Delaunay cell dual error
  • Date: Sat, 27 Oct 2007 14:30:26 +0800

Hi,

I'm getting a run-time error when I try to get the dual of 3D Delaunay cells. Note that obtaining dual of 3D Delaunay facets works fine without any error. Anyone knows if I'm doing something wrong?

Sample code is given below:

/////////////////////////////////////////////////////////////
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Point_3<K> Point_3;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay_3;

int main()
{
// 4 sample points
Point_3 p[4];
p[0] = Point_3(0, 0, 0);
p[1] = Point_3(2, 0, 0);
p[2] = Point_3(1, 3, 1);
p[3] = Point_3(2, 2, 0);

// Create Delaunay triangulation
Delaunay_3 d;
for (unsigned int i = 0; i < 4; ++i)
d.insert(p[i]);

// Sanity check on triangulation
d.is_valid(true);

// Iterate through delaunay cells
for (Delaunay_3::Finite_cells_iterator i = d.finite_cells_begin();
i != d.finite_cells_end(); ++i)
{
Delaunay_3::Cell c = *i;
Point_3 vvp = d.dual(&c); // dual() call causes error!!!
}

return 0;
}

/////////////////////////////////////////////////////////////

Regards,
~ash



Archive powered by MHonArc 2.6.16.

Top of Page