I was doing some bike maintenance today and wanted to disassemble my rear hub. It turned out that I needed a 12mm Allen bit for that, which I don’t have. So I 3D printed one! And it worked! Torques safely to 5Nm and I only needed 4Nm for the job. Haven’t tested higher torques.
I think you are looking for a caliper
A 3d printed caliper is not a bad idea, but the shape isn’t always great for working on cars and bikes. A vertical telescope mimics the approach of the tool. Its something trivial enough I would probably never buy it, but might print it.
You could use a divider caliper to be able to translate the size of a fastener to a spot that is easier to measure, if you don’t have to swap between inches and metric it would probably be easy to be accurate enough with it without much practice.