Thermal treatment of the extrusion moulding material or of preformed parts or layers, e.g. by heating or cooling