A variational model for 3d tolerance analysis with manufacturing signature and operating conditions