There is also this that may be usefull https://duet3d.dozuki.com/Wiki/Gcode#Section_M675_Find_center_of_cavity