0
$\begingroup$

this grid is a combination of doors and windows. is there a way to rotate these faces similar to the picture below?

enter image description here

enter image description here

001

002

$\endgroup$

1 Answer 1

4
$\begingroup$

Yes, there is a way. You will need to select each face by Index, offset it's center and then rotate it using set position node. Here is an example only for one face. enter image description here


------------------------------------------------------
UPD
enter image description here

------------------------------------------------------
UPD2
When you have an ngon (polygon with more than 4 verts) it's not that simple to find it's center. So ther workaround here looks like this.
First,you can calculate the center of each face using node setup from this thread: Geometry Nodes. Find the center of a rectangle whether or not there are multiple vertices on one side
Second, you need to calculate the size of the face along Y axis.
Third, you need to substract half of the size of the face from it's position along Y axis and then you can rotate.
Hope this helps.enter image description here

$\endgroup$
8
  • $\begingroup$ thanks for your answer, I have tried it, and it creates a small gap between the rotated face and the others. also, it seems that it doesn't work on different forms of faces. (I uploaded the blend file ) $\endgroup$ Dec 1, 2023 at 21:00
  • $\begingroup$ Use split edges and capture attrubute instead of separate geometry. Then it will work correctly. I added blend file to my answer. Take a look. $\endgroup$
    – retr0
    Dec 1, 2023 at 21:13
  • $\begingroup$ gap still there. $\endgroup$ Dec 1, 2023 at 21:23
  • $\begingroup$ Updated blend file, shouldn't be any gap now $\endgroup$
    – retr0
    Dec 1, 2023 at 21:32
  • $\begingroup$ thank u, well done $\endgroup$ Dec 1, 2023 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .