# How do I identify the large side of a mesh and rotate the objects in a specific direction?

I'm trying to make these meshes that are rotating around a centre point, all parallel to a plane. This plane could be any plane somewhere in the file. All I need to do is take each mesh and find out the large side and then make that side parallel to a plane.

I don't know what the process is for finding the large side of a mesh in GN. I have assigned a specific material to that side which is the large side, in my case it is blue or pink colour material. Is it possible to select a side based on the material and then make it parallel to a plane?

• If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer" so that this question will not continue to be displayed as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it. Oct 24, 2022 at 9:33

This answer makes a couple of assumptions based on your other similar question. Those are that ultimately, you want the shapes of your slices laid out as a cutting pattern, and that it is those you want flattened to the surface (without distortion), rather than the entire solid slices.

First, a group that will take the faces of any mesh, split them, rotate them to face-normal up Z, and arrange them on a grid:

Second, this answer creates a test boolean mesh, which I hope is similar in process to yours. It gives one example of how important shape-faces can be selected from the boolean mesh after creation. Your example's stock, before cutting, seems to originate in instanced cubes. The top faces of those cubes can be marked as True. Other faces introduced as part of the mesh-boolean will default to False, so can be selected out, along with the cube's sides and bottom:

.. and then the remaining faces can be distributed to a grid, using the previous group.

This takes a test mesh trough these stages:

(Blender 3.2b)

• Thank you so much for sharing your solution; I appreciate it and need to follow your node's structure to understand what you did.
– Mehr
Sep 9, 2022 at 1:59

I decided to split this task into two Geometry Nodes modifiers.

It is possible that after the instantiation of the objects with Geometry Nodes, modifications with other modifiers are still necessary or desired.

Therefore, this variant seemed to me to be the most flexible.

## Step 1: Creating the structure

In this example, the first node tree creates a simple structure of radially arranged objects of different sizes.

The important thing here is that after the instantiation of the objects, the position of each one is captured.

This way, the generated geometry, which is available here as instances, can be converted into a mesh that can be edited with modifiers, and the position of the individual objects is still preserved for further use.

A possibly useful step could be the use of a Decimate modifier.

## Step 2: Repositioning and rotating the objects

After you have added your modifiers, you can apply the second node tree, which repositions the objects:

Here I separate this face from the individual objects, to which you have assigned a certain material.

Here, of course, you must select the index of the material associated with the surface that will be the basis for the rotation.

From this face I capture the normals, which I transfer back with the Mesh Island Index and rotate around the previously captured position of the object pointing downwards.

At the same time I create a grid, which corresponds to the number of points of at least the number of objects and is dimensioned in such a way that the objects go out to some extent without overlapping.

From the points of the grid I get the positions and add them to the previously rotated positions of the points of the individual objects.

...and thus all your objects would not only be correctly rotated, but also evenly distributed on a surface.

(Blender 3.1+)

Update

Here is an even simpler variant that is not divided into multiple node trees and does not allow an intermediate step with additional modifiers, but reliably distributes the selected faces of the objects flat and provides only the outer edges.

This works even if the selected faces consist of multiple faces or have other complex structures.

(Blender 3.1+)

• Snap! .. late as usual... :( .. Should be able to go all the way with the details of the other q, IMO, marking suitable centers on a path, indexing pieces for assembly.. Sep 8, 2022 at 14:04
• @RobinBetts Ah, you're right, this time I actually misinterpreted the question: Instead of rotating/moving the whole mesh, it's actually only about one side :D ...anyway, I'll leave the answer anyway. Maybe it helps one or the other somewhere. Sep 8, 2022 at 14:14
• Yours answers OP better, as written. I think @Mehr might be making assumptions about required steps to the desired end result? e.g maybe expecting to use a boolean to cut out the shapes? It's hard on questioners, when they're asked to pose only one problem at a time. In cases like this, I think mehr's more elaborate q. was OK. Sep 8, 2022 at 14:47
• Thank you, @quellenform, and I appreciate the notes and explanation about the solution. I like the two modifiers approach, never used it before with Geometry Node. The object that I am rotating, in this case, is an SVG shape, extruded, and then used as one instance, then I am turning it across two axes, one around the centre ( the big circle and the next around the local axis).
– Mehr
Sep 9, 2022 at 2:17
• ... The big side of a single model is not just a single face; it's about 200+ faces. I managed to select all those small triangles ( faces), create a big side of one instance with a compare node, select a range then use that selection to separate it from the instance. The Normal will not work in my case as I have many small faces.
– Mehr
Sep 9, 2022 at 2:17