Better heuristic for when to find intermediates

This commit is contained in:
XANTRONIX 2025-03-23 20:53:54 -04:00
parent 5e6b774595
commit df1088f30f

View file

@ -191,10 +191,13 @@ class PolygonBuilder():
yield from self.yield_point(point) yield from self.yield_point(point)
# #
# If only two points have been yielded, then yield the intermediate # Yield all intermediate points if the first point is to the right
# between the end and the start (reversed). # of the last point.
# #
if self.total == 2: dist, direction = self.bounds.index_distance(self.point_first,
self.point_last)
if direction is PointDirection.RIGHT:
yield from self.each_intermediate_point(self.point_last, yield from self.each_intermediate_point(self.point_last,
self.point_first) self.point_first)