Creating strip out of two lines with geometry nodes

Hi I am learning about geometry nodes and they are very powerful and interesting, but I don't understand if it is possible to build meshes starting from primitives.

For example, I have two line meshes with the same number of vertices and I would like to create a strip of triangles or quads by mapping their vertices by index. How can I achieve that?

Clarification screenshot following: I would like to procedurally build the faces by joining pairwise vertices belonging to each of the two curves, e.g. creating a face from the green-cyan vertices, then a face from the cyan-yellow vertices, and so on. This is a quad strip pattern, but a triangle strip would be fine as well, for the sake of learning.

3 Answers

It so happens that the order of indices in a GN-generated Mesh Primitive > Grid is quite convenient. So, being a bit naughty, and depending on that Blender implementation detail, we can make a mesh loft between any 2 splines, presented as 1 curve:

... just by transferring Position, by index, from the curve to a 2 x Resolution grid. Resampling means we don't have to care about the number of control-points or resolution of the splines, the point-counts will always match.

The curve could just as well be the 2 arcs you've generated within a GN Tree:

• This was exactly I was hoping for, thank you very much! Jun 1, 2022 at 7:29
• Out of curiosity, I wonder if index can be considered stable and safe (i.e. it's really being naughty here?) or if can change and it's possible to re-index vertices. Jun 1, 2022 at 7:32
• Hi @ARDVL! I can't realistically imagine any reason the devs would suddenly change the index-order on either a Mesh>Grid or a multi-spline curve, so I'm being super-strict, with that remark. I would personally be happy to rely on the order. But it is under someone else's control, and there's no published guarantee. So if I was doing this for intended re-use at some unknown future time in a commercial studio, possibly incurring costs / other people's time chasing a mysterious bug, I would feel the need to give a more limited, but reliable solution, more like @quellenform's. Jun 1, 2022 at 8:21

I would construct it like this:

You obviously want to use a curve as a base and create a mesh.

The node Curve to Mesh does not really help you in this case.

But you can create a new line with the node Mesh Line, and adjust its positions to the curve by transferring them with the node Transfer Attributes and resetting them with Set Position.

After that you can extrude the mesh line with the node Extrude Mesh.

If you use the value $$0$$ as Offset Scale, you can scale the individual edges away from the center by any value with the node Scale Elements and get exactly the mesh you have sketched.

You can create a Mesh Grid with Vertices Y equal to 2 and Vertices X equal to the arcs resolution. That way even ad odd indexes are on opposite sides of the grid.

After that, you just need to transfer the position from the arcs to the vertices, even indexes are for the larger arc. The index for transferring needs to be the index of the vertex divided by 2, that way we get the same index for every two vertices in the grid.

Result: