# How can I separate curve from profile using Geometry Nodes?

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

• 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 ? Commented May 14 at 6:16
• May I recommend to apply this : What should I do when someone answers my question? Commented May 20 at 12:06

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.

With a transform you get:

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.

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):

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

.. 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:

• 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? Commented May 15 at 5:22
• 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. Commented May 15 at 8:35
• 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? Commented May 15 at 9:29
• 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. :) Commented May 15 at 10:11
• @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. Commented May 15 at 11:44