1
$\begingroup$

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? enter image description here

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – quellenform
    Oct 24, 2022 at 9:33

2 Answers 2

2
$\begingroup$

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:

enter image description here

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:

enter image description here

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

This takes a test mesh trough these stages:

enter image description here

(Blender 3.2b)

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

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

enter image description here

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:

enter image description here

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.

enter image description here


(Blender 3.1+)

$\endgroup$
7
  • 1
    $\begingroup$ 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.. $\endgroup$
    – Robin Betts
    Sep 8, 2022 at 14:04
  • 1
    $\begingroup$ @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. $\endgroup$
    – quellenform
    Sep 8, 2022 at 14:14
  • $\begingroup$ 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. $\endgroup$
    – Robin Betts
    Sep 8, 2022 at 14:47
  • $\begingroup$ 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). $\endgroup$
    – Mehr
    Sep 9, 2022 at 2:17
  • $\begingroup$ ... 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. $\endgroup$
    – Mehr
    Sep 9, 2022 at 2:17

You must log in to answer this question.

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