Tools: Combination Wrench

From ShapeOko
Jump to: navigation, search

Combination wrench:

Tools combination wrench.png


module wrench (wrench_size, wrench_handle) {
$fn=50;
translate([wrench_size/4, wrench_handle/4, -wrench_size/16])
minkowski()
{cube (size=[wrench_size*0.5,wrench_handle/2,wrench_size/4]);
cylinder(r=wrench_size/8,h=wrench_size/4);}
cube (size=[wrench_size*1.0625,wrench_handle*0.9,wrench_size*0.375]);
render(convexity = 1) {
translate([0, wrench_handle*0.9, -wrench_size])
intersection() {
cube(size=[wrench_size*2,wrench_handle*0.061,wrench_size*2]);
translate([0, 0, wrench_size*3.375])
rotate([0,90,0])
rotate_extrude(convexity = 10)
translate([wrench_size*2, 0, 0])
square ([wrench_size*0.375,wrench_size*1.0625]);}}
render(convexity = 1) {
difference() {
translate([wrench_size/2, wrench_handle+wrench_size/6, wrench_size/8])
rotate([10,0,0])
cylinder(h = wrench_size*0.625, r=wrench_size*.5+2);
translate([wrench_size/2, wrench_handle+wrench_size/6, wrench_size/16])
rotate([10,0,0])
linear_extrude(height=wrench_size)
rotate([0,0,90])
hexagon(wrench_size/2);}}
translate([wrench_size/2, -wrench_size/2, -wrench_size/8])
render(convexity = 1) {
difference() {
hull() {
rotate([0,0,30])
scale([1.125,1,1]) 
cylinder(h = wrench_size*0.625, r=wrench_size*.5+2);
translate([wrench_size/8, -wrench_size/2, 0])
cylinder(h = wrench_size*0.625, r=wrench_size*.5+2);
}
{rotate([0,0,15])
{translate([-wrench_size/2, -wrench_size*2.25, -wrench_size/4])
cube (size=[wrench_size,wrench_size*2,wrench_size]);
translate([0, -wrench_size/4, -wrench_size/4])
scale([2,1,1]) 
cylinder(h = wrench_size, r=wrench_size/4);
}}}}
}

wrench (8,86);