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 Vector3.DistanceTo(Polygon). Add custom implementations of ToPolyline (issue #495) #1046

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

Conversation

DmytroMuravskyi
Copy link
Contributor

@DmytroMuravskyi DmytroMuravskyi commented Oct 27, 2023

BACKGROUND:

DESCRIPTION:

  • Fixed DisntanceTo function by casting Polygon to Polyline instead of creating new Polyline.
  • Created set of default implementations for ToPolyline function for IndexedPolycurve, Polyline and Polygon.
    a) In Polyline and Polygon they produce Polyline with the same points as original object instead of dividing by 10 segments.
    b) In IndexedPolycurve lines are always represented by 2 points, curve are interpolated by their corresponding ToPolyline function.
  • Created custom implementation for IndexedPolycurve with divisions parameter. End points of curves are added first and then non straight curves are divided uniformly. If number of divisions is less than number of curves - points are uniformly distributed though whole domain, deviating heavily from original shape.

TESTING:

  • Added new tests for DistanceTo and ToPolyline.

REQUIRED:

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

This change is Reviewable

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

1 participant