-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add a precondition checking for degeneracies before calling intersection #4654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
TODO: I did not run yet the tests for |
906de2b
to
a5c72e2
Compare
@CGAL/geometryfactory I'd be happy to get some feedback on this PR |
I find that strange that |
Note that the initial motivation was to not penalize users that have clean data. Everywhere in CGAL, we expect the input to be clean. We could of course have more generic versions. |
That is not true. Historically, CGAL algorithms were designed and coded to be robust to degenerated cases. See Triangulation_2, Triangulation_3, Nef, were the input can be very degenerated. A 3D Delaunay triangulation can even deal with a set of aligned points. Only recently in CGAL, we have introduced new algorithms that are more constructions-based, and not predicates-based, and less tolerant to degenerated cases: CDT with intersections, Mesh_2/Mesh_3, Straight Skeleton, most of PMP... I think the kernel should be robust. Maybe we can introduce new functors to deal with non-degenerated cases. But how far? Should the non-degenerated intersection code deal with coplanar triangles and segments? |
You are mixing things up. Generic positions and degenerate input are two different things. |
I think we want both:
|
I'm pretty sure I can easily do a mechanism handling the forwarding of degenerate inputs automatically, but the hardest part is to find a name for the function that supports degenerate input. Alternatively, we could have a global switch enabling degenerate inputs for |
Should not Actually, for backward compatibility, they should behave exactly as they do in CGAL-5.1. I do not know how that is documented. Then we should invent other names for the variant that behaves differently. At the level of the global functions, it could be dispatched using a tag. Actually, if our kernels were like NewKernel_d, it could also be a special tag at the level of kernel functors. Is not it, @mglisse? |
|
ping |
Provided the fact that I have to update some tests, maybe we do not want that (or at least turn the precondition into a warning).