Battery Holder
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
Mostly I wanted to try out CoffeeSCAD.
kaosat-dev.github.com/CoffeeSCad
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
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
License
Battery Holder by mattjoyce is licensed under the Attribution - Share Alike - Creative Commons license.

You must be logged in to post a comment.