// hirth.scad ind = 50; // overall diameter num = 18; // number of teeth angle = 90; //tooth angle (usually 60 or 90) flat = 0.5; // amount by which tips are flattened back = 10; //thickness of back bore = 6.5; // diameter of hole recess = 16;// diameter of recess in centre //////////////////////////////////////////// diam = ind/cos (180/num); chord = diam*sin(180/num); ridge = (chord/2) / tan(angle/2); // Basic parameters radius = diam / 2; angle_per_tooth = 360 / num; yp =radius * tan(angle_per_tooth / 2); rp = sqrt((yp*yp)+(radius*radius)); //radius to point grad= asin((ridge/2)/diam); echo(gradiant = grad); // angle for rotary table points = [ [0, 0, ridge / 2], // Center [radius, -yp, 0], // Left base [radius, yp, 0], // Right base [radius , 0, ridge] // Peak of the ridge ]; faces=[ [0,1,2], [0,1,3], [0,2,3], [1,2,3] ]; module wedge(){ polyhedron(points,faces,convexity=10); } //rotate wedge module clutch(){ difference(){ intersection(){ translate([0,0,-back]) cylinder(d=ind,h=200,$fn=100); union(){ for (j=[0:1:num-1]) rotate([0,0,j*360/num]) wedge(); rotate([0,0,180/num]) cylinder(r1=rp,r2=0,h=ridge/2,$fn=num); translate([0,0,-back]) cylinder(d=diam,h=back,$fn=num); } } cylinder(d=recess,h=ridge*3); translate([0,0,-back-ridge]) cylinder (d=bore,h=(back+ridge)*3); } } module flatten(){ translate([0,0,(ridge/2)-flat]) cylinder(d2=rp*2,d1=0,h=ridge/2); translate([0,0,(ridge)-flat]) cylinder(d=rp*2,h=ridge); } $fn=100; module hirth(){ difference(){ clutch(); flatten(); } } hirth();