Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent PR #895 moved code outside of a conditional block causing duplicate vertices #898

Closed
schellingerhout opened this issue Oct 3, 2024 · 2 comments

Comments

@schellingerhout
Copy link

See note

https://github.com/AngusJohnson/Clipper2/pull/895/files/63251ea069b590b36bb419b4ee8835ab133d2213#r1782788699

    {
      if (InternalClipper.IsAlmostZero(scale - 1)) return path;
      Path64 result = new Path64(path.Count);
      result.AddRange(path.Select(pt => new Point64(pt.X * scale, pt.Y * scale))); // PR Moved the else condition here
#if USINGZ
      foreach (Point64 pt in path)
        result.Add(new Point64(pt.X * scale, pt.Y * scale, pt.Z)); // in case of USINGZ vertices are added a second time
#else
#endif
      return result;
    }
@AngusJohnson
Copy link
Owner

Yep, I will fix this over the weekend. (I'm currently tied up with other things.)

@AngusJohnson
Copy link
Owner

I've now reversed the linq dependency (See also comments here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants