Predicting Geometric Errors and Failures in Additive Manufacturing