Sure, this should be possible; as far as math and programming problems are concerned it should be relatively trivial. The Leap Motion Controller is extremely accurate; depending on exactly what aspect of the hand you use for the measurement, it should be accurate to within less than a centimetre.