From 830cd15b3a0410535182c7332f6bc9273d64fd81 Mon Sep 17 00:00:00 2001 From: Kevin harrington Date: Mon, 14 Oct 2024 13:51:47 -0400 Subject: [PATCH] Not overly agressive with the polygon rejection --- src/main/java/eu/mihosoft/vrl/v3d/Plane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Plane.java b/src/main/java/eu/mihosoft/vrl/v3d/Plane.java index ea24eda1..d6934d7d 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Plane.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Plane.java @@ -140,9 +140,11 @@ public static Vector3d computeNormal(List vertices) { // If all else fails, return a default normal (e.g., in the z direction) lengthSquared = normal.lengthSquared(); - if (lengthSquared < d) { + if (lengthSquared < Double.MIN_VALUE*10) { throw new NumberFormatException("This set of points is not a valid polygon"); } + if(normalized.lengthSquared()