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

Fix incorrect check for Intersecting curves when computing Voronoi regions #96

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/Datasets/Compute/VoronoiRegions.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions TriangleNet_Engine/Compute/VoronoiRegions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ private static bool AnyIntersectingNotEndPoints(this List<ICurve> curves, List<P
else
mustIncludePts[i].Add(point);

if (point.SquareDistance(stPt) < sqTol)
if (point.SquareDistance(c2.IStartPoint()) < sqTol)
offsetStart[j] = endPt = true;
else if (point.SquareDistance(enPt) < sqTol)
else if (point.SquareDistance(c2.IEndPoint()) < sqTol)
offsetEnd[j] = endPt = true;
else
mustIncludePts[j].Add(point);
Expand Down