tile was slower than modulo division

This commit is contained in:
jan 2018-03-21 12:44:18 -07:00
commit 47d6d9e978

View file

@ -49,7 +49,7 @@ def split(poly, plane, left_only: bool = False):
right_inds = numpy.where(right)[0]
right_inds3 = numpy.repeat(right_inds, 3)
pnbr_inds = numpy.tile(numpy.arange(3), num_right)
pnbr_inds = numpy.arange(3 * num_right) % 3
# array of [[clipped vertex (cv0), connected vertex pv00], [cv0, pv01], [cv0, pv02], [cv1, pv10], ...]
# which is effectively a list of all edges which touch the right half-plane