4
$\begingroup$

How can I separate curve from profile like shown in the example image below?

enter image description here

$\endgroup$
2
  • $\begingroup$ Could we assume that the original curve number of points is known ? Or the number of points for the extruded profile ? Or do we just have a mesh, without characteristic numbers ? $\endgroup$ Commented May 14 at 6:16
  • $\begingroup$ May I recommend to apply this : What should I do when someone answers my question? $\endgroup$ Commented May 20 at 12:06

3 Answers 3

5
$\begingroup$

You can try this node setup. Notice how the vertex index order is automatically arranged from 0 to along the spline length so you can easily select vertices from 0 to number of vertices per spline, times the resolution and then separate this geometry from the profile.

enter image description here

With a transform you get:

enter image description here

$\endgroup$
3
$\begingroup$

With one Domain Size on each curves you can keep the Resample Curve on Length and gain a few nodes. Overall the method is the same as Harry McKenzie.

enter image description here enter image description here

$\endgroup$
0
3
$\begingroup$

There's no need to count vertices. This problem can be reduced to the calculation of UV on the generated mesh.

Edges on the same profile on the generated mesh will have the same U, on the linear segments the same V. (That is to say, the Factor of the source sweep and profile curves, which can be captured):

enter image description here

(Floats tested for equality with a small epsilon) Result:

enter image description here

.. if you were calculating U and V anyway, you may as well use the same group, though, to do the separation.

... with named attributes, in response to commentary:

$\endgroup$
6
  • $\begingroup$ cool thanks for sharing! btw I'm trying to see the values in Evaluate at Index snipboard.io/dIEopf.jpg but the values are all zero why is that? I always use store named attribute to debug for values. is there another way? $\endgroup$
    – Harry McKenzie
    Commented May 15 at 5:22
  • 1
    $\begingroup$ Hi, @HarryMcKenzie ! I'm storing the Factor of one or both of the curves before conversion to mesh. The factor of the sweep curve could sensibly be named 'U', and of the profile curve 'V'. U and V survive conversion, on the vertices of the mesh.. see edit for example file. $\endgroup$
    – Robin Betts
    Commented May 15 at 8:35
  • $\begingroup$ Hi Robin thanks for sharing really nice. But I also was interested in the screenshot I shared why does it not stash the value in snipboard.io/dIEopf.jpg Why does the value output of Evaluate at Index node show up as zero? $\endgroup$
    – Harry McKenzie
    Commented May 15 at 9:29
  • $\begingroup$ Hi, @HarryMcKenzie! Your illustration doesn't explicitly show what you are storing as 'a'. Whatever it is, it's evaluated on the Store Named Attribute node's input Geometry. That's a mesh. If you're storing Spline Parameter > Factor , then a mesh doesn't have one of those, so evaluates to 0. If that isn't the problem, chuck me a file. :) $\endgroup$
    – Robin Betts
    Commented May 15 at 10:11
  • 1
    $\begingroup$ @HarryMcKenzie Yes, but only by respecting the context. Viewer >'Auto' isn't cutting it. If I take away the link to Edge Vertices and set the index manually, I can see the value on 'Auto' , or 'Points' If I leave the index to be set by Edge Vertices I have to set the Viewer to 'Edge' and go to that page of the spreadsheet. $\endgroup$
    – Robin Betts
    Commented May 15 at 11:44

You must log in to answer this question.

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