Solidification in additive manufacturing