Identifying the directions of a set of 2D contours for additive manufacturing process planning.