Machining elongated bodies