In 4th-axis positioning and 5th-axis positioning, the tool must retract to a safe distance so that it does not collide with the part while it is indexing. To achieve this, FeatureCAM calculates the maximum stock radius and adds to that the Z-index clearance to determine the appropriate retract distance.