// hole size = given (also for use with other parts // so based on the material thickness (3.0mm +/- 0.3mm) the width // of pegs should vary mat = 3; // material setting kerfoffset = 0.15; // half of the laser kerf // material spacing (the LEGO units) hole = 5; // hole size plateunit = 25; // distance between holes ring = 10; beam = 8;// // settings for locking depending on material flexibility lock = 0.8; gap = 1.5; $fn=30; // render // the parts to render projection(){ //anglebeam(90,0,90,1,0); basic(5); } module anglebeam(angle2,angle1,angle3,units,angle){ translate([0,0,0])onebeam(angle2,angle1,units); translate([0,plateunit,0])rotate([0,0,angle])onebeam(angle3,angle2,units); } module onebeam(angle2,angle1,units){ translate([0,plateunit,0])rotate([0,0,angle1])basic(units); translate([-beam/2-kerfoffset/2,ring/2-hole/2,0])cube([beam+kerfoffset,plateunit-ring/2,mat]); translate([0,0,0])rotate([0,0,angle2])basic(units); } //translate([-mat/2,0,ring/2+mat])rotate([0,90,0])basic(1); module basic(units){ difference(){ union(){ cylinder(d=ring+kerfoffset,h=mat); translate([hole/2,-0.5*(sqrt(hole^2-mat^2)+kerfoffset),0])cube([ring/2-hole/2+units*mat+lock+kerfoffset/2,sqrt(hole^2-mat^2)+kerfoffset,mat]); translate([ring/2+units*mat+lock/2,sqrt(hole^2-mat^2)/2,0])cylinder(d=lock+kerfoffset,h=mat); translate([ring/2+units*mat+lock/2,-sqrt(hole^2-mat^2)/2,0])cylinder(d=lock+kerfoffset,h=mat); } translate([0,0,-0.01])cylinder(d=hole-kerfoffset,h=mat+0.02); // central hole translate([ring/2,0,-0.01])cylinder(d=gap-kerfoffset,h=mat+0.02); translate([ring/2,-0.5*(gap-kerfoffset),-0.01])cube([ring/2-hole/2+units*mat+lock,gap-kerfoffset,mat+0.02]); translate([ring/2,0,-0.01])cylinder(d=gap-kerfoffset,h=mat); } } //translate([-sqrt(hole^2-mat^2)/2,-mat/2,0])cube([sqrt(hole^2-mat^2),mat,10]); // test piece