use <MCAD/boxes.scad>


eps = 0.0001;

$preview = false;

// mirror([0, 0, 1])
// {
//     translate([0, 0, 1-eps]) roundedBox([15, 74, 2], 15/2, true, $fn = $preview ? 32 : 100);
//     KandM_14510_Mount();
// }


module KandM_14510_Mount(floor_height = 1, cutout = false)
{
    Pick_T = 1.0;
    Pick_H = 13;
    Pick_W = 60;
    
	Outer_T = 7.5;
	Outer_H = Pick_H;
	Outer_W = 67.5;

	Wall_T = 2.0;

	if(cutout)
	{
		roundedBox([Outer_T + 2*Wall_T  , Outer_W + 2*Wall_T, 1*Outer_H], (Outer_T + 2*Wall_T)/2, true, $fn = $preview ? 32 : 100);
	}
	else
	{
		translate([0, 0, floor_height/2-eps])
		roundedBox([Outer_T + 2*Wall_T  , Outer_W + 2*Wall_T, floor_height], (Outer_T + 2*Wall_T)/2, true, $fn = $preview ? 32 : 100);
		translate([0, 0, -Pick_H/2])
		{
			roundedBox([Pick_T, Pick_W, Pick_H], Pick_T/2, true, $fn = $preview ? 32 : 100);

			difference()
			{
				roundedBox([Outer_T + 2*Wall_T  , Outer_W + 2*Wall_T, 1*Outer_H], (Outer_T + 2*Wall_T)/2, true, $fn = $preview ? 32 : 100);
				roundedBox([Outer_T             , Outer_W           , 2*Outer_H], Outer_T/2             , true, $fn = $preview ? 32 : 100);
			}
		}
	}
}