# Deadline Help Req*! Adjusting Rotation of Points on Top Face Based on Cube's X and Y Axis Dimensions

Hello Everyone,

Sorry to repost this question. I haven’t found the solution, I’m new to geometry nodes and trying to change the rotation of points on the top face of individual cubes in Blender, based on their dimensions. Specifically, I want the points to rotate if the X-axis dimension of the cube is greater than the Y-axis dimension. This should apply to each cube individually.

Geometry Node Link:
Geometry Node

Does anyone know how to set this up in Geometry Nodes or any other method within Blender?

Thanks for the help!

So the way I understand it, you actually have two problems here:

1. Set the rotation of the plank to align with the longest side of the face
2. How to know which side of the face is the longest side

If you know which side is the longest, setting the rotation is relatively simple - you could use “axes to rotation” node, using the face normal as the primary axis (aligned to z) and a vector of the longest side as the secondary axis (aligned to x or y).

Finding the longest side is maybe tricker though. One way to do this could be something like:

• For each face, read the face corners
• For each corner, read the next next corner using “offset corner in face” node
• Read the positions of the two corners
• Subtract the corner positions, now you have a vector parallel to the edge
• You can use a repeat zone to iterate through all 4 edge vectors, and find the longest

I’m sure there are other ways to achieve what you want though, there may be a simpler or more elegant solution

1 Like