# Geometry Nodes: Select profile and length loops independetely after curve to mesh

I am trying to capture the profile and length loops independently after converting a curve to mesh. So far it only works when the profile resolution is even. When the profile resolution is an odd number, I get unwanted selection.

I couldn't figure out how to get the selection to work in both cases

Profile even resolution:

Profile odd resolution

And this is the node setup I used to get the selection

A direct method, using integer comparison.

Curve to Mesh implicitly evaluates a curve to its polygonal approximation, 1 control-point per latitude. If you explicitly evaluate the curve first, you can capture the point indices, and they survive on the generated mesh.

If the captured indices at each end of an edge are equal, the edge is on a latitude. Else, on a longitude:

... but if you're generating UV coordinates for texturing anyway, you may want to compare those after the fact.

• works as expected, thank you
– Alex
Commented Mar 2 at 8:24

You can simplify a bit using edge vertices.

The curve (circle or other) edge point indices are consecutive or separated by the point count minus one (case of cyclic spline).

This is the same when used as profile.

• As the English might say: six of one, half-a-dozen of the other :) Commented Mar 1 at 7:44
• @RobinBetts, you know, I'm here for two things: learning new shortcuts and learning idiomatic expressions. Commented Mar 1 at 7:48
• This method works just fine too, thank you as well
– Alex
Commented Mar 2 at 8:24