Also clean vertices before cutting

This commit is contained in:
jan 2017-09-07 21:59:44 -07:00
parent a817bf6642
commit 01395134ee

View File

@ -186,7 +186,10 @@ class Polygon(Shape):
:return: List of Polygon objects :return: List of Polygon objects
""" """
import float_raster import float_raster
xy = (self.offset + self.vertices).T xy_complex = self.vertices[:, 1] + 1j * self.vertices[:, 2]
xy_cleaned = _clean_complex_vertices(xy_complex)
xy = numpy.vstack((numpy.real(xy_cleaned)[None, :],
numpy.imag(xy_cleaned)[None, :]))
if cut_xs is None: if cut_xs is None:
cut_xs = tuple() cut_xs = tuple()