length = 20; width = 7; th = 2.8; lc = 2.5; lm = 0; lf = 8; hs = 1.4; hh = th-hs; d = 0.635; r = d/2; no_joints=2; //numer of male joints module hammer_tenon_joint_male_upper() { difference() { square([width, length]); //big cutouts for ( i = [0:no_joints] ) { translate([width-th,(-lc)+i*(lf+lm)]) square([th, lf]); } //cnc inside corner cutouts for ( i = [0:no_joints] ) { translate([width-th,(lf-lc-r)+i*(lm+lf)]) circle(r, $fn=100); translate([width-th,(r-lc)+i*(lm+lf)]) circle(r, $fn=100); //box to connect the two //translate([width-th-r,r-lc+i*(lm+lf)]) square([r,lf-2*r]); } } } module hammer_tenon_joint_male_lower() { difference() { square([width, length]); //big cutouts for ( i = [0:no_joints] ) { translate([width-th,i*(lm+lf)]) square([th, lf-2*lc]); } //cnc inside corner cutouts for ( i = [0:no_joints] ) { translate([width-th,(lf-2*lc-r)+i*(lm+lf)]) circle(r, $fn=100); translate([width-th,r+i*(lm+lf)]) circle(r, $fn=100); //box to connect the two //translate([width-th-r,r+i*(lm+lf)]) square([r,lf-2*lc-2*r]); } } } module hammer_tenon_joint_female() { difference() { square([width, length]); //big cutout for ( i = [0:no_joints-1] ) { translate([0,(lf-lc)+i*(lm+lf)]) square([th, lm]); } //upper small cutout for ( i = [0:no_joints-1] ) { translate([hh,(lf-lc+lm)+i*(lm+lf)]) square([hs, lc]); } //lower small cutout for ( i = [0:no_joints-1] ) { translate([hh,(lf-2*lc)+i*(lm+lf)]) square([hs, lc]); } //upper cutout for cnc with round drill for ( i = [0:no_joints-1] ) { //two circles translate([hh+r,(lf+lm)+i*(lm+lf)]) circle(r, $fn=100); translate([hh+hs-r,(lf+lm)+i*(lm+lf)]) circle(r, $fn=100); //box to connect the two //translate([hh+r,(lf+lm)+i*(lm+lf)]) square([hs-2*r,r]); } //lower cutout for cnc with round drill for ( i = [0:no_joints-1] ) { //two circles translate([hh+r,(lf-2*lc)+i*(lm+lf)]) circle(r, $fn=100); translate([hh+hs-r,(lf-2*lc)+i*(lm+lf)]) circle(r, $fn=100); //box to connect the two //translate([hh+r,(lf-2*lc-r)+i*(lm+lf)]) square([hs-2*r,r]); } } } module hammer_tenon_joint() { hammer_tenon_joint_male_upper(); translate([width*-1.5,0]) hammer_tenon_joint_male_lower(); translate([width*1.5,0]) hammer_tenon_joint_female(); } hammer_tenon_joint();