include module beam(){ cube(size=[topbeamthickness, toplength - 2 * topsidewidth, topheight], center=false); // add lip for tongue/groove connection translate([0, - topslitdepth, topheight - topslitoffsetfromtop - topslitheight]) cube([topbeamthickness, topslitdepth, topslitheight]); // add lip for tongue/groove connection translate([0, toplength - 2 * topsidewidth, topheight - topslitoffsetfromtop - topslitheight]) cube([topbeamthickness, topslitdepth, topslitheight]); echo("#### Top beam: length = ", toplength - 2*topsidewidth + 2*topslitdepth, " height = ", topheight, "width = ", topbeamthickness); } module topside(){ color("red") difference(){ cube(size=[topdepth, topsidewidth, topsideheight], center=false); translate([-20, topsidewidth-topslitdepth, topsideheight - topslitheight - topslitoffsetfromtop ]){ cube([topdepth+40, topslitdepth, topslitheight]); } } echo("#### Top side beam: length = ", topdepth, " height = ", topsideheight, "width = ", topsidewidth); } beam(); topside();