Integrating form error into tolerance analysis using variational model