Skip to content

Fix Vector3.DistanceTo(Polygon). Add custom implementations of ToPolyline (issue #495)#1046

Open
DmytroMuravskyi wants to merge 6 commits intohypar-io:masterfrom
DmytroMuravskyi:dmuravskyi/to-polyline
Open

Fix Vector3.DistanceTo(Polygon). Add custom implementations of ToPolyline (issue #495)#1046
DmytroMuravskyi wants to merge 6 commits intohypar-io:masterfrom
DmytroMuravskyi:dmuravskyi/to-polyline

Conversation

@DmytroMuravskyi
Copy link
Copy Markdown
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.

1 participant