Skip to content

Instantly share code, notes, and snippets.

@mpmckenna8
Last active March 25, 2017 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpmckenna8/cdc9ae77aea8e5d7ad6465381e80aa40 to your computer and use it in GitHub Desktop.
Save mpmckenna8/cdc9ae77aea8e5d7ad6465381e80aa40 to your computer and use it in GitHub Desktop.
Battery hack
// Thing to go into the battery part of a camera
railbuffer = 5;
wi = 34.8;
he = 40.56;
th = 5.7;
diam = 1.7;
spacing = 3;
mindi = .5;
module rails (i){
translate([ railbuffer, -5 , 0]){
rotate([ -90, 0, 0 ])
translate([i*spacing, 0,0]){
cylinder( h = he+10, d=diam, center=false);
}
}
translate([railbuffer+ spacing*i-mindi-diam/2,-mindi,-mindi]){
cube(2);
}
}
difference(){
minkowski(){
cube([wi-mindi*2, he-mindi*2, th-mindi*2]);
$fn=50;
sphere(r= mindi);
}
for (a=[0:2]){
rails(a);
}
}
color("purple")
for (a=[0:2]){
// rails(a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment