Closed Yvee1 closed 5 months ago
for (int i = 0; i < points.size()-1; i++)
shouldn't this be:
for (int i = 0; i < points.size()-2; i++)
as otherwise points[i+1]
will be out of range?
I already compensate for the i+1
indexing by subtracting one from the size; if you would just loop over the points you would do for (int i = 0; i < points.size(); i++)
.
OK yes correct.
The exact predicates kernel does not provide all predicates needed by the Segment_Delaunay_graph_2
. So you have to use the filterered traits class:
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2 K, CGAL::Field_with_sqrt_tag> Gt;
Thanks, that works. I suppose it was my mistake then and the issue can be closed. I do think the assertion error is misleading for the user. It may be worth improving the 'error message' if it is not too much work.
It's difficult to detect in the code, because we do not want to prevent some geometric traits combinations for advanced users.
Note that you might also be interested in using Segment_Delaunay_graph_filtered_traits_without_intersections_2
, if you don't have intersection between segments of your input.
Issue Details
For certain input, the
insert
function of Segment_Delaunay_graph_2 throws an assertion violation error (inexact constructions).Source Code
Environment