This is a parametric missile style switch cover to protect against accidental presses. Can be mounted to a surface using double sided tape. I have included a link to the Onshape document, a Solidworks file (untested, don't have a personal Solidworks license), and a STEP file for a 31x25mm switch.
In PrusaSlicer, right click the part, split→to objects. The orientation should be correct, with the cover standing up on its flat base. I recommend using a brim for the cover, and no brim for the hinge. Right click→Add settings→Skirt and brim to change brim settings for only one object.
To customize the document in Onshape, just make a copy of the part and change the variables at the top of the feature tree. Account required.
https://cad.onshape.com/documents/775f6d5beb2f4501816cdc7b/w/dc04c64ec2d68861062e5229/e/fa3e3075990b443fcf34712b
I don't know if the exported sldprt will retain this functionality, let me know if you try it.
The author remixed this model.
Remade Extrutim's power switch in Onshape so I could do custom sized covers for whatever switch I wanted. Custom switch width, height, and depth, custom screw hole, and custom hinge thickness for thinner hinge for tight spaces or thicker hinge for strength.