Manufacturing of magnetic cores by mechanical means