Added assertion to calc_normals() and added a test