Logic for rectangle cutting improving
Another logic for cut line