The Design of Automatic Machines’ Mechanisms by Numerical Models of the Mechanism and of the Electrical Drive