Open qwenger opened 4 months ago
Not a reply, but a question out of curiosity: What is the goal of https://gitlab.com/matpi/carina ?
Oh, you found that already! ;)
The goal of the Carina package is to provide a Python library for computing straight skeletons and medial axes of polygons, based on CGAL. I created it because
Did I miss something? Is all of this already available in an official package? If so (or if that happen in the future) I can happily deprecate Carina as to not reinvent the wheel.
@MaelRL if I understand it correctly the vertex_iter
evaluates to a face handle. We would still be in the realm of exact computing, if we had a function which returns a bool
telling us if the dual is a finite point or not, wouldn't we?
Issue Details
Hi and thank you very much for developing CGAL,
I use the library for computing segment Voronoi diagrams and I came across an issue (hereafter drastically simplified to a MWE).
The following code crashes at runtime with a precondition exception / division by zero error when computing the position of one of the vertices. From what I could investigate, during the building phase the two segments are found to be non-parallel, thus a vertex is created with both segments and the point as sites. However, on coordinate computation the value
sqrt(D1D2) - a1a2 - b1b2
incompute_pll
evaluates to zero and the code crashes.After much tweaking and testing I came to the idea of swapping the kernel in favor of
Exact_predicates_exact_constructions_kernel_with_sqrt
, and then the code executes smoothly.For me this raises a few questions:
Exact_predicates_exact_constructions_kernel_with_sqrt
"guaranteed" to be stable in this use case or am I at risk of similar crashes for different inputs?FWIW I also just came across following somewhat similar reports: https://github.com/CGAL/cgal/issues/4195 https://github.com/CGAL/cgal/issues/4196
EDIT: it seems that https://github.com/CGAL/cgal/pull/7976#issuecomment-1887194744 somewhat answers my point 2.
Thanks in advance!
Source Code
Environment