fix choice of plane

This commit is contained in:
jan 2018-03-28 15:25:22 -07:00
commit fc82bc255c

View file

@ -376,7 +376,7 @@ def stack_split(poly, plane_fun=None, perturb=0, max_depth=10):
if plane_fun is None:
pfun_used = random.choice(plane_gen)
plane = pfun_used(poly)
while norm(plane[0]) != 0:
while norm(plane[0]) == 0:
pfun_used = random.choice(plane_gen)
plane = pfun_used(poly)
plane = list(plane)