w_in = 7; h_in = 7; w_out = 7; h_out = 7; module face (){ square(30, center=true); } module notchesInside (HowMany){ for(i = [0:HowMany]){ rotate(i*360/HowMany) translate([11,-3.5,0]) square([h_in, w_in]); } } module notchesOutside(HowMany){ for(i = [0:HowMany]){ rotate(i*360/HowMany) translate([15,-3.5,0]) square([h_out, w_out]); } } module faceBox(){ difference(){ square(40, center=true); notchesInside(4); translate([-4, -4, 0]) square([h_in, w_in]); } } module topBox (){ face(); notchesOutside(2); } module bottomBox (){ difference(){ square([30.3, 20.4], center=true); translate([-15,0,0]) notchesInside(1); } notchesOutside(2); } module jointBoxes(){ square([30, 20], center=true); notchesOutside(2); } module jointBinary(){ difference(){ square([30, 20], center=true); translate([-26,0,0]) notchesInside(1); } notchesOutside(1); } module topBox(){ face(); notchesOutside(2); } module topBoxOne (){ difference(){ face(); translate([-4,-5,0]) text("1"); } notchesOutside(2); } module topBoxTwo (){ difference(){ face(); translate([-4,-5,0]) text("2"); } notchesOutside(2); } module topBoxFour (){ difference(){ face(); translate([-4,-5,0]) text("4"); } notchesOutside(2); } module topBoxEight (){ difference(){ face(); translate([-4,-5,0]) text("8"); } notchesOutside(2); } module topBoxSixteen (){ difference(){ face(); translate([-8,-5,0]) text("16"); } notchesOutside(2); } module topBoxThirtyTwo (){ difference(){ face(); translate([-8,-5,0]) text("32"); } notchesOutside(2); } module topBoxSixtyFour (){ difference(){ face(); translate([-8,-5,0]) text("64"); } notchesOutside(2); } module topBoxHundred (){ difference(){ face(); translate([-12,-5,0]) text("128"); } notchesOutside(2); } faceBox(); translate([50,0,0]) faceBox(); translate([100,-40,0]) bottomBox(); translate([150,0,0]) topBox(); translate([150,-50,0]) topBox(); translate([200,0,0]) jointBoxes(); translate([250,0,0]) jointBoxes(); translate([250,-30,0]) bottomBox(); translate([200,-30,0]) jointBinary(); translate([100,0,0]) topBoxOne(); translate([50,-45,0]) topBoxTwo(); translate([0,-45,0]) topBoxFour(); translate([0,-95,0]) topBoxEight(); translate([50,-95,0]) topBoxSixteen(); translate([100,-80,0]) topBoxThirtyTwo(); translate([150,-100,0]) topBoxSixtyFour(); translate([200,-70,0]) topBoxHundred();