Electrical generator or motor structure