Cube Solver

Given a side length of an outer cube (cube1), this code calculates the proper radius and cube side lengths of all subsequent spherical cutouts and the cubes contained within such that said parameters can be put into your favorite CAD program, such as Solidworks. 

The dimensions output will make cubes which 

I'm sure there's a better way to automate this, but I don't

wallthickness=.125;
cube1=2.625/2;
d=wallthickness/cube1;
rad1=(((2(((cube1))^2)+(((d*cube1))^2)-2(Sqrt[2(((cube1))^2)])d*cube1 Cos[π/4]))^(1/2))
cube2=rad1/(Sqrt[3]) 
rad2=(((2(((cube2))^2)+(((d*cube2))^2)-2(Sqrt[2(((cube2))^2)])(d*cube2)Cos[π/4]))^(1/2))
cube3= rad2/(Sqrt[3])

rad3=(((2(((cube3))^2)+(((d*cube3))^2)-2(Sqrt[2(((cube3))^2)])(d*cube3) Cos[π/4]))^(1/2))
cube4= rad3/(Sqrt[3])
rad4=(((2(((cube4))^2)+(((d*cube4))^2)-2(Sqrt[2(((cube4))^2)])d*cube4 Cos[π/4]))^(1/2))
cube5= rad4/(Sqrt[3])

Solve[r==(Sqrt[3(((s))^2)]),s]

.1875/1.3125

(d*cube2)