In a recent project I had to make some surface mountable battery holders in order to secure some batteries safely out of sight in a stationary application. Thankfully, the rectangular form factor made the design easy, with the two designs below fitting perfectly after the first print.
Pictured above, the bottom design was produced first. Both were designed with the intent of minimising the material usage and print time. A snap fit style mechanism is used to lock the batteries in place, with three external counter sunk screw holes for fixture to suit an 8g wood screw. The second design pictured top has a solid base to allow for fixture with double sided mounting tape or adhesive as an alternative.
The snap fit mechanism secures the battery very nicely. The solid base of the second design actually made the part more rigid and caused one of the snap fits to break when fitting the battery. You can see the difference in flex between the two designs quite clearly. Ultimately both parts will be more rigid when mounted, although leaving off one of the long edge screws will allow more room for flex. Due to the print orientation, the snap fit tower layers are horizontal making them weaker in the direction of flex. As it turns out, the holder was still functional with only one snap fit, presenting an unintended design optimisation in the event of any further iterations.