CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.87k stars 1.38k forks source link

Alpha_shape_3 for coplanar points #2569

Open mglisse opened 6 years ago

mglisse commented 6 years ago

When you build a Delaunay_triangulation_3 in CGAL with points that are coplanar, you still get a nice 2D triangulation. However, when you build the corresponding Alpha_shape_3, CGAL (more precisely the function filtration()) claims that it is empty. The expected result is the filtration of the corresponding 2d alpha-complex (by the way, request for enhancement, implement Alpha_shape_2::filtration_with_alpha_values, preferably with a nicer interface than the 3D version).

Indeed, the various constructors have if (dimension() == 3) initialize_alpha(); and without initialize_alpha(); all the internal maps are empty and filtration returns immediately. Note that we cannot just run the initialize_alpha(); when dimension is 2, that segfaults.

In test/Alpha_shapes_3/include/CGAL/_test_weighted_alpha_shape_3.h, instead of the 13 points we currently insert, pick just

  L.push_back(Weighted_point(Bare_point(0.,0.,0.), 0));
  L.push_back(Weighted_point(Bare_point(1.,1.,0.), 0));
  L.push_back(Weighted_point(Bare_point(1.,0.,0.), 0));
  L.push_back(Weighted_point(Bare_point(0.,1.,0.), 0));

and the test segfaults (I didn't check if that's the same issue).

lrineau commented 6 years ago

Mael, did you have time to have a look at the issue?

MaelRL commented 6 years ago

No.