Incremental improvements
This commit is contained in:
parent
9b9a95b71a
commit
3a45bd9826
1 changed files with 14 additions and 1 deletions
|
@ -119,7 +119,7 @@ class PolygonBuilder():
|
|||
if direction is not PointDirection.LEFT:
|
||||
return
|
||||
|
||||
for i in range(i1, i2+1):
|
||||
for i in range(i1+1, i2):
|
||||
yield from self.yield_point(self.bounds[i % count])
|
||||
|
||||
def each_point_within(self):
|
||||
|
@ -184,6 +184,19 @@ class PolygonBuilder():
|
|||
|
||||
last = point
|
||||
|
||||
#
|
||||
# If the first point is to the right of the last point, fill in the
|
||||
# intermediates.
|
||||
#
|
||||
i1 = self.bounds.nearest_index(self.point_first)
|
||||
i2 = self.bounds.nearest_index(self.point_last)
|
||||
|
||||
dist, direction = self.bounds.index_distance(i1, i2)
|
||||
|
||||
if direction is PointDirection.RIGHT:
|
||||
yield from self.each_intermediate_point(self.point_last,
|
||||
self.point_first)
|
||||
|
||||
def process(self) -> shapely.Polygon:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue