Some preliminary code in test.py to find the transform of the cut. Not been tested.