Hello, I am trying to use my CNC machine as a 2-axis coordinate measuring

Hello,
I am trying to use my CNC machine as a 2-axis coordinate measuring machine. I would like to be able to position the spindle (or a camera mounted to the spindle mount) above a feature of the object I wish to measure and record the X and Y coordinates of that position. I’d like to make a ChiliPeppr widget that records the current coordinates with the press of a button. After many measurements were recorded it would need to export that list as a file.

Has anyone already done anything similar to this? If not I would appreciate any guidance you might have in implementing this. I have only some Python scripting experience and would have to learn the JS (or css, html, etc?). Is there a widget with similar functionality that I could fork?

Well, the camera or video widgets might get you the closest to a widget that has some functionality you can start with where you could get the video feed and allow clicking on it to get the xy coords. I did a few camera or video widgets. +Frank Herrmann did a video widget as well that did mjpeg streaming.