Shaping or removal of materials