# Mesh Topology Nodes - Edges of Vertex - How to work with the weights input?

I try to understand the mesh topology nodes, in this case the Edges of Vertex node. I understand the explanation given in the Blender manual. However, when trying to generate the Edge index with the lowest Y-position value, I don't understand the output.

I have a mesh with two faces, with the following index indices and edge indices:

I use the next node tree to get the edge, using as a weight the Y-position lower than -0.4:

My interpretation: For vertex 0 and 2, edge 0 is the connected edge with a Y-value closest to the value of less than -0.4. For vertex 1 and 3, edge 2 is the connected edge with a Y-value closest to the value of less than -0.4.

So far, so good, but I really don't understand edge 5 as the result for vertex 4. In my interpretation it should be edge 4, as this edge has a Y-value closest to the value of less than -0.4. If I change the compare node to less than -0.5, the edge index changes to 4. But if I go to less than 0.5, the edge index changes also to 4.

So for vertex 4, the edge index is 5 at -0.5 < y-value < 0.5 and index 4 at y-value ≤ -0.5 and y-value ≥ 0.5.

Can someone explain this to me? Or don't I understand the logic behind this setup?

• For 'Lowest Y', I think all you need to do is remove the Less Than . Sort Index 0 will return the edge with the minimum mid-point Y, per vertex. Thanks for a well-constructed question, BTW :) Jan 13 at 11:19
• Tnx! Already saw that but was wondering what happens when I use a specific tipping point of the Y-position ;-)
– EwSa
Jan 13 at 13:35
• OK. I believe the sort and the threshold would be separate logical operations .. 'minimum AND < 0.4, OR forget it' .. something along those lines, depending on what you need. Jan 13 at 16:33

## 1 Answer

• Considering vertex 4:

Edge 4 Y position is -0.5.

When compared using "less than or equal" to -0.5 edge 4 receives True (so 1) and edge 5 receives False (so 0). So edge 5 is the first as weights are in ascending order.

When compared using "less than" to -0.5 both edges receive False (so 0). So edge 4 is the first (or can be the first... presuming in case of weight equality, lesser index is chosen).

• Same principle for vertices 0 and 1: edge 1 receives True so it is not the first to be selected.
• Tnx for this nice explanation :-)
– EwSa
Jan 13 at 13:06