3
$\begingroup$

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

$\endgroup$
0

2 Answers 2

6
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ works as expected, thank you $\endgroup$
    – Alex
    Commented Mar 2 at 8:24
5
$\begingroup$

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .