# Select unique cube configurations

I have made a cube from line components and rotated it in all directions keeping it orthogonal. This gives me 64 different orientations of the cube. How can I select only the unique orientations of the cube? I tried to select points on the lines and try to make some sort of identifiers for the cubes. Then I could afterwards cull them. However, I did not manage to do it correctly. Could someone help me out here? This cube is used for testing if the code works. There are more complex cubes that I would like to know the unique configurations of.

3. Attach minimal versions of all the relevant files
If you have a `gh` file you have a question about, attach it to the post. Do not expect that people will recreate a file based on a screen-shot because thatâs a lot of pointless work.

-Kevin

1 Like

Hi Kevin,

You are right, here is part of the file that I use. The code part in purple is where I make a design. The second part is where I make the different rotations and try to obtain unique configurations of the cube. Hope this helps.

Kind regards,
Ruben
Cube.gh (24.4 KB)

How bizarre. So complex Is the answer eight?
I rotated a âWorld XYâ plane instead of a box and all eight outputs of BANG! (Explode Tree) produce the same geometry.

Cube_2024_Jul7a.gh (14.7 KB)

P.S. I get the same result (eight, one for each corner of the box) rotating the origin point:

Cube_2024_Jul7b.gh (10.2 KB)

Another way to look at this:

Cube_2024_Jul7c.gh (11.5 KB)

Imagine the origin is the corner of a room and each corner of the cube, one after another, is placed at the origin, constrained by the walls of the room.

This didnât work as expected but is interesting. I believe it demonstrates minimal rotation to place each corner of the cube at the origin without the constraint of the âroom wallsâ?

Cube_2024_Jul7d.gh (15.3 KB)

Hi Joseph,

Interesting findings indeed. Would it from this computation be possible to show again the different cubes with unique configurations? I believe there were indeed eight unique orientations for the cube I showed in the first picture.

Another way to look at this:

Rotating a cube around itâs center with the values supplied gives 6 possible locations for face[0]. At each of these locations, face[0] has 4 possible orientations (uv directions). This gives 24 combinations.

Compounding the 3 transformations provided and comparing the resulting transformation matrices yields 24 unique transformations.

240709a_Cube.gh (15.0 KB)

-Kevin

Sounds logical when you put it that way. I added code to display all 24 transformations:

240709b_Cube.gh (24.6 KB)

Looks very good! I made some modules that have different numbers of unique orientations. So not only 24. Here is a script that I made that shows the different unique orientations for each of the modules.
Cube.gh (129.0 KB)

The rotation code you supplied produces 24 unique transformations.

Depending on the geometry supplied, these 24 transformations can produce different numbers of geometrically unique modules (1 to 24). Your latest code demonstrates this.