(* geometricinversionfunction *)
geoInv = ((With[{x662 = # . #}, If[x662 < 0.00000001, #, #/x662]]) &);
fCubeEdges[{x_, y_, z_}, s_] :=
With[
{
a = {x, y, z},
b = {x + s, y, z},
c = {x + s, y, z + s},
d = {x, y, z + s},
e = {x, y + s, z},
f = {x + s, y + s, z},
g = {x + s, y + s, z + s},
h = {x, y + s, z + s}
}
,
{
Tube@{ a , b },
Tube@{ b , c },
Tube@{ c , d },
Tube@{ d , a },
Tube@{ e , f },
Tube@{ f , g },
Tube@{ g , h },
Tube@{ h , e },
Tube@{ b , f },
Tube@{ c , g },
Tube@{ a , e },
Tube@{ d , g }
}
]
lotsTubes = Table[ fCubeEdges[{x,y,z},1], {x, 0,5}, {y, 0,5}, {z, 0,5} ];
tubeGraphics = Graphics3D[lotsTubes]
ReplaceAll[tubeGraphics, {x_,y_,z_} :> geoInv[{x,y,z}]]