Production of casting of ferrous and non-ferrous metals