Skip to content

Commit

Permalink
another attempt to fix #3284
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelbaran committed Feb 19, 2024
1 parent 9086d2b commit 3d03358
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Geometry_Engine/Compute/BooleanUnion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,14 @@ private static List<Line> BooleanUnionCollinear(this List<Line> lines, double to
extraSteps.Add(0, new List<double>());
foreach (double step in steps)
{
while (step - mergedRanges[i].Item2 > tolerance)
{
i++;
extraSteps.Add(i, new List<double>());
}

if (step - mergedRanges[i].Item1 > tolerance)
{
if (step - mergedRanges[i].Item2 > tolerance)
{
i++;
extraSteps.Add(i, new List<double>());
}

if (mergedRanges[i].Item2 - step > tolerance && extraSteps[i].All(x => Math.Abs(x - step) > tolerance))
extraSteps[i].Add(step);
Expand Down

0 comments on commit 3d03358

Please sign in to comment.