3

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

quellenform
  • 35,177
  • 10
  • 50
  • 133
Alex
  • 2,608
  • 3
  • 15

2 Answers2

6

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.

enter image description here

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

enter image description here

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

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
5

You can simplify a bit using edge vertices.

enter image description here

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.

lemon
  • 60,295
  • 3
  • 66
  • 136