Replaced 'assert' with 'continue'

This function takes a vertex handle vh and computes the coordinates
in the hypothetical situation of vh being removed and querying at vh->point().

If vh is adjacent to the infinite vertex, then vh->point() will be outside
the convex hull (most likely, could be on the boundary too). The base function
taking a point can handle that case, it returns: (empty, 0, false). Rather
than crashing, let the other function return 'false'.
This commit is contained in:
Mael Rouxel-Labbé 2018-01-15 18:30:11 +01:00
parent 166f6d5624
commit f69c1f734a
2 changed files with 6 additions and 2 deletions

View File

@ -312,7 +312,9 @@ natural_neighbor_coordinates_2(const Dt& dt,
do
{
CGAL_assertion(!dt.is_infinite(vc));
if(dt.is_infinite(vc))
continue;
Vertex_handle t2_vh = t2.insert(vc->point());
cm[t2_vh] = vc;
}

View File

@ -507,7 +507,9 @@ regular_neighbor_coordinates_2(const Rt& rt,
do
{
CGAL_assertion(!rt.is_infinite(vc));
if(rt.is_infinite(vc))
continue;
Vertex_handle t2_vh = t2.insert(vc->point());
cm[t2_vh] = vc;
}