Distance function was not including closing edge of Polygon.
ToPolyline function by default interpolates Polygon by 10 uniformly placed segments (11 vertices) cutting edges in the process.
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.
BACKGROUND:
DESCRIPTION:
ToPolyline
function forIndexedPolycurve
,Polyline
andPolygon
. a) InPolyline
andPolygon
they produce Polyline with the same points as original object instead of dividing by 10 segments. b) InIndexedPolycurve
lines are always represented by 2 points, curve are interpolated by their corresponding ToPolyline function.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:
REQUIRED:
CHANGELOG.md
.This change is![Reviewable](https://reviewable.io/review_button.svg)