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

Use SplitInternalLoops before Polygon is creation (Issue #881) #1043

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DmytroMuravskyi
Copy link
Contributor

@DmytroMuravskyi DmytroMuravskyi commented Oct 25, 2023

BACKGROUND:

DESCRIPTION:

  • Internal SplitInternalLoops and RemoveSequentialDuplicates are moved to Vector3 static section for better reusability.
  • In ToPolygon, use DeleteVerticesForOverlappingEdges, RemoveSequentialDuplicates and SplitInternalLoops so Polygons are created from already split loops.
  • Internal ToPolygon now returns list of Polygon.
  • Change Profile.Union so it uses PolyTree as other functions and not List<List<ClipperLib.IntPoint>>();
  • Remove internal Profile.Clip as it was not used and was hard to update. In my opinion there is no value in keeping it around.

TESTING:

  • Added DifferenceProduceTwoResultsInOneLoop() test.

REQUIRED:

  • All changes are up to date in CHANGELOG.md.

This change is Reviewable

If ToPolygon throws the exception - SplitInternalLoops inside ToProfile has no chance to split loop into several valid loops.
Also, Polygon should also go though SplitInternalLoops, not only profile.
@DmytroMuravskyi DmytroMuravskyi changed the title Use SplitInternalLoops before Polygon is creation. Use SplitInternalLoops before Polygon is creation (Issue #881) Oct 25, 2023
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

Successfully merging this pull request may close these issues.

1 participant