# Select only edges in U or V direction on a mesh - Geometry Nodes

I'm looking for a way to simply select edges in only the u or v direction of any mesh

I've found this solution but it only seems to work for objects you can precisely input the amount of faces like a grid - How do you select an edge loop in geometry nodes?

as you can see below it gives me an incorrect selection once I try to apply this to more customised meshes?

Desired Result (Only the curves in U direction)

• I'm afraid this won't really (or at least not easily) be possible, because the node "Subdivide Mesh" wildly jumbles the indexes of the vertices. This makes the approach you mentioned definitely not helpful and I don't currently see any other way to mark specific edges. Commented Apr 5, 2022 at 13:38

With a bit of sleuthing, you can do this based on the order of how vertices get created. Here's an example workflow I used on my tesla coil generator. First, a torus made out of two curve circles. Note in the Spreadsheet Editor how there's a 8 verts in a row that have a Y of 0:

That tells us that it must be ordered by the first circle, with a row of verts every 8, and that it builds the 8 main rings of 8 first, then builds the profile edges. So the first 64-ish are Circle 1 and the ones after that are Circle 2. This math checks out in the Edge spreadsheet too, where there's 128 edges (index 0 to 127.)

Based on that, delete edges based on X versus Y. Here's a setup for the main rings....

...and another for the profile rings.

There's probably better math for that second one, but sometimes you Ctrl Scroll through every option on the math node and one of them works :P

there's a different option that may probably fail too, but won't care about scrambled indexes: to compare edge against some vector, if the general direction is similar it will work, but it is limited to some input direction + tolerance and will fail in many cases, see the image... I guess it could be useful up to some point tough

that compare node in vector mode is pretty cool, there's an angle input there you can use to correct on an 'edge' level, maybe could be used with the help of a guide object to improve results..?

blend to check

• Thanks I was hoping to do this on a circle like your above image but unfortunately this solution as seen in your example doesn't quite work.. but it does work pretty well on straight and slightly bending curves so thank you for that! Hopefully blender will add in some kind of UVcurves node soon enough :)
– JaRa
Commented Apr 6, 2022 at 12:13

Maybe I understood the UV too literally, you don't have the UV information? If you do:

If you don't: how would you explain the algorithm, i.e. imagine you have an intern that really needs something explained thoroughly - how should the intern determine which edges to select? You can't say "use reason", you need to explain the logic...