Reusing waste heat during processing or shaping