Means for heating or cooling the die