# Why does the Edge Vertices node select only the first one?4 I want to iterate over every edge and do a math operation on its vertices, but when I use this method, it only works on the vertex with an index of zero. Am I doing something wrong?

• What are you trying to accomplish? Dec 6, 2022 at 15:55

I suspect that's happening because Edge Vertices is working in the Edge domain so the selection doesn't carry over properly. Sticking an Interpolate Domain on Edge mode right after Edge Vertices seems to do something: However, keep in mind that, as the manual says, the order of the two vertices of an edge is arbitrary. The first vertex of an edge might also be the second vertex of another connected edge, so the end result might not feel very intuitive. In the setup above, there are many more second vertex points than there are first vertex points (424 red spheres to 83 blue cubes), for instance. My guess would be that during the interpolation, when it's time to select the second vertices many of the first ones get switched to the seconds list since as well as being the first vertices of some edges, they're also the second vertices of others. If you used the Vertex Index 2 socket instead of the Boolean Math—Not node like I'm doing, you would see some vertices getting picked twice while others dropped completely.

If what you're trying to do is select every-other vertex and you'd like the proportion to be more balanced, you could use a MathModulo node and set it to $$2$$ (or whatever integer you like) instead: • That explains a lot, but makes me realize I didn't explain my problem more thoroughly. I'm working on 3.5 and trying to make a spring constraint out of the edges of my mesh in a simulation loop. What I need is to loop through every edge, grab its 2 vertices, calculate their distance, and if they're further apart than their original distance then bring them back together or pull them apart. But for this to work, in your example we would need the exact same amount of red spheres to blue cubes (i.e. every edge has exactly two vertices) Dec 6, 2022 at 16:16
• I don't know if the problem here is how Blender distinguishes points from vertices or if I'm missing something. Dec 6, 2022 at 16:17
• Hmm, do you need the indices for that? Wouldn't you do sth like: capture the initial distance between the two vertices of all edges, then capture it again and compare it to the initial value using named attributes and then scale elements? Like: i.imgur.com/fuv1I23.png I might be saying sth silly, not experienced with the simulation branch yet. Dec 6, 2022 at 16:25
• There is no difference between points and vertices in terms of domain evaluation, afaik. Vertices are the mesh element that's evaluated in the points domain, along with curve control points, and point clouds. In my scaling setup you would stay in the Edge domain so that wouldn't matter anyways. Dec 6, 2022 at 16:42
• That works, but in a simulation context, because the Edge Vertices node mixes up the vertices, it becomes very unstable; some vertices aren't iterated over at all (like shown in your red spheres and blue cubes example). In this image: imgur.com/a/p2XO6rI you can see that when I plug the position 1, the mesh is weirdly distorted. If this node was actually iterating over every edge and applying the operation (i.e. go over edge 1, set v1 position to v1 position) there shouldn't be any change, but there is. Dec 6, 2022 at 16:45