This is a case for a gearmotor, in two pieces, using the code from Klikini's https://www.youmagine.com/designs/lego-brick-generatorComment out the top or bottom piece in the Openscad file, depending on which one you want to generate. The measurements fit my generic straight-line gearmotors; you may need to adjust for yours. The rectangular open-top holes in the bottom section are for the axles, the round ones are to give the electric motor a little air and let the wires out easily.I've also included a connector that goes from the standard two-flat gearmotor axle to a cross-profile lego axle. Revised version has slightly more generous dimensions for the motor, smaller axle connectors.