Cube cutting by machine