mirror of https://github.com/CGAL/cgal
fix for endpoint of axis-parallel segment
Related to input n21.cin: s 25.914984 70.968903 25.912687 70.97624999999999 s 25.987635 70.97238900000001 26.000231 70.97238900000001 Vertex_conflict (pqrt)= (p 25.914984 70.968903) (p 26.000231 70.972389) (s 25.987635 70.972389 26.000231 70.972389) (p 25.987635 70.972389) now returns POSITIVE Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
This commit is contained in:
parent
dd74ecd4a1
commit
bd94d902fe
|
|
@ -3047,17 +3047,23 @@ private:
|
|||
return ZERO;
|
||||
}
|
||||
|
||||
// if t is an endpoint of r, then t is necessarily outside the
|
||||
// Voronoi circle of p, q and r and thus the result is POSITIVE
|
||||
// philaris: In Linf, we are partially sure of the above only for a
|
||||
// non-axis-parallel segment, in the sense that the possible return
|
||||
// values are either ZERO or POSITIVE. In the non-axis-parallel case,
|
||||
// the point t can be at the corner of the Linf-square and thus the
|
||||
// possibility of ZERO cannot be excluded. However, this code seems
|
||||
// to be reached only in validations and POSITIVE seems to be
|
||||
// acceptable.
|
||||
if ( is_endpoint_of(t, r) and not is_site_h_or_v(r) ) {
|
||||
return POSITIVE;
|
||||
const bool endp_t_of_r = is_endpoint_of(t, r);
|
||||
if (endp_t_of_r) {
|
||||
if (not is_site_h_or_v(r)) {
|
||||
// For a non-axis-parallel segment, the possible return values
|
||||
// are either ZERO or POSITIVE. In the non-axis-parallel case,
|
||||
// the point t can be at the corner of the Linf-square and thus the
|
||||
// possibility of ZERO cannot be excluded. However, this code seems
|
||||
// to be reached only in validations and POSITIVE seems to be
|
||||
// acceptable.
|
||||
return POSITIVE;
|
||||
} else {
|
||||
// here r is axis-parallel:
|
||||
// if p or q are endpoints of r, return POSITIVE
|
||||
if (is_endpoint_of(p, r) or is_endpoint_of(q, r)) {
|
||||
return POSITIVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// easy degeneracies --- end
|
||||
|
|
|
|||
Loading…
Reference in New Issue