include <dimlines.scad>
include <dimensions.scad>

sidelength = bottomtohole + plankthick + holediameter;

module side(){
	color("orange")
	cube(size=[sidelength, nestwidth, plankthick], center=false);
	echo("#### Side: length = ", bottomtohole + plankthick + holediameter, " width = ", nestwidth);
}

module hingedside(){
	difference(){
		side();
		translate([0, (nestwidth / 2) - ( (picturehookdiameter + lockplay ) /2 ), -2]){
			cube(size=[plankthick, picturehookdiameter + lockplay, plankthick+5], center=false);
		}
	}
}

module sidedim(){
	side();
	color("black"){
		translate([-10, 0, 0])
			rotate([0,0,90])
			dimensions(length=nestwidth);

		translate([0, -10 , 0])
			dimensions(length=sidelength);

		translate([0, nestwidth + 15, 0])
			drawtext("Side");
	}
}

module hingedsidedim(){
	hingedside();
	color("black"){
		translate([-10, 0, 0])
			rotate([0,0,90])
			dimensions(length=nestwidth);
		translate([-20, (nestwidth/2) - ((picturehookdiameter+lockplay)/2), 0])
			rotate([0,0,90])
			dimensions(length=picturehookdiameter + lockplay, loc=DIM_OUTSIDE);

		translate([0, -10 , 0])
			dimensions(length=plankthick);
		translate([0, -20 , 0])
			dimensions(length=sidelength);

		translate([0, nestwidth + 15, 0])
			drawtext("Hinged side");
	}
}
