Better heuristic for when to find intermediates
This commit is contained in:
parent
5e6b774595
commit
df1088f30f
1 changed files with 6 additions and 3 deletions
|
@ -191,10 +191,13 @@ class PolygonBuilder():
|
|||
yield from self.yield_point(point)
|
||||
|
||||
#
|
||||
# If only two points have been yielded, then yield the intermediate
|
||||
# between the end and the start (reversed).
|
||||
# Yield all intermediate points if the first point is to the right
|
||||
# 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,
|
||||
self.point_first)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue