2
$\begingroup$

I’m working in Geometry Nodes in Blender 4.5.3. I have one object made of rectangular faces oriented in XZ and YZ planes — these faces represent windows of a building.

I’m trying to find, for each face, its local width direction (XZ) and then move the side edges in that direction by a certain distance — basically, I want to automatically widen each window along its local width axis.

I already have a Python script that does exactly this and works fine. I’ll include it below. Now I’d like to rebuild the same logic procedurally using Geometry Nodes. I understand the part with the cross product, but I’m struggling with selecting the side edges and applying an offset along the local axis.

I’m able to achieve a similar effect in Geometry Nodes by using a Scale operation, but that’s not what I want — I need to make sure the edges are moved by a fixed distance in the given local direction, not proportionally scaled.

$\endgroup$

1 Answer 1

3
$\begingroup$

For a single face that's already aligned with its normal along the Y axis and the "width" to be scaled along the X axis, the following network will calculate the relative scaling vector needed to achieve an absolute width increase (in local space) determined by an "Expand Width" input:

You can use a For Each node over the faces to apply this scale vector. The two Transform Geometry nodes in this network rotate the face so it is oriented as described above and then rotate it back. Because, in a Transform Geometry node, scale is applied before rotation, we can feed the scale vector directly into the second node and have that scale applied before the face is rotated back to its original orientation:

Here's the full network:

And here's the network applied to a unit cube (with the top and bottom faces removed) and the "Expand Width" input set to -0.5m. The width of the faces has been reduced from 2m to 1.5m without affecting their height. This is in local space, so if you scale the cube object up by a factor of ten (unapplied scale), the faces will be reduced from 20m to 15m.

Here's my Blend file.

$\endgroup$
1
  • $\begingroup$ I don't know how to thank you for all your effort and time—a huge thank you—it works great! $\endgroup$ Commented Nov 9 at 19:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.