From 3d03358bc57349f7c14a4b24d416a1ef2f974156 Mon Sep 17 00:00:00 2001 From: Pawel Baran Date: Thu, 15 Feb 2024 15:47:07 +0100 Subject: [PATCH] another attempt to fix #3284 --- Geometry_Engine/Compute/BooleanUnion.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Geometry_Engine/Compute/BooleanUnion.cs b/Geometry_Engine/Compute/BooleanUnion.cs index 7b3b86030..096305b18 100644 --- a/Geometry_Engine/Compute/BooleanUnion.cs +++ b/Geometry_Engine/Compute/BooleanUnion.cs @@ -488,13 +488,14 @@ private static List BooleanUnionCollinear(this List lines, double to extraSteps.Add(0, new List()); foreach (double step in steps) { + while (step - mergedRanges[i].Item2 > tolerance) + { + i++; + extraSteps.Add(i, new List()); + } + if (step - mergedRanges[i].Item1 > tolerance) { - if (step - mergedRanges[i].Item2 > tolerance) - { - i++; - extraSteps.Add(i, new List()); - } if (mergedRanges[i].Item2 - step > tolerance && extraSteps[i].All(x => Math.Abs(x - step) > tolerance)) extraSteps[i].Add(step);