I prefer to see the keys and slots as a "color". That way each square has x colors whose edges can be joined to each other as long as their color differentiates. Joining may happen planar or perpendicular. In a first step I want to build a cube whose 6 faces consist out of 6 squares. I want to know how many different edge colors I need when building a) an ordinary cube b) a cube in cube system like the rubic's cube (3x3x3). Can anybody give me a tipp where to start?