if (self.cube.constraint_func(self.cube.vertices+[self.cube.center])and(numtmps>split_num_templatesor((numtmps>=split_num_templates/2.0)andnotvolume_split_condition))):
#if (self.cube.constraint_func(self.cube.vertices + [self.cube.center]) and (numtmps > split_num_templates)):
#if (self.cube.constraint_func(self.cube.vertices + [self.cube.center]) and (numtmps > split_num_templates or ((numtmps >= split_num_templates/2.0) and not volume_split_condition))):
if (self.cube.constraint_func(self.cube.vertices+[self.cube.center])and(numtmps>split_num_templates)):
self.template_count[0]=self.template_count[0]+1
bifurcation+=1
ifnumtmps<3**len(size)andvolume_split_condition:
ifnumtmps<2**len(size):# and volume_split_condition: