Created
October 9, 2012 21:35
-
-
Save benhowes/3861607 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//c Ben Howes 2012 | |
//the main structure of the arm section | |
module s1_main(outline=false, tol=0){ | |
far_center = 120; | |
end_cube_radius = 15; | |
hole_offset = end_cube_radius-4.75; | |
clamp_offsets = [[hole_offset,hole_offset, 0], | |
[hole_offset, -hole_offset, 0], | |
[-hole_offset, hole_offset, 0], | |
[-hole_offset,-hole_offset, 0]]; | |
difference(){ | |
//the body of the segment | |
union(){ | |
//stem, with hollows | |
translate([60,0,0]) difference(){ | |
cube([100+2*tol,30+2*tol,40+2*tol], center=true); | |
if(!outline) translate([0,0,0]) cube([110,35,30], center=true); | |
} | |
//near hub | |
roundedBox([30+2*tol,30+2*tol,50+2*tol],5+tol,1); | |
//far hub | |
translate([far_center-2,0,0]) roundedBox([32+2*tol,30+2*tol,40+2*tol],5,1); | |
} | |
//bits to cut out | |
if(outline == false){ | |
union(){ | |
//nearside & farside bearing holes | |
for(bearing_pos = [[0,0,18.1],[0,0,-25.1],[120,0,13.1],[120,0,-20.1]]){ | |
bearing(pos=bearing_pos,outline=true); | |
} | |
//shafts | |
for( b_pos = [[0,0,-50], [120,0,-50]]) | |
translate(b_pos) boltHole(8,length=100); | |
//mounting helpers - holes all the way through | |
for(y = [-5, 5]){ | |
for(x = [30 : 10 : 90]){ | |
translate([x,y,-50]){ | |
boltHole(3,length=100); | |
} | |
} | |
} | |
//holder togtherers | |
for(side = [[0,0,-25+METRIC_NUT_THICKNESS[3]-epsilon]]){//,[far_center,0,-20+METRIC_NUT_THICKNESS[3]-epsilon]]){ | |
for(pos = clamp_offsets){ | |
translate((side+pos)){ | |
boltHole(3, length=70); | |
} | |
} | |
} | |
//nut cages | |
for(nut_side = [[0,0,25]]){//, [far_center,0,20]]){ | |
for(nut_pos = clamp_offsets){ | |
translate((nut_side+nut_pos-[0,0,-epsilon+METRIC_NUT_THICKNESS[3]])){ | |
nutHole(3); | |
} | |
} | |
} | |
//motor mount | |
translate([90,0,-3.9]) | |
motor_gearbox(outline=true); | |
} | |
} | |
} | |
} | |
s1_main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment