This is a small piece of python code that assists in drilling PCBs. Fundrill aligns the physical PCB with locations in a .drl file and verifies the data. Afterwards it produces gcode files which can be fed into a gcode sender for the actual drilling.
More is visible on the youTube video https://www.youtube.com/watch?v=6cKb-Il8YiU
In order to verify the location of the drill holes I take advantage of openCV. Once the camera sees the hole it can calculate how far off it is from its correct location. Thus in the verification it corrects any anomalies making sure the holes are perfectly drilled.