# Add object on mesh face, geometry node

I ask for help in solving my problem. It is important for me to understand which nodes to use to calculate the location of an object's face and which bundle to transfer and indicate this position to another object.

No tutorial has been able to explain this task:

1. How to indicate to objects their specific position on a specific face of the cube. The objects in my case are text
2. What is the easiest way to solve the positioning problem in this case?

How do I see the solution (how I think it should work):

• determine the ids or indexes of the faces of the object (cube)
• use the attributes of a node of the set position type to indicate to another the bundle in which place he needs to be
• profit

I am attaching various references. The best solution will be saved in our hearts and on my personal page.

It is also planned to reuse the created cube in other industries, 3d printing, 3d milling, web game development (three.js or other)

(Using Blender 3.6.5)

#### To put one object relatively to one face of another object

1. The targetted face is identified by its Index. For the demo, an Input/Constant/Integer node is used.
2. The face centre coordinates are recovered from the receiving geometry using a Sample Index node set in Face domain and linked to a Position node.
3. The face normal coordinates are recovered from the receiving geometry using a Sample Index node set in Face domain and linked to a Normal node. This vector is converted to a rotation through an Align Euler to Vector node. Its Axis property is set to Z because the text to put on the targetted face is generated in the (X,Y) plane. So the Z axis is perpendicular to the text to put. The Align Euler to Vector node is thus computing the rotation that is aligning the text normal to the face normal. As a consequence, the text is tangent to the face.
4. A Transform Geometry node is used to specify the position and the orientation of the text to put relatively to the receiving geometry.
5. The geometry of the text to put is generated by extrusion of a curve. Because the extrusion offset is negative, a Flip Faces node is required to properly specify inside vs outside.
6. Scaling, upside/down rotation, and fine positioning of the text to put are performed by an other Transform Geometry node, before putting its geometry on the targetted face.
7. It is to notice that the text to put is offset in Z direction by half the extrusion offset. This way it is embedded only by half its thickness inside the receiving geometry.
8. The text volume is removed from the receiving geometry by a Mesh Boolean node set to Difference operation.
Resources:

#### To put objects on each face of another object

1. The face centre coordinates are recovered from the receiving geometry using a Mesh to Points node set in Faces domain.
2. The face normal coordinates are recovered from the receiving geometry using a Capture Attribute node set in Face domain and linked to a Normal node. This vector is converted to a rotation through an Align Euler to Vector node. Its Axis property is set to Z because the text to put on the targetted face is generated in the (X,Y) plane. So the Z axis is perpendicular to the text to put. The Align Euler to Vector node is thus computing the rotation that is aligning the text normal to the face normal. As a consequence, the text is tangent to the face.
3. An Instance on Points node is used to specify the position and the orientation of the text to put relatively to the receiving geometry.
4. The different texts to put are collected through a Geometry to Instance node and the face index, same as the point index thanks to the Mesh to Points node, is used to select a different text for every face of the receiving geometry.
5. The geometry of the texts to put is generated by extrusion of curves.
6. It is to notice that the text to put is offset in Z direction by half the extrusion offset. This way it is embedded only by half its thickness inside the receiving geometry.
7. Because the extrusion offset is negative, a Flip Faces node is required to properly specify inside vs outside. The text volume is removed from the receiving geometry by a Mesh Boolean node set to Difference operation. It is to notice that a Realize Instances node is required before Boolean operations with instances.
Resources:

• Thank you for such a quick and elegant response. I probably didn't make myself clear. I repeat the requirements. 1. Determine the specific position of any face of any object 2. Set these coordinates to another object as a reference. At least positions. In general, your answer is appropriate, but I would like more control and I'm looking for a way to get it. Also look at the references - can you extrude an object inside a cube? Commented Jan 9 at 1:34
• By "extrude inside", do you mean that you are expecting a sunken text, instead of a protruding text on each face ? Commented Jan 9 at 22:42
• sunken text is what I'm trying to achieve. I was thinking of using negative values in the extrusion node, but at the same time the front wall is preserved, which prevents me Commented Jan 13 at 5:36
• (NB: Comments above are related to a previous edition of this answer). Commented Jan 13 at 17:09