diff --git a/lib/xmet/geo.py b/lib/xmet/geo.py index 784ec90..3d55e03 100644 --- a/lib/xmet/geo.py +++ b/lib/xmet/geo.py @@ -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)