Computing axes of rotation for 4-axis CNC milling machine by calculating global visibility map from slice geometry