-
Notifications
You must be signed in to change notification settings - Fork 0
/
BatteryHolder.scad
36 lines (26 loc) · 1.35 KB
/
BatteryHolder.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
Parametric Cell Phone Battery holder.
Case to hold a spare battery without fear of shorting it out.
Created by Mike Creuzer - [email protected] - 20120816
*/
// Battery dimensions in mm
// Internal height
height = 65;
// Internal Width
width = 45;
// Internal narrow bit
depth = 6;
// Print Settings in mm
// Looking at the gcode of a sliced file often times tells you this at the top of the file
singleWallWidth = .49;
// Number of walls you want
thickness = 3;
// how much added 'slop' you want so the case is easier to use.
clearence = .5;
difference()
{
cube(size = [width + 2*thickness*singleWallWidth + clearence, depth + 2*thickness*singleWallWidth + clearence, height + thickness*singleWallWidth], center=true);
translate([0,0,2*thickness*singleWallWidth + clearence]) cube(size = [width,depth, height], center=true);
translate([.5*(width + 2*thickness*singleWallWidth + clearence),0,.5 * (height + 2*thickness*singleWallWidth + clearence)]) rotate([90,0,0]) cylinder(r = depth + 2*thickness*singleWallWidth, h=depth + 2*thickness*singleWallWidth + clearence, center=true);
translate([-.5*(width + 2*thickness*singleWallWidth + clearence),0,.5 * (height + 2*thickness*singleWallWidth + clearence)]) rotate([90,0,0]) cylinder(r = depth + 2*thickness*singleWallWidth, h=depth + 2*thickness*singleWallWidth + clearence, center=true);
}