Loading

Battery Holder

by mattjoyce, published

Battery Holder by mattjoyce Jan 19, 2013

Description

Plenty of these around, and there's nothing particularly special about this one.

Mostly I wanted to try out CoffeeSCAD.
kaosat-dev.github.com/CoffeeSCad

More from Containers

view more

Liked By

view all

Tags

License

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Here's the code.


rows=4
cols=3
size=14.75
innerwall=1.5
outerwall=1.5
base=1.5
height=20

battery= new Cube
size : [size,size,50]

body= new Cube
size: [((size+innerwall)*cols)+(outerwall*2)-innerwall,((size+innerwall)*rows)+(outerwall*2)-innerwall,height]

for x in [0..cols-1] by 1
for y in [0..rows-1] by 1
body=body.subtract(battery.translate([x*(size+innerwall)+outerwall,y*(size+innerwall)+outerwall,base]))
return body
Top