In situ measurement and micromachining of glass