From f20af1a946ca9255963b965e54178b66f302df93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 30 Jan 2025 18:17:12 +0100 Subject: [PATCH] fix the value used creating the infimax box used for pairing halfedges without the abs the intersection line of x=-1 and z=-1 would be on the box leading to invalid behavior (and degenerate halfedges) --- Nef_3/include/CGAL/Nef_3/Infimaximal_box.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h index b1eb8d6b9ee..463b5f85f60 100644 --- a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h +++ b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h @@ -402,9 +402,9 @@ class Infimaximal_box { typename SNC_structure::Vertex_const_iterator v; CGAL_forall_vertices(v, snc) { Point_3 p(v->point()); - if(p.hx()[0] > eval) eval = p.hx()[0]; - if(p.hy()[0] > eval) eval = p.hy()[0]; - if(p.hz()[0] > eval) eval = p.hz()[0]; + if(abs(p.hx()[0]) > eval) eval = abs(p.hx()[0]); + if(abs(p.hy()[0]) > eval) eval = abs(p.hy()[0]); + if(abs(p.hz()[0]) > eval) eval = abs(p.hz()[0]); } eval *= 4; if(eval == 0) return 1;