# Geometry Nodes: Help on how to adjust beam height based on edge lenght

Hello dears,
i’m trying to set a GN to transform a mesh in a skeleton of beams, but I cannot find the way to regulate the height basing on rules, for ex. using the lenght of the single edges to regulate the height of the beams.

In this case I would like the height of the beams to be 1/5 of the length of the edges.

I would reach a result more similar to this:

I cannot find tutorials that beat this topic. Can you give me some suggestions on how to reach this?

Thanks!

You have the the quad node, the height of the box. ( currently set to .2 m)

1. Add an input node the height of Quad (you’d make this value .02). Now the height will be controller by the value you have in the input node.
2. Add a math node to your chain for the curve, set to multiply
3. Connect the input from step 1, to that math node. Use .2 (1/5 height) for the multiplication factor.

well, that would just be feeding your quadrilateral with some math nodes. when you say 1/5 of the length of the edges, do you mean the edge that you’re wanting to adjust, so those long edges would be 1/5 as wide as they are long? what about the other dimension (right now you have a .1)? should that also be 1/5 as they are long? and is this for all edges?

if it is for all edges, you need to seperate which curves get which profile. is the originating box always lined up with xyz axis? (and then .later. perhaps rotated?)

unfortunately there’s no super simple “one way” answer for the solution… the solution will vary based on your answers given.

to keep the request as much clear and simple as possible, I just made a parallelepiped 2x1x1m.

• the Width can be the same for all the beams (0.1);
• the Heights should be 1/5 (or any chosen fraction) of the “edge lenght” for each edge (this should be a field).

So, as in the second image, when an edge is 2m long, the beam height will be 40cm, etc.

I would not consider alignment with xyz axis: this should function also with irregular meshes, giving different heights for each edge.

I hope I have given a sufficient description of the problem.

1 Like

i have some other things to deal with first, but i’ve bookmarked this for a closer look this evening if you haven’t already got a solution by then.

It’s a couple of days i’m working on it. If finding sooner a solution, will post it here. Thanks for your interest!

with this configuration i can set one unique Height based on the sampled edge lenght, since the extruded section cannot accept fields.

I am afraid that with fields i would need a totally different approach.

You can try this setup

3 Likes

i really gotta learn that vector math … my approach probably would have been split each edge on it’s own, get length set the mesh, and the join the 12 curve/meshes back together.

2 Likes

Thank you Higgsas!

I want to study and better understand the vector math too, and this is a good base from where to start.
I’ll dedicate a good part of my freetime on it in the next days

1 Like