Mechanical machining of pipes and sleeves for the crude oil and gas industries