Impregnation and casting of winding