$fn=60; // Ball joint size=8; // size of the ball joint joint_spacing =0.75; // some space between them? joint_thickness = 2; // thickness of the arms joint_arms = 4; // how many arms do you want? arm_width = 7; // actually: how much is removed from the arms Larger values will remove more // Finger f_len=45; f_dia=5; // Render settings $fs=0.8; // def 1, 0.2 is high res $fa=4;//def 12, 3 is very nice /*[Torus]*/ ShowTorus = false; Torus_Diameter = 9.5; //[.1:.01:400] Torus_Circle_Radius = 7; //[.1:.01:400] Torus_Fragments = 60; //[1:.01:200] Rotate_TorusX = 90; //[0:.01:360] Rotate_TorusY = 0; //[0:.01:360] Rotate_TorusZ = 0; //[0:.01:360] Move_TorusX = 0; //[-400:.01:400] Move_TorusY = 0; //[-400:.01:400] Move_TorusZ = -18; //[-400:.01:400] include include include include include include module bolt() { difference() { cuboid([20,20,20], rounding=1); zcyl(l=20, d=15); } translate([0,0,-10]) mirror([0,1,0]) RodEnd(15, 20, thread_len=20, thread_diam=12, thread_pitch=4); } module ball() { sphere(r=size); /* translate([0,0,-size]) cylinder(r1=f_dia-2,r2=f_dia-4,h=3); */ translate([0,0,-f_len/2-3]) /* cylinder(r=8,h=3); */ zcyl(l=f_len, d=f_dia, rounding=2.5); } module ball2() { sphere(r=size); /* translate([0,0,-size]) cylinder(r1=f_dia-2,r2=f_dia-4,h=3); */ translate([0,0,-f_len/3+3]) /* cylinder(r=8,h=3); */ tube(od=f_dia+3, wall=1, l=f_len/3, rounding=1); } module joint() { difference() { sphere(r=size+joint_spacing+joint_thickness); sphere(r=size+joint_spacing); translate([0,0,-size-3]) cube([size+joint_spacing+joint_thickness+25,size+joint_spacing+joint_thickness+25,18],center=true); for(i=[0:joint_arms]) { rotate([0,0,360/joint_arms*i]) translate([-arm_width/2,0, -size/2-4]) cube([arm_width,size+joint_spacing+joint_thickness+20,size+6]); } } translate([0,0,size-2]) cylinder(r2=8,r1=8,h=5); } module Torus() { InnerRadius = Torus_Circle_Radius/2; OuterRadius = Torus_Diameter/2-Torus_Circle_Radius/2; rotate(a = [Rotate_TorusX, 0, 0]) rotate(a = [0, Rotate_TorusY, 0]) rotate(a = [0, 0, Rotate_TorusZ]) translate([Move_TorusX, 0, 0]) translate([0, Move_TorusY, 0]) translate([0, 0, Move_TorusZ]) if (ShowTorus) { rotate_extrude(convexity = 10, $fn = Torus_Fragments) translate([Torus_Diameter, 0, 0]) circle(r = Torus_Circle_Radius, $fn = 144); } else { // } } /*[screws]*/ color("blue") { translate ([0,14,51]) rotate([0,180,0]) { cylinder(h=15, d=12, $fn=6); translate([0,0,15]) { mirror([0,1,0]) RodStart(20, 3, thread_len=68, thread_diam=11, thread_pitch=4); linear_extrude(5) spur_gear2d(circ_pitch=7, teeth=16, pressure_angle=14); } } translate ([0,52,51]) rotate([0,180,0]) { * cylinder(h=15, d=12, $fn=6); translate([0,0,15]) { mirror([0,1,0]) RodStart(20, 3, thread_len=68, thread_diam=11, thread_pitch=4); linear_extrude(5) rotate([0,0,10]) spur_gear2d(circ_pitch=7, teeth=16, pressure_angle=14); } } } color("red") { translate ([51,-14,0]) rotate([0,-90,0]) { cylinder(h=15, d=12, $fn=6); translate([0,0,15]) { mirror([0,1,0]) RodStart(20, 3, thread_len=68, thread_diam=11, thread_pitch=4); linear_extrude(5) spur_gear2d(circ_pitch=7, teeth=16, pressure_angle=14); } } translate ([36.5,33,0]) rotate([0,-90,0]) { linear_extrude(5) rotate([0,0,8]) spur_gear2d(circ_pitch=7, teeth=24, pressure_angle=14); } translate ([51,80,0]) rotate([0,-90,0]) { * cylinder(h=15, d=12, $fn=6); translate([0,0,15]) { mirror([0,1,0]) RodStart(20, 3, thread_len=68, thread_diam=11, thread_pitch=4); linear_extrude(5) spur_gear2d(circ_pitch=7, teeth=16, pressure_angle=14); } } } /*[rings]*/ * color("grey") { translate ([0,15,-34.5]) { tube(od=15, wall=1.8, h=5, rounding=1); } translate ([-34.5,-15,0]) { rotate([0,90,0]) { tube(od=15, wall=1.8, h=5, rounding=1); } } } /*[rotule]*/ /*[y_axis]*/ * color("cyan") { translate([0,14,0]) { bolt(); } } /*[x_axis */ * color("pink") { translate([0,-14,0]) { rotate([0,90,0]) { bolt(); } } } /*[plate1]*/ translate([0,0,0]) { /* Main */ cuboid([45,3,45], rounding=1); translate([21,13,16]) cuboid([3,28,5], rounding=1); translate([-21,13,16]) cuboid([3,28,5], rounding=1); translate([21,13,-16]) cuboid([3,28,5], rounding=1); translate([-21,13,-16]) cuboid([3,28,5], rounding=1); // translate([16,-13,21]) cuboid([5,28,3], rounding=1); translate([-16,-13,21]) cuboid([5,28,3], rounding=1); translate([16,-13,-21]) cuboid([5,28,3], rounding=1); translate([-16,-13,-21]) cuboid([5,28,3], rounding=1); // difference() { cuboid([30,14,30], rounding=1); translate([0,-6,0]) cuboid([21,4,55], rounding=1); translate([0,6,0]) cuboid([55,4,21], rounding=1); } // Front translate([0,-26,0]) cuboid([45,3,45], rounding=1); translate([0,-31,0]) rotate([90,0,0]) tube(od=16, wall=2, h=10, rounding=1); // Sight * translate([0,-33,0]) { rotate([90,0,0]) { tube(od=12, wall=3, h=12, chamfer=0.5); translate([0,0,10.5]) tube(h=10, or1=6, or2=20, wall=3, chamfer=0.5); } } // Back translate([0,26,0]) cuboid([45,3,45], rounding=1); // Joint * translate([0,38,0]) rotate([90,0,0]) joint(); } /*[plate2]*/ translate([0,66,0]) rotate([0,0,180]) { /* Main */ cuboid([45,3,45], rounding=1); translate([21,13,16]) cuboid([3,28,5], rounding=1); translate([-21,13,16]) cuboid([3,28,5], rounding=1); translate([21,13,-16]) cuboid([3,28,5], rounding=1); translate([-21,13,-16]) cuboid([3,28,5], rounding=1); // translate([16,-13,21]) cuboid([5,28,3], rounding=1); translate([-16,-13,21]) cuboid([5,28,3], rounding=1); translate([16,-13,-21]) cuboid([5,28,3], rounding=1); translate([-16,-13,-21]) cuboid([5,28,3], rounding=1); // difference() { cuboid([30,14,30], rounding=1); translate([0,-6,0]) cuboid([21,4,55], rounding=1); translate([0,6,0]) cuboid([55,4,21], rounding=1); } // Front translate([0,-26,0]) cuboid([45,3,45], rounding=1); translate([0,-31,0]) rotate([90,0,0]) tube(od=16, wall=2, h=10, rounding=1); // Sight * translate([0,-33,0]) { rotate([90,0,0]) { tube(od=12, wall=3, h=12, chamfer=0.5); translate([0,0,10.5]) tube(h=10, or1=6, or2=20, wall=3, chamfer=0.5); } } // Back translate([0,26,0]) cuboid([45,3,45], rounding=1); // Joint * translate([0,38,0]) rotate([90,0,0]) joint(); } /*[balls]*/ * color("orange") { translate([0,38,0]) { rotate([90,0,0]) ball(); } translate([0,98,0]) { rotate([-90,0,0]) ball2(); } } /*[enclosure]*/ color("white", alpha=.5) { difference() { translate([0,15,0]) cuboid([80,100,80], rounding=1); translate([0,15,0]) cuboid([74,110,74], rounding=1); cuboid([60,40,60], rounding=20); translate([0,14,37.5]) { zcyl(l=10, d=14); } translate([37.5,-14,0]) { xcyl(l=10, d=14); } } translate([0,64,0]) { difference() { union() { cuboid([80,3,80], rounding=1); translate([0,39,100]) { cuboid([160,3,160], rounding=1); } } ycyl(l=3, d=f_dia+2, rounding=-1.5); translate([0,39,100]) { cuboid([110,4,110], rounding=1); } } } // Screw guides translate ([-37,-15,0]) { rotate([0,90,0]) { tube(od=17, wall=1, h=4, rounding=1); } } translate ([0,15,-37]) { tube(od=17, wall=1, h=4, rounding=1); } // Back translate([0,114,0]) { cuboid([80,3,80], rounding=1); translate([0,0,100]) { cuboid([160,3,160], rounding=1); } } } /*[grp_holder]*/ * translate([0,108,0]) { difference() { union() { translate([0,0,16]) { rotate([90,0,0]) { linear_extrude(6, center=true) trapezoid(55, 20, 80, rounding=5); } } translate([0,0,100]) { cuboid([126,6,126], rounding=1); } } translate([0,0,23]) { rotate([90,0,0]) { linear_extrude(6, center=true) trapezoid(27, 30, 60, rounding=5); } } translate([0,-1.5,100]) cuboid([121,5,121]); * translate([0,0,100]) cuboid([116,7,116], rounding=2); ycyl(l=6, d=f_dia+.5, rounding=-3); } /*[plexi]*/ color("cyan", alpha=.3) translate([0,-1,100]) cuboid([120,4,120], rounding=1); } /*[ball2]*/ * translate([0,98,0]) rotate([-90,0,0]) joint();