Generalized mechanics and dynamics of 3-axis machining processes