diff --git a/kratos/utilities/intersection_utilities.h b/kratos/utilities/intersection_utilities.h index 418adb6cd2c0..3b7e827ef309 100644 --- a/kratos/utilities/intersection_utilities.h +++ b/kratos/utilities/intersection_utilities.h @@ -740,9 +740,9 @@ class KRATOS_API(KRATOS_CORE) IntersectionUtilities // Compute the intersection point and check if it is inside the bounds of the segment const double r = a / b; - if (r < 0.0){ + if (r < 0.0 - epsilon){ return 0; // Intersection point lies outside the bounds of the segment - } else if (r > 1.0) { + } else if (r > 1.0 + epsilon) { return 0; // Intersection point lies outside the bounds of the segment } rIntersectionPoint = rLinePoint1 + r * line_dir;