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

Add Polygon.IntersectionLines for Polygons not on the same plane #1015

Merged

Conversation

DmytroMuravskyi
Copy link
Contributor

@DmytroMuravskyi DmytroMuravskyi commented Sep 1, 2023

BACKGROUND:

  • There is a request for Surface to Surface intersections Add Intersect method for Surfaces #110
  • It was clarified that focus is the case when two polygons are not sharing the plane as other cases are already covered:
    a) Polygon.Intersects(Polygon) returns list of intersection vertices for any two polygons.
    b) Polygon.Intersection(Polygon) returns list of Polygons for two polygons that share a plane.

DESCRIPTION:

  • This PR adds List<Line> IntersectionLines(Polygon polygon, bool includeIntersectionAtEdge = false) function that expects two polygons that not share a plane.
  • If two polygons are on the same plane - empty list is always returned.
  • If two polygons only touching - it depends on includeIntersectionAtEdge parameter.

TESTING:

  • IntersectionLines is added to PolygonTests.

REQUIRED:

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

This change is Reviewable

@DmytroMuravskyi DmytroMuravskyi marked this pull request as ready for review September 1, 2023 08:45
@wynged wynged self-requested a review October 3, 2023 20:43
Copy link
Member

@wynged wynged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link
Member

@wynged wynged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@wynged wynged merged commit e6c3dde into hypar-io:master Oct 6, 2023
2 checks passed
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.

None yet

2 participants