From 73cf624d0fc48e14b50d188ced2ca04b4d431c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 16 Aug 2023 09:59:44 +0200 Subject: [PATCH 1/2] be more permessive do not throw an error but return SMALLER The collinearity check being already do in the predicate it would be more expensive to do it also before calling the predicate --- Kernel_23/include/CGAL/Kernel/function_objects.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index ead2582c6bc..89a7dc772e4 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -246,6 +246,8 @@ namespace CommonKernelFunctors { const Vector_3 abad1 = xproduct(ab1, ad1); const FT sc_prod_1 = abac1 * abad1; + if (abac1==NULL_VECTOR || abad1==NULL_VECTOR) return SMALLER; + CGAL_kernel_assertion_msg( abac1 != NULL_VECTOR, "ab1 and ac1 are collinear" ); CGAL_kernel_assertion_msg( abad1 != NULL_VECTOR, From f879c681550382f55e6cd2163a71b46e9986da62 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 21 Aug 2023 11:32:12 +0200 Subject: [PATCH 2/2] Test earlier Co-authored-by: Andreas Fabri --- Kernel_23/include/CGAL/Kernel/function_objects.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 89a7dc772e4..9b6af428e25 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -244,9 +244,8 @@ namespace CommonKernelFunctors { const Vector_3 abac1 = xproduct(ab1, ac1); const Vector_3 abad1 = xproduct(ab1, ad1); - const FT sc_prod_1 = abac1 * abad1; - if (abac1==NULL_VECTOR || abad1==NULL_VECTOR) return SMALLER; + const FT sc_prod_1 = abac1 * abad1; CGAL_kernel_assertion_msg( abac1 != NULL_VECTOR, "ab1 and ac1 are collinear" );